By default, batch jobs have a minMember of 1, meaning pods are scheduled independently. Use the kai.scheduler/min-member annotation to require a minimum number of pods to be scheduled together (gang scheduling).
kubectl apply -f batch-job-min-member.yamlThis creates a job with parallelism: 6 but requires at least 2 pods to be schedulable before any pod starts running. The annotation value must be a positive integer.
Use external-podgroup-job.yaml when the PodGroup is created manually or by another controller and the Job should join it without podgrouper interference.
kubectl apply -f external-podgroup-job.yamlThis example shows:
- An explicit
PodGroupresource with queue and subgroup definitions. kai.scheduler/skip-podgrouper: "true"on the Job.pod-group-nameon the pod template annotations.kai.scheduler/subgroup-nameon the pod template labels.