Skip to main content
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—
Kubernetes control planeGPU nodeOperatordeploys a modelAPI serveradmission · quotaDevice claimResourceClaimSchedulerpicks device+nodeDevice listResourceSliceDRA driverGPU · NICModel PodvLLMdeploy model
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 flowAdded here
Unit of requestOne Pod, one deviceOne claim per Deployment replica
Device setOne kind of GPUGPU and network card matched by constraints
Check before deployNoneResourceQuota caps device count; Kueue can queue
Why a Pod waitsCriteria mismatchTell 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

  1. A second model deployment passed the namespace quota check, but its Pod stays Pending. What is most likely?
  2. How do you ask DRA for two GPUs and a network card attached to the same PCIe root?
  3. For a Pending Pod, what order of checks does the lesson suggest?

Further reading: Dynamic Resource Allocation · Resource Quotas · Kueue