Experimental: GPU/KAI fields and related custom resources are subject to breaking changes. Set spec.experimental.gpuKaiContract: v1alpha1-2026-07.
GpuConsolidationPolicy is a cluster-scoped controller that looks at scheduled pods carrying the gpu-fraction annotation and tries to consolidate them off an underutilized node.
Behavior
- The controller scans all scheduled, non-terminal pods with
metadata.annotations["gpu-fraction"]. spec.nodeSelectoris required and uses standard Kubernetes label selector semantics.- Each policy defines one compatibility pool. Create multiple policies when you need multiple compatible node pools.
- Only nodes selected by
spec.nodeSelectorare considered compatible for candidate selection and destination placement. - Selected nodes are expected to be mutually compatible for GPU workload movement.
- Node GPU capacity is taken from
status.allocatable["nvidia.com/gpu"]. - Nodes with utilization below
spec.utilizationThresholdPercentare candidates, but nodes with no GPU-fraction pods are ignored. - Candidates are evaluated from most underutilized to least underutilized.
- A node is consolidated only when every GPU-fraction pod on that node can fit onto other non-empty GPU nodes without exceeding their allocatable capacity.
- The controller evicts all pods from the first drainable candidate node it finds in a reconcile loop.
- Eviction is node-wide for a selected consolidation candidate: once a node is marked for consolidation, every evictable pod on that node is targeted, including pods without workload owners such as static pods.
- Reconciliation is policy-driven: the controller runs on
GpuConsolidationPolicychanges and on the periodic timer fromspec.requeueAfter. - Pod and Node changes do not trigger immediate rescans.
- If no node can be fully drained, the controller records that outcome in status and waits for the next
spec.requeueAfter.
Examples
Notes
- This policy is cluster-scoped only.
spec.nodeSelectoris the compatibility boundary for consolidation.- It is self-contained and does not reference
AutomationStrategy. - Consolidation is based on GPU-fraction capacity only; it does not model CPU, memory, or scheduler affinity constraints.
- Consolidation drain behavior is not limited to GPU-fraction pods. After a node is selected, the node is drained by evicting all evictable pods on it, even when some of those pods do not have owners.
- If
spec.nodeSelectormatches no nodes, the policy reportsNoMatchingNodeSelectorand performs no evictions. - If you need faster reaction to workload churn, lower
spec.requeueAfter.

