Kubernetes normally schedules Pods individually. That works well for many applications, but it can create problems when several Pods must run together before a workload can make progress.
AI training jobs and large batch workloads are common examples. A training job may need several workers to start at the same time. If Kubernetes schedules only some of those workers, the remaining Pods can stay pending while the already-running Pods consume cluster resources.
Kubernetes 1.37 moves workload-aware scheduling further by graduating the Workload and PodGroup APIs, gang scheduling, workload-aware preemption, and DRA ResourceClaims for workloads to Beta. It also adds the Alpha CompositePodGroup API for more complex hierarchical workloads.
Why Pod-by-Pod Scheduling Can Be a Problem
Consider a distributed training job that needs four worker Pods.
With normal scheduling, Kubernetes can place them one at a time:
Worker 1 -> Running
Worker 2 -> Running
Worker 3 -> Running
Worker 4 -> PendingThe first three workers may consume GPUs, CPU, memory, or other resources while the fourth worker waits.
The application may not be able to start useful work until all four workers are available.
This creates two problems:
Resources are occupied by a workload that cannot make progress.
Other workloads may be prevented from using those resources.
Gang scheduling addresses this by treating the group as a scheduling unit.
What Is Workload-Aware Scheduling?
Workload-Aware Scheduling, or WAS, adds scheduling information at the workload level.
Instead of describing only individual Pods, Kubernetes can represent a group of Pods and define how that group should be scheduled.
The main objects are:
WorkloadPodGroupCompositePodGroup
The Workload API describes the scheduling requirements and structure of a multi-Pod application.
The PodGroup represents the runtime scheduling state for a group of Pods.
In Kubernetes 1.37, these APIs are part of the Beta workload scheduling model. The Workload API uses the scheduling.k8s.io/v1beta1 API version.
A simplified relationship looks like this:
Workload
|
| defines scheduling intent
v
PodGroup
|
| represents runtime group
v
PodsThis separation is useful because workload controllers can manage application lifecycle while the scheduler focuses on how the related Pods should be placed.
Gang Scheduling
Gang scheduling is one of the most important parts of the Kubernetes 1.37 update for AI and batch workloads.
The basic rule is:
Schedule enough Pods for the workload to make progress, instead of treating every Pod as an independent scheduling decision.
For example:
apiVersion: scheduling.k8s.io/v1beta1
kind: Workload
metadata:
name: training-workload
spec:
podGroupTemplates:
- name: workers
schedulingPolicy:
gang:
minCount: 4Here, minCount: 4 means that the scheduler should not consider the group successfully scheduled until at least four Pods can be scheduled.
The exact Pod creation and controller relationship depends on the workload controller managing the application.
This is different from simply giving four Pods the same label. A label groups objects logically, but it does not tell the scheduler that those Pods have an all-or-nothing scheduling requirement.
Why minCount Matters
The minCount value lets you define how many Pods need to be scheduled for the workload to make progress.
Suppose a batch job creates eight Pods:
parallelism = 8You might not need all eight to start before useful work can begin.
You could define:
schedulingPolicy:
gang:
minCount: 4The scheduler can then work toward getting four Pods placed together.
For a tightly coupled distributed training job, you may instead require all workers:
schedulingPolicy:
gang:
minCount: 8The right value depends on the application.
Do not automatically set minCount equal to the total number of Pods. Some workloads can make progress with fewer workers, while others cannot.
Workload-Aware Preemption
Kubernetes 1.37 also graduates workload-aware preemption to Beta.
Traditional preemption considers Pods individually. Workload-aware preemption changes that model for PodGroups.
When a PodGroup cannot be scheduled, the scheduler can treat the group as the preemption unit instead of making independent decisions for individual Pods.
Imagine a training workload that needs four GPUs:
Node A: 1 GPU available
Node B: 1 GPU available
Node C: 2 GPUs availableThe workload needs four GPUs in a placement that satisfies its scheduling requirements.
Removing one unrelated Pod from Node A might not help if the remaining placement constraints still prevent the complete workload from running.
Workload-aware preemption evaluates whether preemption can actually make the workload schedulable.
That avoids some cases where Kubernetes evicts a lower-priority Pod but the waiting workload still cannot start.
Topology-Aware Scheduling
Resource quantity is not always enough for AI workloads.
Two Nodes may both have GPUs, but the distance between those GPUs and the rest of the workload can affect communication performance.
Kubernetes already has topology-aware workload scheduling capabilities, and Kubernetes 1.37 continues to develop this area.
A PodGroup can specify a topology key:
spec:
schedulingPolicy:
gang:
minCount: 4
schedulingConstraints:
topology:
- key: topology.kubernetes.io/rackThis tells the scheduler that the workload has a topology requirement around the specified domain.
For distributed workloads, this can help keep related Pods within an appropriate physical or logical boundary.
Topology requirements should be based on the actual architecture of the workload. Adding unnecessary constraints can make scheduling harder because the scheduler has fewer valid placements.
DRA and Specialized Resources
AI workloads frequently need resources such as GPUs and other specialized devices.
Dynamic Resource Allocation, or DRA, provides a Kubernetes-native way to request such resources.
Kubernetes 1.37 allows DRA ResourceClaim and ResourceClaimTemplate information to be associated with workloads and PodGroups. This is useful when multiple Pods need coordinated access to specialized resources.
The model can be thought of as:
Workload
|
+-- PodGroup
|
+-- ResourceClaim
|
v
Specialized deviceThis becomes particularly useful when scheduling depends on both the number of Pods and the resources available to those Pods.
Kubernetes 1.37 also graduates DRA extended resource support to Stable. That allows a DRA driver to satisfy traditional extended resource requests through a DeviceClass.
Workload Scheduling for Batch Jobs
Kubernetes 1.37 adds scheduling configuration directly to the Job API.
A Job can use a spec.scheduling field to configure scheduling policies, topology constraints, disruption behavior, and resource claims.
If the field is omitted, the Job keeps Basic scheduling behavior.

Join the conversation! Your thoughts help the community grow.