Why Kubernetes gang scheduling matters for distributed training
Gang scheduling matters when a distributed training job needs all of its pods running before any useful work starts, and the default scheduler places pods one at a time. Gang scheduling means a group of pods is admitted only when every pod in the group can be placed, so no worker starts and waits for peers that never arrive. A platform team sharing GPUs across several teams will see this pattern quickly: a job with eight workers gets five GPUs, those five pods start, sit at a collective communication barrier, and hold their GPUs while the other three wait in Pending. If other jobs fill the remaining capacity, the partial job can stall for hours. The GPUs look busy in utilization dashboards, yet little training progresses. That is the deadlock and idle-GPU pattern the rest of this page addresses.
Gang scheduling is worth the design effort when your jobs are multi-pod and synchronous, such as data-parallel or model-parallel training that exchanges gradients every step, and when the cluster is contended enough that partial placement is likely. Default scheduling is usually enough for single-pod jobs, stateless inference replicas that can scale independently, or clusters with spare capacity where all pods of a job nearly always fit. Decide early by checking how often jobs sit partially running, how long GPUs stay idle during startup, and whether your training framework can tolerate a missing worker. Confirm the current status of the Workload API and PodGroup in the Kubernetes version you run, along with the scheduler plugins or batch scheduler your distribution supports, because maturity and defaults have changed between releases. Also review the Kubernetes version skew policy before you upgrade scheduler components that the gang logic depends on.
How the Workload API, PodGroup, scheduler and Kueue fit together
The path starts with a training job's pods, which reference a group object that declares the minimum members needed to start. The scheduler admits the group only when that minimum can be placed together, so a partial set never holds GPUs while waiting. Kueue sits upstream as the queue and admission layer when several teams share quotas, deciding which job is allowed to reach the scheduler at all. Treat this as a conceptual view: confirm the object kinds, API versions and component names against the Workload and PodGroup support in the Kubernetes release and scheduler plugin you run.
Conceptual view of how a training job moves from queue admission to all-or-nothing placement.
Gang scheduling options and when each fits
This table compares native all-or-nothing scheduling, Kueue admission and third-party batch schedulers across what each decides, what it needs from the job spec, how it handles preemption and the operating effort it adds. Read each row against your own queue model: a team that only needs fair quota sharing has different needs from one that must place every worker of a job at once. Confirm supported features against each project's documentation before you commit to a design.
| Decision point | Native Workload API and PodGroup | Kueue admission | Third-party batch scheduler |
|---|---|---|---|
| What it decides | Placement: whether the pods of one group can all be bound to nodes together | Admission: whether the whole job may start now, based on quota and flavors | Placement and sometimes queue ordering, depending on the scheduler's design |
| What it needs from the job spec | Pods labeled and linked to a PodGroup with a minimum member count | Job set to suspended and tied to a LocalQueue; pods need no gang fields | Scheduler name and group annotations or labels defined by that scheduler |
| Handling of quota | Does not manage team quota; confirm how it interacts with your quota objects | Core purpose: holds whole jobs until quota exists, with fair sharing options | Varies by product; often adds its own queue or quota layer |
| Preemption behavior | Confirm which preemption features apply to a whole group in your release | Supports preemption of admitted workloads under configured policies; confirm options | Depends on the scheduler; check whether it evicts whole groups or single pods |
| Fit with GPU topology | Good for placing a group where its minimum members fit the node set | Uses resource flavors to steer jobs toward GPU node pools | Often offers topology or network-aware placement; verify against your hardware |
| Operating effort added | Feature gate and version checks, and a new object type to manage | Controller install, queue design and quota reviews across teams | Separate control plane to upgrade, support and secure alongside the cluster |
| Typical fit | Teams that need all-or-nothing placement with minimal extra components | Shared GPU clusters where fair access and whole-job admission matter most | Specialized training fleets with topology needs or an existing scheduler standard |
| What to confirm first | Support status and required feature gates for your Kubernetes minor version | Compatibility with your training operator and how preemption is configured | Upgrade path, security review and whether it is in your support scope |
Choosing a setup by cluster situation
When one team owns the cluster and runs distributed training jobs, the main risk is a job that starts with some of its workers placed and then waits forever for the rest. Scheduler-level gang support is usually the first need, because it holds every pod of a job until the full group can be placed. Kueue is often unnecessary at this scale unless the team wants queue ordering or quota bookkeeping for several projects. Preemption is simpler here, since the team controls which jobs may be evicted and can usually rely on priority classes alone.
- Gang support first: Confirm that the chosen scheduler or Workload API integration places all pods of a training job together and releases none of them until the group fits.
- Kueue optional: Add Kueue only if the team needs ordered queues, fair ordering between projects or admission limits on total GPUs.
- Simple preemption: Use priority classes to decide whether a long-running job may be evicted for a higher-priority run, and document which checkpoints make eviction safe.
- Node pool layout: Confirm GPU node pools, interconnect topology and any reserved capacity so that gang placement does not fragment the cluster.
- Failure handling: Check how a single failed worker restarts the whole group and where checkpoints are written.
Confirm with the training owners how often jobs are restarted, which checkpoint format they use and whether any job needs a fixed topology.
When several teams submit training jobs to the same GPUs, gang scheduling alone does not decide who runs next. Kueue is usually needed for cluster and local queues, quotas per team, borrowing rules and fair sharing, and it is normally paired with a gang-aware scheduling mechanism so admitted jobs start as complete groups. Preemption becomes a policy question: teams need to know whether a job that borrowed idle capacity can be reclaimed, how much notice it gets and which jobs are protected. Quota design usually starts from agreed team shares rather than from the scheduler defaults.
- Both layers: Plan Kueue admission for ordering and quota, and a gang-aware scheduling path so admitted workloads do not sit half-placed.
- Quota and borrowing: Decide nominal quotas per team and whether idle GPUs can be borrowed, then test reclamation with real job sizes.
- Preemption policy: Write down which workloads can be preempted, in what order and whether they must checkpoint first.
- Protected workloads: Identify long jobs or deadline-bound runs that should be excluded from reclamation.
- Quota reviews: Set a cadence for reviewing team shares as priorities change.
Confirm with each team lead what share they expect, which jobs they consider safe to preempt and who approves exceptions to the quota model.
When the same GPU pool also serves online inference, the cluster has two workload types with different tolerances. Inference endpoints need steady capacity and fast recovery, while training jobs tolerate waiting and restarts. Preemption design becomes the central decision: training may be evicted to protect inference, but only if the training jobs checkpoint often enough to resume. Many teams separate inference onto reserved capacity or a dedicated node pool and let training borrow what is left, so that gang admission and reclamation do not affect serving latency.
- Reserved inference capacity: Decide how many GPUs stay reserved for serving and keep them out of training quotas.
- Priority and preemption: Set priority classes so inference can reclaim training capacity, and confirm the grace period needed for checkpoints.
- Gang and admission layers: Expect Kueue for training admission and a gang-aware scheduler, with inference pods kept outside the gang logic.
- Autoscaling interaction: Check that inference autoscaling does not trigger repeated training evictions during traffic peaks.
- Observability: Track queue wait time, preemption counts and inference latency together so trade-offs are visible.
Confirm with the inference and training owners what latency targets apply, how much preemption each side accepts and who is on call when reclamation affects a running job.
How to set up gang scheduling on a self-managed cluster
This sequence takes a self-managed Kubernetes cluster from a version check to a verified all-or-nothing scheduling setup for distributed training, with a rollback path recorded before production jobs run.
Confirm the Kubernetes minor version
The cluster administrator checks which minor version the cluster runs and compares it with the releases the project still maintains. The researched facts list 1.35, 1.36 and 1.37 as supported as of September 2026, with 1.37 receiving support until October 28, 2027. Confirm the current list on the Kubernetes releases page before you choose a batch component, because the scheduling APIs you depend on change between versions. Done when the cluster's minor version appears in the maintained list and the team has recorded the version in its change ticket.
Verify control plane and kubelet skew
Before enabling any new scheduling feature, the platform engineer confirms the version skew between kube-apiserver, kube-controller-manager, kube-scheduler and the kubelets. The version skew policy requires kube-apiserver to be the newest component, and kubelets may be up to three minor versions older than kube-apiserver. Run the version query against every node and each control plane component. Done when every component reports a version inside the allowed skew, and any node outside it is scheduled for upgrade before you continue.
Enable and confirm the required API and feature gates
The cluster administrator enables the API groups and feature gates that the chosen gang scheduling approach requires, following the documentation for the Kubernetes version in use and the component's own install notes. Confirm the API resources are served with a discovery command such as
kubectl api-resources, and check the scheduler logs for any rejected or deprecated gates. Done when the workload API resource appears in discovery output and a dry-run apply of a sample object succeeds without validation errors.Define groups and minimum member counts per job type
The ML platform lead and the cluster administrator write one grouping object for each job type, such as a data-parallel training run or a multi-node inference group, and set the minimum number of members that must schedule together. The minimum should match the number of workers the job needs to make progress, not the number it would like. Store these objects in Git so changes are reviewed. Done when each grouping object validates and its status reports the expected minimum member count before any pod is created.
Install and configure the queue or batch component
The platform engineer installs the chosen queue or batch component, such as Kueue or a scheduler plugin that supports pod groups, and points it at the GPU resource flavors and queues defined for the cluster. Configure the component to admit whole groups only, and confirm its controller pods are running and that its admission status is reported on new workloads. Done when the controller reports ready, its logs show no reconciliation errors, and a queue object shows an admitted or pending state for a test workload.
Run a test job missing one worker
The platform team submits a test training job that declares a group of four workers but deliberately requests only three, or launches one worker fewer than the minimum. The expected result is that no worker starts and the group remains pending. Check the pod states, the group status and the scheduling events to confirm that no partial set of pods holds GPUs. Then add the missing worker and confirm all members schedule together. Done when the partial run shows zero running pods with GPUs allocated, and the complete run starts all members in the same scheduling cycle.
Record and rehearse the rollback path
The cluster administrator writes down how to disable the gang scheduling component and return jobs to the default scheduler, including the commands, the order of steps and the owner of each step. Confirm which running jobs would be affected and whether pending groups would be released or left stuck. Rehearse the rollback in a non-production cluster, and store the runbook next to the change record. Done when the rehearsal restores default scheduling for a test job and the runbook has been reviewed by the operations team.
Security and access controls for gang-scheduled jobs
Gang scheduling places many pods at once, so one permission, quota or secret decision can affect an entire training job. The cards below cover the controls that matter once groups of pods are admitted, preempted and run together, and what to verify in your own cluster before the first multi-node job starts.
RBAC on grouping objects
Limit who can create, update and delete PodGroups and the workload objects that reference them. A user who can change a group's minimum member count or attach pods to a group can alter when a job is admitted or what it displaces. Grant these verbs only to the training platform's service accounts and the team leads who submit jobs, and review bindings after each scheduler upgrade, since the API surface for grouping objects may change between releases. Confirm the exact resource names in your scheduler's documentation.
Authentication docsPod Security Admission for device access
GPU training pods often need host device access, privileged settings or relaxed capabilities that the Restricted standard blocks. Pod Security Admission enforces one of three standards per namespace, so place GPU training workloads in a dedicated namespace with a deliberately chosen level instead of loosening the whole cluster. Document which fields each team needs, verify that the NVIDIA device plugin and driver components are admitted under the chosen level, and confirm the namespace label is set on every namespace that runs gang-scheduled jobs.
Pod Security StandardsQuota and priority classes
A gang that needs eight GPUs either gets all of them or waits, so one large job can hold capacity that smaller teams expect. Pair ResourceQuota objects per namespace with PriorityClass values that reflect business ownership, and decide which classes may preempt others. Without these limits, a single team can starve the rest of a shared pool, and a misconfigured priority can cause repeated evictions of long-running training. Ask your platform owner to write the policy as a table before the scheduler is enabled.
Secrets and dataset credentials
Dataset keys, object storage credentials and registry tokens are often mounted into every worker in a gang. Kubernetes Secrets are stored unencrypted in etcd by default, so enable encryption at rest for the API server and restrict get, list and watch on Secrets with least-privilege RBAC. Where possible, pull short-lived credentials from an external store through the Secrets Store CSI Driver, and avoid placing long-lived keys in environment variables that appear in pod specifications.
Secrets good practicesAudit logging of admission and preemption
When a gang is rejected, admitted late or preempted, the cluster's audit trail is often the only record of why. Configure API server audit policy to capture create, update and delete events for PodGroups, Pods, Jobs and PriorityClass changes, and record scheduler events and Kueue admission decisions where those tools are used. Confirm that logs leave the cluster to a store your security team controls and that retention meets your internal policy, which you should set with your compliance owner.
Node isolation for GPU pools
Keep GPU nodes in a dedicated pool, labeled and tainted so that only approved training workloads land there. Pair a taint on GPU nodes with a matching toleration and node selector in the training namespace, and restrict who can modify node labels and taints, because changing them can move a gang onto hardware it should not use. Review whether shared hosts run untrusted or multi-tenant workloads alongside training, since a GPU pool with mixed trust levels needs stronger isolation than a single-team pool.
How workload-aware preemption changes what gets evicted
Gang-aware preemption should evict whole groups, not individual pods. A distributed training run is only useful when every worker is running, so removing one worker leaves the remaining workers stalled while they keep holding GPUs. Pod-level preemption, the default behavior of many schedulers, can therefore destroy the most expensive part of a job and still free almost no usable capacity. Before you rely on any preemption path, confirm whether the scheduler or Kueue version you run treats a PodGroup or Workload as the unit of eviction, and check how it chooses victims when several groups compete for the same GPUs.
Whole-group eviction moves the cost onto training progress. Every preempted run loses the steps since its last checkpoint, so checkpoint frequency and storage throughput become scheduling concerns, not only training concerns. Ask each team what checkpoint interval they use, how long a save takes on your storage, and whether the job can resume from the latest checkpoint without manual intervention. Graceful termination settings matter here too: confirm the grace period the pods receive before a forced kill, and whether the training framework flushes a final checkpoint on SIGTERM. A short grace period on a large model can turn an orderly eviction into a corrupted or missing checkpoint.
Priority design decides who gets evicted. If every team uses the same priority class, preemption becomes a race to the bottom, and the job with the least progress may be the one that loses. Define priority tiers across teams in writing, decide whether production inference and long-running pretraining share a tier, and set limits so one team cannot preempt another's guaranteed quota indefinitely. Repeated preemption cycles are the failure to plan for: two large gangs can keep evicting each other and make little progress. Test this on your own GPU pool with a deliberately oversubscribed queue, measure how often each group is evicted and restarted, and add a minimum runtime or backoff rule if the numbers show churn.
Limits to confirm before you commit to a design
Gang scheduling depends on API availability, operator behavior, queue integration and hardware choices that differ between clusters. Each card below is a question to answer in your own environment before you commit to a design, because a wrong answer on any one of them can leave training jobs half-scheduled.
Is the Workload API available and stable?
Confirm that the Workload API and PodGroup objects exist in the exact Kubernetes minor version you run, and whether they are enabled by default or behind a feature gate. Check the maturity level your release documents for them, because an alpha or beta API can change shape between upgrades. Review the release notes for each minor version you plan to run through your upgrade window, and record which API versions your schedulers and controllers expect.
Kubernetes releasesDo your training operators set the fields?
Gang scheduling only works if the object that creates your worker pods sets the group fields the scheduler reads. Ask each operator you use whether it creates a PodGroup or a Workload reference, whether it sets minimum member counts and scheduling names, and whether those fields survive restarts and job retries. Test with a job that has a deliberately missing worker to see whether the whole group waits or partially starts.
How does the queue component interact?
Determine who decides admission and who decides placement. If a queue manager such as Kueue admits a job before the scheduler sees its pods, a gang check in the scheduler may never fire, or the two may disagree about quota. Confirm which component owns preemption, whether suspended jobs hold any reserved capacity, and how the queue reports a job that is admitted but not yet fully placed.
What happens on node failure and autoscaling?
Test how a group behaves when one GPU node fails mid-run, when a node drains for maintenance, and when a cluster autoscaler adds nodes slowly. Confirm whether the group is rescheduled as a unit, whether a checkpoint restart is triggered, and whether a partially provisioned group holds nodes that other teams cannot use. Record the timeout you set for waiting on the full group and who is paged when it expires.
Do GPU sharing modes conflict?
Whole-GPU gang placement assumes each pod takes complete devices. If your nodes use time-slicing or MIG partitions, confirm that the scheduler counts the shared resources correctly and that a group of pods does not split across partitions in a way the training framework cannot use. Check whether the device plugin reports partitioned resources under names the gang logic can match, and test a mixed node pool before you rely on it.
Does your distribution support the APIs?
Confirm with your vendor or community distribution maintainer that the Workload and PodGroup APIs are enabled, not just present in upstream code. Check whether the distribution ships its own scheduler, pins feature gates, or lags the upstream release in ways that change behavior. Ask for written confirmation of the version and any patches applied, because a managed control plane may not expose the feature gates you need.
CNCF conformance programQuestions teams ask before adding gang scheduling
What drives the effort of adding gang scheduling to a training cluster?
The main drivers are cluster size, the number of distributed job types, the versions of the training operators and scheduler components in use, whether Kueue already admits jobs, and how preemption is meant to behave. Each job type needs its pod group definition, minimum member count and failure behavior mapped. A cluster with one operator and one job pattern is a small design task. A shared cluster with several operators, Kueue queues and mixed priority classes needs the admission and preemption rules agreed across teams first. Ask any partner to show how each of these factors changes the written scope.
Can our internal platform team set up gang scheduling without outside help?
Yes, if the team already runs Kubernetes scheduling components, has GPU nodes working, and can test with realistic distributed jobs before production use. The harder parts are usually not the install but the decisions: which scheduler or admission layer owns gang decisions, how partial failures are handled, and who approves quota and priority changes. Teams without recent scheduler experience often benefit from an outside design review, then carry out the build themselves. Check the relevant upstream release notes for the exact API maturity in your version before committing to a design.
What do we need to provide for a gang scheduling engagement?
Expect to provide access to GPU nodes in a non-production or staging cluster, at least one representative distributed training job that can be run repeatedly, and a named owner who can approve quota and priority rules. You will also need the current Kubernetes version, operator versions and any Kueue configuration, plus your monitoring access for scheduling events. Without a test workload that actually stalls on partial placement, verification is weak. Confirm access arrangements and change windows in the written scope.
How long does a scoped gang scheduling engagement take?
The duration depends on the environment, not on a fixed template. The factors are the number of clusters and node pools, how many job types must be covered, how quickly approvals for quota and priority rules arrive, and whether GPU node access and a test workload are ready at the start. A cluster with clear ownership and a reproducible stall case moves faster than one where preemption policy is still disputed. Ask for a timeline tied to named milestones and the dependencies you must clear.
What recurs after gang scheduling goes live?
Gang scheduling is not a one-time setting. After go-live, the recurring work includes checking compatibility when Kubernetes minor versions change, since the version skew policy requires the API server to be upgraded one minor version at a time and kubelets may trail it by up to three minor versions. Training operator, scheduler and Kueue upgrades also need retesting of gang behavior, and quota or priority changes need review. Plan a regular test run with a stalled-job scenario so regressions show up before a large training run is affected.
How is the cost split between one-time design and ongoing operation?
One-time costs cover discovery, the scheduling and admission design, the build and integration with existing operators, and verification with test jobs. Recurring costs cover upgrades, operator changes, skew checks, monitoring review and periodic retesting, and they continue for as long as the cluster runs distributed training. Ask any quote to separate these two lines, and to state which items are fixed and which depend on the number of job types and clusters. DeployOpen plans engagements as fixed scope agreed in writing, and ongoing support is available as a retainer.
Should we choose the Workload API and PodGroup or Kueue for admission?
Both address partial placement, but they answer different questions. The Workload API and PodGroup concepts let the scheduler place a group of pods all together. Kueue decides whether a job is admitted to run at all, based on queues, quota and fair sharing. Many teams use both, with Kueue controlling admission and gang placement handling the group. Confirm the supported combination for your Kubernetes and operator versions with the upstream documentation before choosing.
How DeployOpen scopes and delivers gang scheduling
DeployOpen approaches gang scheduling as a written, fixed-scope piece of work inside a cluster you control. We start from your training jobs, queue design and existing scheduler, then build, test and document the all-or-nothing behavior before your teams depend on it.
How we scope
- Inventory which distributed training jobs need all-or-nothing placement and which can run with partial capacity.
- Confirm the Kubernetes version, scheduler setup and whether Kueue is already in use for admission.
- Agree in writing how the Workload API, PodGroup objects and preemption rules will be tested.
- Engagements are fixed-scope, with deliverables and timelines confirmed before work starts.
How we build
- Configure the gang scheduling components on your cluster, with PodGroup definitions matched to each training job type.
- Set workload-aware preemption rules so a waiting gang cannot hold part of the GPUs it needs indefinitely.
- Test deadlock scenarios with deliberately oversubscribed queues and confirm no half-scheduled job remains.
- Document the design choices, including how Kueue admission and gang scheduling divide responsibility.
How we hand over
- Deliver the configuration as versioned manifests, with a description of every PodGroup and priority setting.
- Provide a runbook covering stuck gangs, preemption events and the steps to diagnose a pending job.
- Walk your platform and training teams through the design and the verification results.
- Record the open items, such as features that depend on your Kubernetes version, for your own follow-up.
How we support
- Support is available as a retainer for upgrades, scheduler changes and new training frameworks.
- Retesting covers gang behavior after Kubernetes upgrades, scheduler updates and changes to GPU node pools.
- Ask any provider to confirm which scheduler features are available in your exact Kubernetes version before committing.

