GPU Scheduling on Kubernetes: DRA, MIG, and Kueue
GPU scheduling on Kubernetes differs from CPU scheduling because GPUs are discrete, expensive, and hard to share safely. The scheduler historically treated a GPU as an integer count with no fractions and no overcommit. Modern GPU scheduling on Kubernetes adds Dynamic Resource Allocation, MIG partitioning, and queueing so scarce accelerators match real workload needs. A GPU becomes schedulable when a device plugin tells the kubelet it exists. The NVIDIA device plugin runs as a DaemonSet on GPU nodes, registers with the kubelet, and advertises an extended resource such as nvidia.com/gpu. Pods request whole units of that resource, and the scheduler treats each unit as indivisible. Dynamic Resource Allocation, or DRA, replaces integer GPU counts with structured device requests. A DeviceClass describes a category of hardware using attribute filters, and a ResourceClaim asks for devices matching those filters. DRA reached general availability in Kubernetes 1.34, and it lets workloads request a GPU by memory, model, or sharing mode instead of a bare count. Sharing a GPU means choosing an isolation trade-off. MIG partitions supported NVIDIA GPUs into hardware-isolated instances with dedicated memory and compute. Time-slicing interleaves workloads on one GPU with no isolation. MPS shares a GPU between processes with software-level separation. Pick MIG for untrusted or multi-tenant work, and time-slicing only for trusted replicas. Kueue adds admission control in front of the scheduler. It holds jobs in queues until quota and capacity allow them to start, then admits them as a unit. For GPU scheduling on Kubernetes, Kueue prevents partial starts, enforces per-team GPU quotas, and lets teams borrow idle capacity with preemption when the owner returns. Gang scheduling starts all pods of a distributed job together or none of them. Without it, a training job can hold some GPUs while waiting for the rest, blocking other work and never making progress. Kueue provides gang behavior at admission time, while batch schedulers such as Volcano enforce it at placement time. GPU node autoscaling must react to queued demand, not just pending pods. With admission control holding jobs back, the autoscaler needs visibility into queued workloads or it will see no pending pods and add no nodes. Pair queueing with an autoscaler that understands GPU flavors, and set consolidation rules that respect long-running training jobs.
1. Why GPU Scheduling on Kubernetes Is Different
GPU scheduling on Kubernetes differs from CPU scheduling because GPUs are discrete, expensive, and hard to share safely. The scheduler historically treated a GPU as an integer count with no fractions and no overcommit. Modern GPU scheduling on Kubernetes adds Dynamic Resource Allocation, MIG partitioning, and queueing so scarce accelerators match real workload needs.
Start with an illustrative composite incident, not a named outage. A platform team runs inference replicas and nightly training jobs on one cluster with eight GPUs. A training job requests four GPUs but only three are free, so two of its pods start and hold GPUs while waiting for peers that can never start. Inference pods queue behind them. Utilization dashboards show GPUs busy, yet no useful work completes for hours. The cluster is not short of hardware. It is short of admission control and sharing rules.
That failure has three roots. First, the default scheduler places pods one at a time, so a multi-pod job can partially start and deadlock against itself. Second, whole-GPU allocation wastes capacity when a small inference model needs a fraction of a large card. Third, first-come placement ignores team quotas, so one team's experiment can starve another team's production service. GPU scheduling on Kubernetes is the discipline of fixing those three roots with device APIs, partitioning, and queues.
The stack has four layers, and each layer answers a different question. Device plugins or Dynamic Resource Allocation answer how a GPU becomes visible and requestable. MIG, time-slicing, or MPS answer how one GPU is shared. Kueue or a batch scheduler answers which jobs may start and in what order. Node autoscaling answers how capacity grows. Confusing these layers is the most common design error, so this guide keeps them separate.
2. How the Scheduler Sees a GPU: Device Plugins
A GPU becomes schedulable when a device plugin tells the kubelet it exists. The NVIDIA device plugin runs as a DaemonSet on GPU nodes, registers with the kubelet, and advertises an extended resource such as nvidia.com/gpu. Pods request whole units of that resource, and the scheduler treats each unit as indivisible.
The request shape is deliberately simple:
Extended resources have three hard limits. They are integers, so a pod cannot request half a GPU. They carry no attributes, so a pod cannot ask for a GPU with at least 40 GB of memory or a specific interconnect. They cannot be shared between containers through the resource API itself, so sharing needs a mechanism below the scheduler, such as MIG or time-slicing configured on the node. For whole-GPU training and large-model inference, none of this matters, and the device plugin path remains the most battle-tested option.
Node selection still applies. GPU nodes should carry labels for model and memory, and taints so ordinary pods do not land on expensive hardware. Our guides on nodeSelector, affinity, and anti-affinity and taints and tolerations for dedicated nodes cover the placement mechanics that sit under every GPU design in this article.
Utilization numbers explain why this discipline matters financially. Industry fleet measurements consistently show average GPU utilization in the single digits on general clusters, because whole-GPU allocation, partial job starts, and unshared inference replicas strand capacity. GPU scheduling on Kubernetes is therefore a cost program as much as a scheduling program, and its wins show up in hardware not purchased.
3. GPU Scheduling on Kubernetes with DRA: Requesting Devices by Attributes
Dynamic Resource Allocation, or DRA, replaces integer GPU counts with structured device requests. A DeviceClass describes a category of hardware using attribute filters, and a ResourceClaim asks for devices matching those filters. DRA reached general availability in Kubernetes 1.34, and it lets workloads request a GPU by memory, model, or sharing mode instead of a bare count.
A DeviceClass filters hardware with CEL expressions over driver-published attributes:
The claim is then referenced from the pod, and the DRA driver allocates concrete devices at bind time. Three capabilities matter most. Attribute selection ends the label-guessing game for heterogeneous fleets. Sharing a claimed device across containers, and in some configurations across pods, becomes expressible in the API. Device lifecycle becomes a first-class object, so allocation failures surface as claim status instead of opaque pending pods.
Adoption honesty matters here. DRA the Kubernetes API is GA, but GPU driver support has matured unevenly across vendors and versions, and some autoscalers historically could not provision nodes for DRA-only requests. Treat DRA as the direction of travel and verify your driver and autoscaler versions before committing a production fleet. Teams on older Kubernetes versions, or on whole-GPU workloads with homogeneous hardware, lose little by staying on device plugins until an attribute or sharing requirement forces the move.
Device plugin health is the foundation everything else stands on. If the plugin DaemonSet crashes on a node, that node's GPUs vanish from allocatable resources and pods queue with no obvious error on the pod itself. Alert on plugin restarts and on nodes advertising fewer GPUs than their hardware inventory. Those two signals catch the majority of silent capacity loss.
4. Sharing One GPU: MIG, Time-Slicing, and MPS
Sharing a GPU means choosing an isolation trade-off. MIG partitions supported NVIDIA GPUs into hardware-isolated instances with dedicated memory and compute. Time-slicing interleaves workloads on one GPU with no isolation. MPS shares a GPU between processes with software-level separation. Pick MIG for untrusted or multi-tenant work, and time-slicing only for trusted replicas.
MIG, Multi-Instance GPU, carves one physical GPU into up to seven instances on supported models such as A100 and H100, each with its own memory slice and compute slice, enforced in hardware. A fault or noisy neighbor in one instance does not consume another instance's memory bandwidth. The cost is rigidity: instance profiles are fixed sizes, changing the layout requires draining the GPU, and small leftovers can strand capacity. MIG fits inference fleets where many small models share large cards and isolation matters.
Time-slicing is the opposite trade. The device plugin advertises one GPU as several replicas, and workloads take turns on the device. There is no memory isolation, so one process can exhaust GPU memory and crash its neighbors. That is acceptable for replicas of the same trusted model in development or low-risk inference, and unacceptable across team boundaries. MPS, the Multi-Process Service, sits between the two: processes share the GPU through a control daemon with better concurrency than time-slicing, but isolation remains weaker than MIG.
A practical default: whole GPUs for distributed training, MIG for production inference sharing, time-slicing for development clusters. Revisit the choice when utilization data shows stranded capacity or when a memory fault in one tenant affects another. If you self-host models, our local LLM guide for DevOps covers the serving side that consumes these allocations.
DRA also changes how failures present. A ResourceClaim that cannot be satisfied reports its state directly, with allocation errors attached to the claim rather than buried in scheduler events. That visibility shortens diagnosis, but it requires runbooks that check claim status early. Teams migrating from device plugins should update their troubleshooting order at the same time as the manifests.
5. GPU Scheduling on Kubernetes: Queueing and Admission with Kueue
Kueue adds admission control in front of the scheduler. It holds jobs in queues until quota and capacity allow them to start, then admits them as a unit. For GPU scheduling on Kubernetes, Kueue prevents partial starts, enforces per-team GPU quotas, and lets teams borrow idle capacity with preemption when the owner returns.
Kueue's core objects map cleanly onto platform concepts. A ClusterQueue defines quota per resource and hardware flavor across the cluster. A LocalQueue is the namespace-level entry point teams submit to. ResourceFlavors describe hardware variants, such as one flavor per GPU model. A workload is admitted only when its full request fits the queue's quota, which is what makes multi-pod jobs start together instead of deadlocking.
Two settings decide most behavior. The queueing strategy controls whether a large job at the front blocks smaller jobs behind it or lets them pass when capacity exists. Cohorts group ClusterQueues so teams can borrow unused quota from each other, with preemption reclaiming borrowed capacity when the owning team submits work. Check the API version against your installed Kueue release, since the project has moved through beta versions and field details shift between releases.
Kueue deliberately does not place pods. After admission, the default scheduler or a batch scheduler binds pods to nodes. That separation is why Kueue fits managed clusters well: it adds queueing and fairness without replacing placement logic you already trust.
MIG layout planning should start from model memory footprints. List the inference models you serve, their memory needs at production batch sizes, and their latency targets. Choose profiles that fit the largest common model with headroom, and accept some stranded memory as the price of isolation. Revisit layouts quarterly, because model sizes change faster than hardware refresh cycles.
6. GPU Scheduling on Kubernetes: Gang Scheduling for Distributed Training
Gang scheduling starts all pods of a distributed job together or none of them. Without it, a training job can hold some GPUs while waiting for the rest, blocking other work and never making progress. Kueue provides gang behavior at admission time, while batch schedulers such as Volcano enforce it at placement time.
The deadlock is easy to picture. A job needs eight pods, each holding one GPU, and the cluster has six free. A pod-at-a-time scheduler starts six pods. Those six hold GPUs and wait for two peers that cannot start because no GPUs remain. A second job needing four GPUs also cannot start. The cluster reports high GPU allocation and zero training progress. Gang scheduling breaks the cycle by treating the job as one scheduling unit: admit and place all eight, or keep the whole job queued.
Admission-level gang behavior, as Kueue provides, solves the quota side: the job starts only when its full request fits. Placement-level gang behavior additionally guarantees the pods can bind simultaneously, which matters when topology constraints, such as keeping ranks within one rack or one NVLink domain, make placement itself the scarce resource. Many production setups combine both: queueing for fairness, placement-aware scheduling for topology.
Topology deserves explicit attention in GPU clusters. Training throughput depends on interconnect bandwidth between ranks, so pods scattered across racks can run far slower than pods placed within a high-bandwidth domain. Node labels for rack and topology zone, combined with affinity rules or topology-aware scheduling features, keep communicating pods close. Our guide on topology spread constraints and pod priority covers the placement controls involved.
Queue design should mirror team structure without copying it blindly. One ClusterQueue per team with cohort borrowing is the common starting point. Shared platform queues for platform-owned jobs keep infrastructure work from competing with product teams. Resist per-project queues at the start; they fragment quota and make borrowing arithmetic hard to reason about.
7. GPU Scheduling on Kubernetes: Autoscaling GPU Nodes Without Stranding Capacity
GPU node autoscaling must react to queued demand, not just pending pods. With admission control holding jobs back, the autoscaler needs visibility into queued workloads or it will see no pending pods and add no nodes. Pair queueing with an autoscaler that understands GPU flavors, and set consolidation rules that respect long-running training jobs.
Karpenter is the common choice on EKS for GPU pools because it provisions nodes shaped to pending pod requirements and consolidates underused nodes. Two cautions apply. First, consolidation must not evict pods from a running distributed job mid-training unless the job checkpoints and tolerates restarts; disruption budgets and do-not-disrupt settings exist for this. Second, verify DRA support in your autoscaler version before relying on DRA-only requests to trigger provisioning, since support arrived later than device-plugin support.
Spot capacity changes the economics and the risk. GPU Spot instances can cut cost sharply, and interruptions can kill a training run. The safe pattern is checkpointing: training frameworks save state periodically, and the job resumes from the last checkpoint on a replacement node. Inference replicas tolerate Spot better because each replica is independent. Our Karpenter NodePool patterns guide covers Spot, consolidation, and expiry settings that apply directly to GPU pools.
Quota and autoscaling must agree. If Kueue admits a job against quota but the cloud account has no GPU capacity in that zone, the job waits with nodes pending. Capacity reservations, multi-zone pools, and honest quota numbers keep admission promises aligned with what the cloud can actually deliver.
Preemption policy needs an explicit contract with job owners. State which priority tiers can preempt which, how much warning a preempted job gets, and what checkpointing is required to run in preemptible tiers. Publish preemption events to the owning team with the reason attached. Surprise evictions destroy trust in the queue faster than long waits do.
8. Comparison: Device Plugin vs DRA, and Sharing Modes
Device plugins win on maturity for whole-GPU workloads, while DRA wins when requests need attributes, sharing, or device lifecycle visibility. Among sharing modes, MIG gives hardware isolation with fixed profiles, MPS gives softer sharing with better concurrency, and time-slicing gives flexibility with no isolation. Match the mechanism to the trust boundary.
| Mechanism | Request model | Isolation | Best fit | Watch out for |
|---|---|---|---|---|
| Device plugin | Integer count | Whole GPU per pod | Homogeneous whole-GPU fleets | No attributes, no fractions |
| DRA | Attribute-filtered claims | Driver-defined | Heterogeneous fleets, sharing | Driver and autoscaler maturity |
| MIG | Fixed hardware profiles | Hardware memory and compute | Multi-tenant inference | Rigid sizes, drain to reconfigure |
| MPS | Shared processes | Software-level | Trusted concurrent workloads | Weaker fault isolation |
| Time-slicing | Advertised replicas | None | Development, same-model replicas | Memory faults cross workloads |
The decision sequence that works in practice: first decide the trust boundary, because it rules sharing modes in or out. Then decide whether requests need attributes, because that chooses between device plugin and DRA. Then decide admission and gang behavior, because that chooses the queueing layer. Teams that start from tool preference instead of these three questions usually rebuild the design within a year.
Cost belongs in the same conversation. GPU capacity is the most expensive line in most AI platform budgets, and stranded capacity from rigid partitioning or partial job starts shows up directly in spend. Our Kubernetes cost optimization guide with OpenCost covers measuring utilization per namespace so sharing decisions rest on data.
Spot GPU pools need interruption rehearsals. Simulate a node termination during a checkpointing training run and measure time to resume and work lost since the last checkpoint. Tune checkpoint intervals from that measurement rather than from habit. A checkpoint every thirty minutes on capacity interrupted hourly loses a quarter of compute on average, which can erase the Spot discount.
9. Troubleshooting GPU Scheduling Failures
GPU scheduling failures cluster into five causes: the device is not advertised, the request cannot be satisfied, the job is held by admission, placement constraints conflict, or the node lacks capacity. Diagnose in that order, from node advertisement up to queue status, because each layer masks the ones above it.
| Symptom | Likely layer | First check |
|---|---|---|
| Pod pending, no GPU resource on nodes | Device plugin | Node allocatable resources and plugin DaemonSet status |
| Claim pending with no allocation | DRA | DeviceClass selectors and ResourceClaim status |
| Job created but pods never appear | Admission | Kueue workload status and ClusterQueue quota |
| Some pods running, job makes no progress | Gang behavior | Whether all pods were admitted and placed together |
| Pods pending after admission | Placement | Taints, affinity, topology constraints on GPU nodes |
| Job waits while GPUs sit idle | Quota or flavor mismatch | ResourceFlavor labels versus node labels |
Two checks resolve most incidents quickly. First, compare what the node advertises with what the pod requests: a model or MIG profile mismatch hides behind a generic pending state. Second, read the workload and claim status objects before reading pod events, because admission and allocation decisions are recorded there with reasons. Pod events only show the final scheduling attempt.
Utilization illusions cause the remaining confusion. A GPU can report high memory use while doing little compute, because a framework reserved memory it is not using. Measure compute utilization and memory together, per job, before concluding the cluster is full. Many capacity requests dissolve once stranded reservations become visible.
Capacity planning closes the loop between scheduling and purchasing. Queue wait time by flavor tells you which GPU model is scarce. Utilization by sharing mode tells you whether partitioning can release capacity before new hardware arrives. Review both monthly with the teams consuming GPUs, because quota negotiations without shared data become contests of anecdotes.
10. GPU Scheduling on Kubernetes: A Reference GPU Platform Shape
A production GPU platform separates training and inference pools, queues training through admission control, shares inference GPUs with MIG where isolation matters, and autoscales each pool independently. This shape keeps long training jobs from starving latency-sensitive inference, and it gives each workload class the sharing and scheduling rules it actually needs.
The reference shape has four parts. A training pool of whole-GPU nodes, tainted for training, fronted by Kueue queues with per-team quotas and borrowing. An inference pool where MIG profiles match model sizes, with replicas spread across nodes for availability. A development pool with time-slicing and strict quotas, so experiments cannot consume production capacity. Shared platform services for metrics: GPU utilization, queue wait time, admission decisions, and cost per team.
Queue wait time is the metric teams forget. GPU utilization looks healthy while researchers wait hours for admission, and the platform gets blamed for slowness it cannot see. Publish queue wait percentiles per team alongside utilization. When wait time grows, the answer is usually quota rebalancing or capacity, and the data shows which.
Checkpointing policy belongs in the platform contract. Training jobs that cannot checkpoint should not run on Spot or on nodes subject to consolidation. State that rule in the platform documentation and enforce it with admission checks on node pool selection. The platform team's job is to make the safe configuration the default configuration, which is the same golden path principle applied to accelerators.
Runbook quality decides incident duration more than tooling does. Write the layer-ordered diagnosis into a one-page runbook with the exact commands for node advertisement, claim status, workload status, and pod events. Rehearse it with a deliberately broken test job each quarter. GPU incidents are rare enough that unrehearsed runbooks fail exactly when they are needed.
11. GPU Scheduling on Kubernetes: Operating GPU Fleets, Drivers, and Health
GPU fleets fail differently from CPU fleets: driver versions, device health, and partial GPU faults dominate incidents. Pin driver and device plugin versions per node pool, roll upgrades pool by pool with drained nodes, and monitor per-GPU health so a failing card is cordoned before it corrupts training runs.
Driver management is the highest-risk routine operation. The NVIDIA GPU Operator packages driver, toolkit, device plugin, and monitoring components, which reduces hand-assembled drift between nodes. Even with the operator, treat driver upgrades as node replacements: cordon, drain, upgrade, verify a test workload allocates the GPU, then return the node. In-place driver changes on nodes running training jobs invite the exact partial-failure states that are hardest to debug.
Health signals to alert on include GPU memory errors, repeated device plugin restarts, pods failing with device allocation errors, and nodes where advertised GPU count drops below physical count. That last signal catches cards that fell off the bus after a reboot. Automated cordoning on repeated health failures keeps bad hardware out of the schedulable pool without waiting for a human to notice a pattern across tickets.
Version planning ties the fleet together. Kubernetes version, DRA driver version, Kueue version, and autoscaler version form one compatibility matrix. Upgrade in an order that keeps every adjacent pair supported, and test the matrix in a staging pool with a real training job before production pools move. GPU platforms break at version seams more often than inside any single component.
Failure domains should be explicit in pool design. A training job spanning nodes in one availability zone survives a node failure but not a zone event. Decide per workload class whether zone resilience is required, and encode the decision in pool topology and queue flavors. Discovering the answer during a zone incident is the expensive way to learn it.
12. Final Checklist for GPU Scheduling on Kubernetes
GPU scheduling on Kubernetes is production-ready when devices are advertised reliably, requests match the sharing model, admission prevents partial starts, quotas reflect real capacity, and queue wait time is measured. Verify each layer separately, because a healthy layer above a broken one produces the most confusing pending states.
Before launch, confirm each item:
- GPU nodes advertise the expected resource count, and alerts fire when the count drops
- Node labels describe GPU model and memory, and taints keep non-GPU pods off GPU nodes
- Sharing mode matches the trust boundary: MIG for multi-tenant, time-slicing only for trusted work
- DRA driver and autoscaler versions are verified together if DRA requests are used
- Kueue quotas per team reflect capacity the cloud can actually provision
- Multi-pod jobs are admitted as a unit, with no partial starts observed in testing
- Training jobs on Spot or consolidating pools checkpoint and resume correctly
- Queue wait time and GPU utilization are published per team
- Driver upgrades roll pool by pool with drained nodes and allocation tests
- Runbooks diagnose in layer order: advertisement, claim, admission, placement, capacity
Start with whole GPUs and admission control, add sharing where utilization data justifies it, and adopt DRA when attribute-based requests solve a problem you actually have.
Fleet expansion should reuse the same pool shapes. New GPU models enter as new flavors and node pools, never as silent substitutions inside existing pools, because quota, MIG layouts, and training performance assumptions are model-specific. Announce new flavors with benchmark results from a reference training job so teams can choose with data.
Frequently Asked Questions
What is GPU scheduling on Kubernetes?
GPU scheduling on Kubernetes is how the control plane assigns GPU devices to pods. Device plugins or Dynamic Resource Allocation expose GPUs as requestable resources, sharing mechanisms such as MIG divide them, and queueing layers such as Kueue decide which jobs may start against quota.
What is the difference between device plugins and DRA?
Device plugins advertise GPUs as integer counts, such as nvidia.com/gpu, with no attributes or fractions. Dynamic Resource Allocation uses DeviceClasses and ResourceClaims so workloads can request devices by attributes like memory or model, and can express sharing. DRA reached general availability in Kubernetes 1.34.
When should you use MIG instead of time-slicing?
Use MIG when workloads from different teams or trust levels share a GPU, because MIG isolates memory and compute in hardware. Use time-slicing only for trusted workloads such as replicas of the same model, since time-slicing provides no isolation and one process can exhaust GPU memory for its neighbors.
How does Kueue help with GPU scheduling?
Kueue holds jobs in queues until quota and capacity allow the full job to start, which prevents partial starts that deadlock distributed training. It enforces per-team GPU quotas, supports borrowing idle capacity between teams, and preempts borrowed capacity when the owning team submits work.
What is gang scheduling and why do training jobs need it?
Gang scheduling starts all pods of a job together or none of them. Distributed training pods wait for each other, so starting only some pods strands GPUs and blocks other jobs. Gang behavior at admission or placement time keeps the job queued until it can run as a unit.
Can Karpenter autoscale GPU nodes for DRA workloads?
Karpenter provisions GPU nodes shaped to pending pod requirements on EKS, but DRA support arrived later than device-plugin support and varies by version. Verify your Karpenter and DRA driver versions together, and test that a DRA-only request triggers provisioning before relying on it in production.
Why are my GPU pods pending while GPUs sit idle?
Common causes are quota or ResourceFlavor mismatches in the queueing layer, taints or affinity rules excluding the idle nodes, MIG profile mismatches, or a job held by admission because its full request does not fit. Check workload and claim status before pod events to find the deciding layer.
Preparing for Senior Platform & SRE Interviews
Practice real-world cluster triage, RBAC debugging, and pod scheduling scenarios in our Kubernetes scenario interview questions hub.
Explore Interview Scenarios →