Enable the scheduler
Before you can submit Pods to the SUNK Pod Scheduler, you must enable it in the Slurm Helm chart and tell it which namespaces to watch. Setscheduler.enabled to true in your Slurm Helm chart values:
- To monitor the entire cluster, set
scheduler.scope.typetocluster. - To monitor specific namespaces, set
scheduler.scope.typetonamespaceand setscheduler.scope.namespacesto a comma-separated list of namespaces. Ifscheduler.scope.namespacesis blank, the scheduler defaults to the namespace where it’s deployed.
Configure a Pod for scheduling
With the scheduler enabled, each Pod that targets it needs three pieces of configuration: the scheduler name, resource requests, and a valid termination grace period. The following sections describe each requirement.Set the scheduler name
In your Pod’sspec, set schedulerName to the name of your SUNK Pod Scheduler so Kubernetes routes the Pod to SUNK instead of the default scheduler. The default name is <namespace>-<releaseName>, but you can set it manually with scheduler.name in your Helm values.
Set resource requests
Your Pod must request specific CPU and memory resources so Slurm can account for the Pod against node capacity. If these resource requests are missing or zero, the Pod fails to schedule.Set the termination grace period
SetterminationGracePeriodSeconds to a value strictly less than the scheduler’s --slurm-kill-wait minus 5 seconds. This keeps Kubernetes Pod termination aligned with Slurm’s job termination window so the placeholder job and the Pod tear down cleanly. For example, if --slurm-kill-wait=30s (the default), then terminationGracePeriodSeconds must be less than 25.
Look up the scheduler configuration
If you don’t know the scheduler name or the current--slurm-kill-wait value, you can read both directly from the running scheduler Pod. Run this command to find both the scheduler name and the kill-wait value:
--scheduler-name and --slurm-kill-wait in the output:
Example Pod
This example shows a full-node GPU Pod with all three required settings:gpu.nvidia.com/model to target the GPU type you need. The CPU, memory, and GPU values in this example are illustrative. Adjust them based on your node type and slurmd configuration. For guidance, see Check available resources.
Choose a node sharing strategy
After the Pod has the required fields, decide how it shares nodes with other workloads. Thesunk.coreweave.com/exclusive annotation controls this behavior, and the right value depends on your workload:
For detailed guidance on each scenario, including resource configuration and examples, see Manage resources with the SUNK Pod Scheduler.
Annotations reference
These annotations configure Slurm job parameters for SUNK-scheduled Pods. All annotations are optional.Time limits
Thesunk.coreweave.com/timeout annotation sets a time limit (in minutes) on the Slurm placeholder job. The Kubernetes time limit begins when the scheduler places the Pod onto a node, which includes Pod initialization time before the container starts. This is earlier than Slurm’s normal time limit, which begins after the prolog script completes.
Known limitations
Before relying on the SUNK Pod Scheduler for production workloads, review the following constraints so you can plan around them.- No gang scheduling. The scheduler schedules each Pod as a separate Slurm job. Multi-node PodGroups aren’t supported. The scheduler is best suited for single-node workloads such as inference.
- No bin-packing. Slurm doesn’t fill partially used nodes before moving to idle ones. This can spread Pods across nodes and lead to GPU fragmentation, especially during scaling.
- Kubernetes scheduling features aren’t supported.
podAffinity,podAntiAffinity, andtopologySpreadConstraintshave no effect. Slurm makes all node placement decisions. Node-level affinity (such asgpu.nvidia.com/model) is supported. - Static CPU allocation causes node drains. A Pod triggers Kubernetes static CPU pinning only when it has Guaranteed QoS (CPU requests equal to limits) and a whole-number CPU request. Pinning conflicts with Slurm’s CPU accounting and creates resource contention, which leads to node drains in Slurm. Breaking either condition prevents it. For details and prevention steps, see Static CPU allocation and the SUNK Pod Scheduler.
- Non-SUNK Pods are invisible to Slurm. Slurm can’t see Pods scheduled through the standard Kubernetes scheduler. Running non-DaemonSet Pods on Slurm nodes without the SUNK Pod Scheduler can cause resource conflicts and unexpected node drains.
- Taints may conflict with Slurm placement. The SUNK Pod Scheduler doesn’t evaluate Kubernetes taints. If Slurm places a Pod on a node with a conflicting taint, the kubelet rejects the Pod. Check Pod events with
kubectl describe podif a Pod is stuck. - Scale-down reconfigure delay. When nodes are removed from the cluster, there’s about a one-minute delay before Slurm’s configuration updates. During this window, Slurm may try to schedule work onto nodes that are being removed.
- Only a fixed set of exclusive values is valid. On SUNK v5.7.0 and later, the
sunk.coreweave.com/exclusiveannotation accepts onlynone,ok,user,mcs, ortopo. Any other non-empty value makes the placeholder Slurm job submission fail, so the Pod appears briefly and then vanishes. See Exclusive annotation values. - GPU Pods can collide with Slurm GRES under open sharing. Setting
exclusive: "ok"on a GPU Pod opens the node to any job and can collide with Slurm’s GRES accounting. Useexclusive: "none"for full-node GPU Pods orexclusive: "user"with a dedicateduser-idfor partial-GPU Pods. - Admission mismatch causes
OutOfcpuorOutOfmemory. Slurm and Kubernetes account for resources independently. System Pods, DaemonSets, and theslurmdcontainer consume Kubernetes-allocatable capacity that Slurm doesn’t see, so the kubelet can reject a Pod that Slurm placed. Right-size Pod requests below node allocatable. See Reserve resources for system Pods. - Duplicate volume declarations break mounts. Declaring the same PersistentVolumeClaim (PVC) as two separate volume entries in one Pod spec, a common mistake with LeaderWorkerSet and templated workloads, can silently break
subPathmounts. Declare each PVC once involumesand reference it with multiplevolumeMounts.
Troubleshoot a SUNK-scheduled Pod
If a SUNK-scheduled Pod is rejected after scheduling, vanishes right after it appears, or collides with a Slurm job over GPUs, see Troubleshoot a SUNK-scheduled Kubernetes Pod for symptom-based diagnosis and recovery steps.Next steps
- Manage resources with the SUNK Pod Scheduler for node sharing configuration, resource tuning, and GPU allocation guidance.