Slurm requires a fully connected network with bidirectional communication between all daemons and clients. Because Kubernetes NAT-type networks can impede this, choose one of two networking strategies:
Host Network
Avoids Kubernetes NAT by having Slurm pods use the Kubernetes node host network directly.
- Pros: Simplest methodology.
- Cons: Security implications; only one pod with
hostNetwork: true can run on a Kubernetes node at a time; inherits node hostname and namespace. - Note:
Controller and Accounting do not support this option due to Slurm configuration race conditions with Kubernetes.
To use this, configure the pod as follows:
hostNetwork: true
dNSPolicy: ClusterFirstWithHostNet
Network Peering
Configures network peering so internal and external services can communicate directly.
- Pros: Higher security; minimal Slurm configuration required.
- Cons: Most complex methodology.
- Implementation: Typically involves an advanced CNI (like Calico) with network peering (BGP) for bidirectional communication across Kubernetes boundaries. No special configuration is required for the Slurm helm chart itself.