Workload
apiVersion: scheduling.k8s.io/v1alpha2
import "k8s.io/api/scheduling/v1alpha2"
Workload
Workload allows for expressing scheduling constraints that should be used when managing the lifecycle of workloads from the scheduling perspective, including scheduling, preemption, eviction and other phases. Workload API enablement is toggled by the GenericWorkload feature gate.
| Field | Description |
|---|---|
apiVersionstring |
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
kindstring |
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
metadataObjectMeta |
Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata |
spec *WorkloadSpec |
Spec defines the desired behavior of a Workload. |
WorkloadSpec
WorkloadSpec defines the desired state of a Workload.
| Field | Description |
|---|---|
controllerRefTypedLocalObjectReference |
ControllerRef is an optional reference to the controlling object, such as a Deployment or Job. This field is intended for use by tools like CLIs to provide a link back to the original workload definition. This field is immutable. |
podGroupTemplates *PodGroupTemplate array |
PodGroupTemplates is the list of templates that make up the Workload. The maximum number of templates is 8. This field is immutable. |
WorkloadList
WorkloadList contains a list of Workload resources.
| Field | Description |
|---|---|
apiVersionstring |
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
items *Workload array |
Items is the list of Workloads. |
kindstring |
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
metadataListMeta |
Standard list metadata. |
PodGroupTemplate
PodGroupTemplate represents a template for a set of pods with a scheduling policy.
| Field | Description |
|---|---|
disruptionModestring |
DisruptionMode defines the mode in which a given PodGroup can be disrupted. One of Pod, PodGroup. This field is available only when the WorkloadAwarePreemption feature gate is enabled. Possible enum values: - `"Pod"` means that individual pods can be disrupted or preempted independently. It doesn't depend on exact set of pods currently running in this PodGroup. - `"PodGroup"` means that the whole PodGroup needs to be disrupted or preempted together. |
name *string |
Name is a unique identifier for the PodGroupTemplate within the Workload. It must be a DNS label. This field is immutable. |
priorityinteger |
Priority is the value of priority of pod groups created from this template. Various system components use this field to find the priority of the pod group. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority. This field is available only when the WorkloadAwarePreemption feature gate is enabled. |
priorityClassNamestring |
PriorityClassName indicates the priority that should be considered when scheduling a pod group created from this template. If no priority class is specified, admission control can set this to the global default priority class if it exists. Otherwise, pod groups created from this template will have the priority set to zero. This field is available only when the WorkloadAwarePreemption feature gate is enabled. |
resourceClaimsPodGroupResourceClaim array patch strategy: merge,retainKeys on key name
|
ResourceClaims defines which ResourceClaims may be shared among Pods in the group. Pods consume the devices allocated to a PodGroup's claim by defining a claim in its own Spec.ResourceClaims that matches the PodGroup's claim exactly. The claim must have the same name and refer to the same ResourceClaim or ResourceClaimTemplate. This is an alpha-level field and requires that the DRAWorkloadResourceClaims feature gate is enabled. This field is immutable. |
schedulingConstraintsPodGroupSchedulingConstraints |
SchedulingConstraints defines optional scheduling constraints (e.g. topology) for this PodGroupTemplate. This field is only available when the TopologyAwareWorkloadScheduling feature gate is enabled. |
schedulingPolicy *PodGroupSchedulingPolicy |
SchedulingPolicy defines the scheduling policy for this PodGroupTemplate. |
© 2026 The Kubernetes Authors | Documentation Distributed under CC BY 4.0
Copyright © 2026 The Linux Foundation ®. All rights reserved.
https://kubernetes.io/docs/reference/kubernetes-api/scheduling/workload-v1alpha2/