AI on Kubernetes · GPU/NPULesson 3 of 20
Getting Accelerators by Criteria (DRA in Depth)
For a long time Kubernetes handed out accelerators only as "N GPUs". Dynamic Resource Allocation (DRA) lets you request "which kind of device, under what criteria, and how it is shared". LLM serving needs this when a GPU and a fast network card must come together, or when one GPU is shared. See the basic flow in Requesting GPUs by Criteria (DRA) first; this lesson adds quota, multi-device requests, and what happens when devices run out.
Request styleN GPUs
Allocated devices—
Model Pod—
RequestResponse / reportAppears in a later step
What you will learn
- Some requests cannot be expressed as a count
- Node drivers publish devices with their attributes
- Criteria go in the claim; the scheduler picks
- A GPU and a NIC can be allocated as a matched set
- Quota and free devices must be checked separately
What this adds to the basic DRA lesson
| Basic flow | Added here | |
|---|---|---|
| Unit of request | One Pod, one device | One claim per Deployment replica |
| Device set | One kind of GPU | GPU and network card matched by constraints |
| Check before deploy | None | ResourceQuota caps device count; Kueue can queue |
| Why a Pod waits | Criteria mismatch | Tell quota exceeded apart from devices exhausted |
Try it yourself
kubectl get deviceclasses # Device classes the drivers offer
kubectl get resourceslices # Device lists per node (step 2)
kubectl describe resourceslice <name> # Per-device attributes (model, memory, pcieRoot)
kubectl describe quota -n <namespace> # DRA device usage vs cap (step 3)
kubectl get resourceclaims -A # Per-Pod claims and allocation state (steps 4, 6)
kubectl get events -n <namespace> --field-selector reason=FailedScheduling # cannot allocate all claims (step 8)
Check yourself
Further reading: Dynamic Resource Allocation · Resource Quotas · Kueue