Researchers know Slurm; infrastructure teams increasingly work with Kubernetes. Slinky brings the two together. This guide follows a tested deployment on Azure Kubernetes Service—from a first CPU job to FreeIPA-backed user access, shared storage, EESSI software and InfiniBand workloads—then shows how to keep jobs and accounting running through a controller failover.
Run Slurm on Kubernetes with Slinky
What Slinky does
Slurm is a workload manager for jobs with explicit resource requirements: a simulation needs a number of nodes, a training run needs GPUs, and a parameter sweep needs hundreds of independent tasks. It provides queues, priorities, reservations, job dependencies and scheduling policies. Slinky, a SchedMD project, brings that environment into Kubernetes.
The Slurm Operator deploys and manages Slurm components as Kubernetes resources. Kubernetes places and maintains their pods; Slurm allocates the resources of its worker pods to jobs. A Slurm job is not automatically a separate Kubernetes Job or Pod. This distinction matters for resource isolation, monitoring and scaling.
Slinky's container images package the Slurm daemons and clients. Its separate Slurm Bridge connects selected Kubernetes workloads to Slurm scheduling. This guide uses the operator to run a Slurm cluster inside Kubernetes; installing the bridge is not required.
|
LoginSetUsers submit with sbatch or srun → Controllerslurmctld queues and schedules jobs → NodeSetslurmd workers execute the job |
Shared application data belongs on storage mounted by login and worker pods. The controller has its own persistent state. Optional slurmdbd accounting writes job history to a database; slurmrestd provides API access.
A NodeSet groups workers with similar resources. A partition defines a queue and its eligible workers. A LoginSet provides a submit host. Customers can keep familiar batch scripts and commands such as sbatch, srun and squeue, while administrators manage configuration, images and lifecycle through Helm and the operator. Existing scripts still need their applications, input paths, identities and resource requests to match the new environment.
This is useful when a team already operates Kubernetes and wants to support Slurm workloads alongside other services. It does not remove the need to design the storage, network, identity and capacity of an HPC system. See the upstream architecture and compatibility guide.
Install a small CPU cluster
The following is a fresh installation on an existing Kubernetes cluster. It creates one CPU worker and a private login service. Run the administrative commands from a Bash terminal with access to that cluster.
- Use Linux worker nodes and Kubernetes 1.35, 1.36 or 1.37, the versions listed in Slinky 1.3.x's upstream support matrix.
- Install Helm 3.8 or later with OCI support and a compatible kubectl. You need permissions to install cluster-wide CRDs and the operator.
- Provide a default dynamic StorageClass, access to the chart and image registries, and enough capacity for one 1 CPU / 1 GiB worker plus the controller, login pod, operator, REST API and Kubernetes overhead. This is a demonstration size, not production sizing.
kubectl config current-context
kubectl get nodes
kubectl get storageclasses
helm version
Validated AKS configuration. Our East US cluster used Kubernetes 1.35.9 with two Standard_D4s_v5 system nodes running Ubuntu 24.04.5 LTS. Slinky 1.3.0 deployed successfully and ran the CPU jobs shown below.
1. Install the operator prerequisites
If cert-manager is already installed, retain that installation and check its compatibility. Otherwise install it once, then install Slinky's CRDs followed by its operator. The version pins keep these examples tied to the reviewed releases.
helm install cert-manager oci://quay.io/jetstack/charts/cert-manager \
--version v1.21.3 \
--namespace cert-manager --create-namespace \
--set crds.enabled=true --wait --timeout 10m
export SLINKY_VERSION=1.3.0
helm install slurm-operator-crds \
oci://ghcr.io/slinkyproject/charts/slurm-operator-crds \
--version "$SLINKY_VERSION" --wait --timeout 10m
helm install slurm-operator \
oci://ghcr.io/slinkyproject/charts/slurm-operator \
--version "$SLINKY_VERSION" \
--namespace slinky --create-namespace --wait --timeout 10m
kubectl get pods -n slinky
2. Define the worker and login service
Create the values file below. The all partition includes the CPU NodeSet. Setting the login service to ClusterIP keeps this lab from creating an externally exposed SSH endpoint. Controller persistence remains enabled by default.
cat > slurm-values.yaml <<'EOF'
nodesets:
slinky:
replicas: 1
slurmd:
resources:
requests:
cpu: '1'
memory: 1Gi
limits:
cpu: '1'
memory: 1Gi
partitions:
all:
enabled: true
loginsets:
slinky:
enabled: true
service:
spec:
type: ClusterIP
EOF
helm install slurm oci://ghcr.io/slinkyproject/charts/slurm \
--version "$SLINKY_VERSION" \
--namespace slurm --create-namespace \
--values slurm-values.yaml --wait --timeout 10m
3. Check both Kubernetes and Slurm
The operator creates pods asynchronously. Inspect the resources until the controller, REST API, login pod and worker have appeared, then wait for readiness. Helm completing does not by itself prove that the operator-created workers are ready.
kubectl get pods,nodesets,loginsets,pvc -n slurm
# Run after all four component pods have appeared.
kubectl wait --for=condition=Ready pod --all \
-n slurm --timeout=600s
The controller PVC binds through the default StorageClass and preserves scheduler state. Our AKS installation bound a 4 GiB Azure Disk volume. Use a separate shared filesystem for application data across login and worker pods. The examples follow the 1.3.0 installation guide and chart values.
Submit your first Slurm job
For this lab, an administrator can enter the login container using kubectl exec. List the pods and enter the actual login pod name; its generated suffix can change. Production users should connect through a private SSH service with organisational identity, rather than being given Kubernetes administrator access.
kubectl get pods -n slurm
read -r -p 'Login pod name: ' LOGIN_POD
kubectl exec -it -n slurm "$LOGIN_POD" -c login -- bash
Inside the login shell, inspect the partition and run a single task. Our sinfo output showed an idle worker named slinky-0 in the all partition, and srun returned that hostname.
sinfo
srun --partition=all --ntasks=1 hostname
Now create a batch script. Slurm receives the script, queues it, and runs it when the requested resources are available. This example uses only commands provided by the worker image.
cat > /tmp/slinky-hello.sbatch <<'EOF'
#!/bin/bash
#SBATCH --job-name=slinky-hello
#SBATCH --partition=all
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
#SBATCH --mem=128M
#SBATCH --time=00:02:00
#SBATCH --output=/tmp/slinky-hello-%j.out
set -euo pipefail
srun hostname
srun bash -c 'printf "Job %s on %s\n" "$SLURM_JOB_ID" "$(hostname)"'
sleep 15
EOF
JOB_ID=$(sbatch --parsable /tmp/slinky-hello.sbatch)
printf 'Submitted job %s\n' "$JOB_ID"
squeue --jobs="$JOB_ID"
scontrol show job "$JOB_ID"
R identifies a running job. The short sleep gives you time to inspect it in squeue. After completion, scontrol shows JobState=COMPLETED and ExitCode=0:0 while the job record is retained.
Retrieve the output from the worker
Each pod has its own /tmp. This job writes its output on the batch worker, not in the login pod. After completion, open a second administrator terminal, identify the worker pod, and supply the job ID printed above. With the single worker in this lab, there is only one batch worker to inspect.
kubectl get pods -n slurm
read -r -p 'Worker pod name: ' WORKER_POD
read -r -p 'Submitted job ID: ' JOB_ID
kubectl exec -n slurm "$WORKER_POD" -c slurmd -- \
cat "/tmp/slinky-hello-${JOB_ID}.out"
The file should contain the worker hostname and job ID. It disappears if the worker pod is recreated. For actual workloads, mount a writable shared filesystem at the same path, such as /mnt/shared, on login and worker pods. Submit from that directory and write results there. Slurm transfers the batch script, but it does not automatically copy your executables or datasets. Provide software in a worker image or a mounted software stack. Consult the sbatch reference for file and working-directory behaviour.
From a lab to a customer service
To add a second CPU worker, change nodesets.slinky.replicas to 2 in your values file and apply the change:
helm upgrade slurm oci://ghcr.io/slinkyproject/charts/slurm \
--version 1.3.0 --namespace slurm \
--values slurm-values.yaml --wait --timeout 10m
kubectl get nodesets,pods -n slurm
A second Slurm worker needs Kubernetes capacity. By default, NodeSet workers avoid sharing a Kubernetes node. Increasing replicas does not automatically provision cloud VMs; node-pool scaling and any queue-driven autoscaling need their own configuration. Coordinate draining and scale-in so active jobs can finish.
- Separate management and compute. Keep the operator, controller, REST API and login service on stable management capacity. Use selectors, affinity and taints to place CPU, GPU and RDMA workers in appropriate pools.
- Protect state and data. Retain controller persistence, select performant storage, review PV reclaim policies and test recovery. Mount application inputs and outputs consistently across login and workers. Controller high availability needs shared state storage; the tested HA setup uses ANF.
- Integrate identities. Use non-root customer accounts and consistent UID/GID mapping across login, workers and storage. Configure private access, RBAC and network restrictions. For SSSD in 1.3, mount the site configuration from a Secret at /etc/sssd/sssd.conf with mode 0600.
- Configure accounting and monitoring. Enable slurmdbd with a durable MySQL/MariaDB-compatible database and test restoration. Collect job, partition, worker and controller metrics, plus GPU metrics where applicable. Verify that Prometheus discovers the intended ServiceMonitors.
- Manage configuration as code. Keep reviewed values and images in version control. Upgrade CRDs before the operator, review release migration notes, and carry forward your complete site configuration. Match Slurm daemon images to the intended release.
These decisions are part of providing a reliable Slurm service. The system requirements and 1.3.0 release notes describe sizing and upgrade considerations.
Run jobs as a FreeIPA user
We added FreeIPA 4.13.4 on a private AlmaLinux 9 VM in the AKS network. The server, ipa.slinky.internal, provides the SLINKY.INTERNAL realm and directory base dc=slinky,dc=internal. Its internal service is reachable from the Slinky containers, and the admin credentials are kept in a Kubernetes Secret.
SSSD resolves directory identities and group membership from FreeIPA's RFC2307 compatibility tree over verified StartTLS. The users slinkyuser and slinkyuser2 have stable UID/GID pairs 20001:20001 and 20002:20002. Both resolve with the slinky-users login group and slinky-project project group. Slurm daemons retain their required privileges while submitted processes run under the individual user identity.
The login service retrieves SSH public keys directly from FreeIPA over TLS. Its lookup checks membership in slinky-users and the account's disabled state before returning keys. A dedicated directory lookup credential is mounted from a Kubernetes Secret; individual users' keys are managed in FreeIPA. A shared Azure NetApp Files NFSv4.1 volume provides /home on login and worker pods, preserving per-file POSIX ownership.
Provision the ANF home volume
The setup repository includes ANF provisioning and the generated Kubernetes configuration. Run the ANF stage after FreeIPA provisioning and before platform integration:
bash scripts/provision-anf.sh
bash scripts/install-platform.sh integrate
The tested deployment uses a 1 TiB Standard capacity pool, a 100 GiB UNIX NFSv4.1 volume and a delegated ANF subnet. Standard networking supports the 1 TiB pool minimum. The static Kubernetes volume uses a Retain policy and mounts 10.237.0.4:/slinky-home at /home; the setup script discovers the mount target for each deployment. Billing follows the 1 TiB capacity pool.
During migration, the existing user's files were copied and verified with matching entry counts, byte sizes and SHA-256 digest. The login and worker then switched to ANF, and batch job 15 completed with exit code zero and output owned by 20001:20001. The Azure Files home claims were removed after that verification. The parent /home is mode 0755, and /home/slinkyuser is private with mode 0700.
The repository's identity template combines ANF, SSSD and EESSI mounts. The setup guide describes server and credential provisioning. Apply the integration after FreeIPA, its CA and the ANF volume are available:
export KUBECONFIG=/tmp/opencode/hugo-slinky-aks.kubeconfig
bash scripts/install-platform.sh integrate
kubectl get pods,pvc -n slurm
kubectl exec -n slurm slurm-controller-0 -c slurmctld -- id slinkyuser
kubectl exec -n slurm slurm-worker-slinky-0 -c slurmd -- id slinkyuser
Both identity checks returned uid=20001(slinkyuser) gid=20001(slinkyuser). From a host with private access to the cluster service and the user's SSH key, connect to the LoginSet:
ssh slinkyuser@slurm-login-slinky.slurm.svc.cluster.local
id
cd /home/slinkyuser
srun --partition=all --nodes=1 --ntasks=1 id
Our SSH session and Slurm task both ran as UID/GID 20001. A subsequent batch job completed successfully and wrote its output into the shared home, owned by 20001:20001. This gives the user a familiar submit host and a persistent place for scripts, inputs and results.
Manage users and access centrally
The repository includes user lifecycle commands for creating a directory identity, changing its SSH key, granting or revoking login-group membership, and enabling or disabling the account. Supply each user with a unique UID/GID and their own public key:
bash scripts/manage-user.sh create slinkyuser2 20002 20002 /path/to/user2.pub
bash scripts/manage-user.sh key-update slinkyuser2 /path/to/new-user2.pub
bash scripts/manage-user.sh grant slinkyuser2
bash scripts/manage-user.sh revoke slinkyuser2
bash scripts/manage-user.sh disable slinkyuser2
bash scripts/manage-user.sh enable slinkyuser2
Run the home-provisioning script inside the login container to initialize ANF directories with each user's numeric ownership:
kubectl exec -i -n slurm deployment/slurm-login-slinky -c login -- \
sh -s -- slinkyuser2 20002 20002 < scripts/provision-home.sh
Private homes use mode 0700. Shared project directories use group slinky-project and mode 2770, which preserves the project group on new files. Users create collaborative files with group-write permissions.
Key lookup reads the directory at login time, allowing administrators to change keys and eligibility centrally. The offboarding policy blocks new logins when an account is disabled; existing sessions and jobs are allowed to finish. This policy keeps login admission separate from decisions about work already in progress.
The live acceptance checks verified both users' SSH and Slurm identities, cross-home permission denial, project-member read/write access and non-member denial. Removing login eligibility, disabling the account and rotating the SSH key took effect on new connections without redeploying the login pod. Job 19 finished while new logins were blocked. After login and worker recreation, identity lookup, project groups and ANF files remained available. The multi-user validation record contains the evidence.
Access applications through EESSI
EESSI, the European Environment for Scientific Software Installations, distributes a prebuilt scientific software stack through CVMFS. The repository is mounted read-only at /cvmfs/software.eessi.io in both the login and CPU worker containers. Application files come from EESSI; job inputs and results use the shared home.
1. Install the CVMFS CSI driver
We used CVMFS CSI 2.6.1 with an EESSI repository configuration, the EESSI public verification key, direct access to the Azure East US and AWS mirrors, and a 10,000 MiB cache per node. The saved CSI values include the complete configuration and node tolerations.
export KUBECONFIG=/tmp/opencode/hugo-slinky-aks.kubeconfig
kubectl create namespace cvmfs --dry-run=client -o yaml | kubectl apply -f -
kubectl label namespace cvmfs \
pod-security.kubernetes.io/enforce=privileged \
pod-security.kubernetes.io/audit=privileged \
pod-security.kubernetes.io/warn=privileged --overwrite
helm upgrade --install cvmfs-csi \
oci://registry.cern.ch/kubernetes/charts/cvmfs-csi \
--version 2.6.1 --namespace cvmfs \
--values config/cvmfs-eessi-values.yaml --wait --timeout 10m
bash scripts/install-platform.sh integrate
kubectl get pods -n cvmfs
kubectl get pvc software-eessi-io -n slurm
The CSI node plugin became Ready on all four Linux nodes, and its controller became Ready on the system pool. The software-eessi-io PVC was Bound with ReadOnlyMany access. The Slinky manifest retains the SSSD, SSH and home-volume configuration while adding the repository mount to the LoginSet and NodeSet.
2. Load an application in the user shell
After connecting as slinkyuser, initialize the EESSI version and inspect the available modules:
source /cvmfs/software.eessi.io/versions/2025.06/init/bash
module avail
module load Python/3.13.5-GCCcore-14.3.0
python --version
The system-node CPU was detected as x86_64/intel/icelake, and Python reported version 3.13.5. The mounted stack also listed GROMACS modules including GROMACS/2025.4-foss-2025b and GROMACS/2026.2-foss-2025b. EESSI selects a software tree suited to the CPU on which initialization runs.
3. Submit an EESSI application job
Initialize EESSI inside the batch script so the worker loads its own environment. The following is the script that completed successfully in our test. It loads Python and calculates the sum of square roots from 1 through 10,000.
cd /home/slinkyuser
cat > eessi-slurm-job.sh <<'EOF'
#!/bin/bash
#SBATCH --job-name=eessi-python
#SBATCH --output=/home/slinkyuser/eessi-slurm-%j.out
set -eo pipefail
source /cvmfs/software.eessi.io/versions/2025.06/init/bash
module load Python/3.13.5-GCCcore-14.3.0
echo "JOB_ID=$SLURM_JOB_ID"
echo "NODE=$(hostname)"
echo "UID=$(id -u)"
echo "GID=$(id -g)"
echo "ARCH=$EESSI_SOFTWARE_SUBDIR"
echo "PYTHON=$(python --version 2>&1)"
python -c 'import math; value=sum(math.sqrt(i) for i in range(1,10001)); print(f"CALCULATION={value:.12f}")'
EOF
JOB_ID=$(sbatch --parsable --wait /home/slinkyuser/eessi-slurm-job.sh)
scontrol show job "$JOB_ID"
cat "/home/slinkyuser/eessi-slurm-${JOB_ID}.out"
Job 13 completed with ExitCode=0:0. Its output confirmed both the EESSI application and the user's execution identity:
JOB_ID=13
NODE=slinky-0
UID=20001
GID=20001
ARCH=x86_64/intel/icelake
PYTHON=Python 3.13.5
CALCULATION=666716.459197108401
The output is available from the login shell because the job writes to the shared home. The setup guide documents the deployment, and the user verification script runs the application check. The CVMFS repository remains read-only, while scripts and generated results stay in the user's writable storage.
A tested HBv3 InfiniBand setup
On 21 November 2026, we added two Standard_HB120rs_v3 nodes to an AKS 1.35.9 cluster in East US. Both ran Ubuntu 24.04.5 LTS with kernel 6.8.0-1073-azure. Their native RDMA stack exposed an active ConnectX-6 virtual function, mlx5_0, and completed inter-node RDMA writes and reads.
Validated transport setup. Privileged, host-network diagnostic pods access the native RDMA devices supplied by this AKS node image. The following steps verify the InfiniBand transport directly between the two HBv3 nodes.
1. Provision two HBv3 nodes
Use the subscription and cluster you intend to test. The values below identify our test deployment; change them for another environment. These commands create two billed VMs. Check regional HBv3 quota and capacity first. If the hbv3 pool already exists, inspect it rather than repeating the add command.
read -r -p 'Azure subscription ID: ' SUBSCRIPTION
RESOURCE_GROUP=hugo-slinky
CLUSTER=hugo-slinky-aks
az aks nodepool add \
--subscription "$SUBSCRIPTION" \
--resource-group "$RESOURCE_GROUP" --cluster-name "$CLUSTER" \
--name hbv3 --node-count 2 --node-vm-size Standard_HB120rs_v3 \
--mode User --os-sku Ubuntu \
--node-taints workload=ib:NoSchedule --labels workload=ib \
--no-wait
az aks nodepool show \
--subscription "$SUBSCRIPTION" \
--resource-group "$RESOURCE_GROUP" --cluster-name "$CLUSTER" \
--name hbv3 --query '{state:provisioningState,count:count,vmSize:vmSize}'
Wait for the pool to report Succeeded and both Kubernetes nodes to appear as Ready. Our two-node HBv3 pool reached that state successfully.
The AKS InfiniBand feature was already Registered in our subscription. Check its state if your environment requires that feature, following the AKS RDMA prerequisites. Obtain normal user credentials in a separate kubeconfig, preserving your existing context:
az aks get-credentials \
--subscription "$SUBSCRIPTION" \
--resource-group "$RESOURCE_GROUP" --name "$CLUSTER" \
--file "$HOME/.kube/hugo-slinky-ib.kubeconfig"
export KUBECONFIG="$HOME/.kube/hugo-slinky-ib.kubeconfig"
kubelogin convert-kubeconfig -l azurecli
az feature show --subscription "$SUBSCRIPTION" \
--namespace Microsoft.ContainerService --name AKSInfinibandSupport \
--query properties.state -o tsv
kubectl get nodes -l kubernetes.azure.com/agentpool=hbv3 -o wide
# Run once both nodes have registered.
kubectl wait --for=condition=Ready node \
-l kubernetes.azure.com/agentpool=hbv3 --timeout=600s
Use an account with AKS RBAC Cluster Admin on the test cluster to create the diagnostic namespace and privileged pods.
2. Place one diagnostic pod on each node
In Bash, discover the two actual node names rather than copying the generated names from our run. The manifest below reproduces our setup: Ubuntu 24.04, native host-network access, and Ubuntu packages providing verbs diagnostics and perftest. Image tags and package versions are not immutable; record their resolved versions for longer-term reproducibility.
mapfile -t HBV3_NODES < <(kubectl get nodes \
-l kubernetes.azure.com/agentpool=hbv3 \
-o jsonpath='{range .items[*]}{.metadata.name}{"\n"}{end}')
if [ "${#HBV3_NODES[@]}" -ne 2 ]; then
printf 'Expected exactly two HBv3 nodes; inspect the pool first.\n' >&2
else
cat > hbv3-diag.yaml <<'EOF'
apiVersion: v1
kind: Namespace
metadata:
name: hbv3-diag
labels:
pod-security.kubernetes.io/enforce: privileged
pod-security.kubernetes.io/audit: privileged
pod-security.kubernetes.io/warn: privileged
EOF
for i in 0 1; do
cat >> hbv3-diag.yaml <<EOF
---
apiVersion: v1
kind: Pod
metadata:
name: hbv3-diag-$i
namespace: hbv3-diag
spec:
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
nodeName: ${HBV3_NODES[$i]}
tolerations:
- key: workload
operator: Equal
value: ib
effect: NoSchedule
containers:
- name: diag
image: ubuntu:24.04
securityContext:
privileged: true
command:
- /bin/bash
- -lc
- |
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -y perftest ibverbs-utils infiniband-diags pciutils iproute2
exec sleep infinity
EOF
done
kubectl apply -f hbv3-diag.yaml
fi
kubectl wait --for=condition=Ready pod --all \
-n hbv3-diag --timeout=600s
kubectl get pods -n hbv3-diag -o wide
Allow package installation to finish, then confirm ib_write_bw --version and ib_read_lat --version in both pods. Verify that each pod is placed on a different HBv3 node.
3. Verify devices and active ports
for pod in hbv3-diag-0 hbv3-diag-1; do
kubectl exec -n hbv3-diag "$pod" -- ibv_devinfo -d mlx5_0
kubectl exec -n hbv3-diag "$pod" -- ibstat mlx5_0
done
Our output showed transport: InfiniBand, state: PORT_ACTIVE, Physical state: LinkUp, active_mtu: 4096 and rate 200 on both nodes. The LIDs were different: 1189 and 1032. Select the device reporting an active InfiniBand port; in this setup it was mlx5_0.
4. Run the two inter-node tests
Discover the server address from the actual pod. Start each server before its matching client. The background server writes a log inside the server pod; the client prints the measurement in your terminal.
SERVER_IP=$(kubectl get pod -n hbv3-diag hbv3-diag-0 \
-o jsonpath='{.status.podIP}')
kubectl exec -n hbv3-diag hbv3-diag-0 -- bash -lc \
'ib_write_bw -d mlx5_0 -i 1 -F --report_gbits -n 10000 > /tmp/ib-recheck-write.log 2>&1 < /dev/null &'
kubectl exec -n hbv3-diag hbv3-diag-1 -- \
ib_write_bw -d mlx5_0 -i 1 -F --report_gbits -n 10000 "$SERVER_IP"
kubectl exec -n hbv3-diag hbv3-diag-0 -- bash -lc \
'ib_read_lat -d mlx5_0 -i 1 -F -n 10000 > /tmp/ib-recheck-read.log 2>&1 < /dev/null &'
kubectl exec -n hbv3-diag hbv3-diag-1 -- \
ib_read_lat -d mlx5_0 -i 1 -F -n 10000 "$SERVER_IP"
kubectl exec -n hbv3-diag hbv3-diag-0 -- \
cat /tmp/ib-recheck-write.log /tmp/ib-recheck-read.log
Start the client once the server log reports that it is waiting for a connection. Both commands completed successfully in our 10,000-iteration run.
Observed HBv3 diagnostic results, 21 November 2026
|
Test |
Message size |
Observed result |
|
RDMA write |
65,536 bytes |
183.92 Gb/s average; 184.37 Gb/s peak |
|
RDMA read latency |
2 bytes |
3.54 µs average; 3.52 µs typical; 3.59 µs p99 |
Perftest reported Transport type: IB, Connection type: RC, Link type: IB and the distinct local/remote InfiniBand LIDs. Its Data ex. method: Ethernet line refers to endpoint-information exchange over the host IP; the payload used InfiniBand verbs.
These measurements are samples from successful inter-node RDMA tests. An earlier 1,000-iteration run measured 192.28 Gb/s and 3.47 µs average read latency. The active-port output and completed verbs transfers confirm that the HBv3 InfiniBand transport works.
The diagnostic pods were retained for inspection. Remove the diagnostic namespace when the tests are finished, and manage the HBv3 node pool separately according to your compute needs.
5. Integrate HBv3 with Slurm
The repository now includes the verified Slurm integration for the two HBv3 nodes. It keeps the CPU worker in the default partition and creates a separate hbv3 partition with two workers. Each worker mounts the ANF home and EESSI software, resolves FreeIPA users, and exposes eight schedulable CPUs, an 8 GiB budget and one InfiniBand GRES.
bash scripts/install-hbv3.sh
bash scripts/verify-hbv3-isolation.sh
bash scripts/verify-hbv3-mpi.sh
The NodeSet creates its partition as workers register. File-backed GRES maps nic:1 to the active mlx5_0 verbs device. A normal job that requests no NIC is denied RDMA access; a job with --gres=nic:1 receives the IB device while the other verbs device stays denied. Concurrent users on one HBv3 host received separate CPU masks, and a memory-limit violation stopped only that job while the other user's task finished.
A mounted supervisor configuration sets the Slurm daemon's memlock limit at startup. Both workers were recreated and MPI passed with the inherited setting. The verification script reads the limit and performs the test without adjusting the running daemon.
6. Run a non-root MPI application over IB
The MPI example is built on an HBv3 allocation using EESSI OpenMPI/5.0.8-GCC-14.3.0. The verifier launches two ranks under Slurm PMIx v5 as slinkyuser, with one rank per worker, and selects the UCX RC transport:
srun --account=slinky --qos=hbv3-normal --propagate=NONE \
-p hbv3 -N2 -n2 --ntasks-per-node=1 \
-c1 --mem=256M --gres=nic:1 --mpi=pmix_v5 bash -lc '
source /cvmfs/software.eessi.io/versions/2025.06/init/bash
module load OpenMPI/5.0.8-GCC-14.3.0
export OMPI_MCA_pml=ucx UCX_NET_DEVICES=mlx5_0:1
export UCX_TLS=rc,sm,self UCX_LOG_LEVEL=info
/home/slinkyuser/mpi-ib-hbv3
'
The application checked a 1 MiB payload and an Allreduce sum of the two rank numbers. Both ranks reported success on distinct hosts, and UCX identified the inter-node InfiniBand path:
inter-node cfg#1 tag(rc_mlx5/mlx5_0:1)
rank=0 size=2 host=hbv3-1 rank_sum=1 payload=OK
inter-node cfg#1 tag(rc_mlx5/mlx5_0:1)
rank=1 size=2 host=hbv3-0 rank_sum=1 payload=OK
The HBv3 Slurm setup guide records the isolation and MPI evidence. The persistent configuration and verifiers provide the same setup and checks for subsequent worker recreation.
Durable accounting and project policy
SlurmDBD records job history in an internal MariaDB 11.4.13 database on a retained 32 GiB Premium Azure managed disk. The database service accepts connections from the accounting daemon through a Kubernetes NetworkPolicy. Passwords remain in Secrets and protected local state. The setup preserves the existing FreeIPA identities, ANF homes, EESSI mounts and worker isolation.
Run the accounting installation and policy stages after the CPU and HBv3 workers are integrated. The installation and persistence checks require an empty queue while services are restarted:
bash scripts/install-accounting.sh
bash scripts/configure-slurm-policy.sh
bash scripts/verify-accounting.sh
Both users belong to account slinky, with equal fair-share and default QoS cpu-normal. The controller enforces associations, resource limits and QoS. Multifactor priority uses fair-share weight 10,000 and job-age weight 1,000.
Configured scheduling policy for the two users
|
QoS |
Partition |
Per-job limits |
|
cpu-normal |
all |
4 CPUs, 1 GiB, 1 node, 30 minutes |
|
hbv3-normal |
hbv3 |
16 CPUs, 8 GiB, 2 nodes, 30 minutes |
Each user can run two jobs and have four submitted jobs. A third eligible job waits for a running slot. The QoS DenyOnLimit flag rejects oversized submissions. Use the project and the partition's QoS when submitting work:
# CPU job, from the user login shell
sbatch --account=slinky --qos=cpu-normal --partition=all \
--time=00:05:00 --mem=128M --wrap='srun hostname'
# Two-node InfiniBand allocation
srun --account=slinky --qos=hbv3-normal --partition=hbv3 \
-N2 -n2 --ntasks-per-node=1 --mem=256M --gres=nic:1 hostname
# View durable job history
sacct --format=JobID,User,Account,QOS,Partition,State,ExitCode
Validation confirmed account enforcement, CPU and wall-time rejection, submission-count limits and running-job limits. Completed job 126 remained in the database after MariaDB restart and accounting-daemon recreation:
126|slinkyuser|slinky|cpu-normal|all|COMPLETED|0:0
The accounting setup guide documents database settings, retention, policy values and the actual checks. The retained disk provides restart persistence, and the high-availability stage moves the database to a three-member Galera cluster.
Keep the control plane available
The final stage makes the control plane redundant: a second FreeIPA server, a three-member accounting database, two Slurm controllers sharing their state on ANF, and two login pods. In the tested cycle, an ordinary user's job completed with a full accounting record while the primary controller was stopped, and service then handed back to a fresh primary process.
- Identity. A second private FreeIPA 4.13.4 server, ipa2.slinky.internal, replicates the directory and runs its own CA. SSSD lists both servers in an ordered ldap_uri, and the SSH key lookup passes both LDAPS addresses to ldapsearch while still checking group eligibility and account lock. With the primary stopped, a new login pod resolved a change made on the replica and returned the replicated SSH key; the primary received the change after it restarted.
- Accounting database. SlurmDBD uses slurm-ha, a MariaDB 11.4.13 Galera cluster managed by MariaDB Operator 26.10.2. Its three healthy members run on three different system nodes, each with an independent retained 32 GiB Premium disk. With one member deleted, the other two remained a writable Primary component: Slurm returned historical job 126 and recorded new job 127, and the deleted member rejoined.
- Controller state. The StateSaveLocation was copied from its original disk to an ANF NFSv4.1 export, and every file's SHA-256 hash matched; the source volume is retained. Both controllers mount the export through the ReadWriteMany claim slurm-controller-state, owned by 401:401 with mode 0700.
- Controllers. slurm-controller-0 is the primary and slurm-controller-1 the backup, on different system nodes, with MessageTimeout=5 and SlurmctldTimeout=30. The /livez liveness probe allows 12 failed checks at 10-second intervals, which leaves time for the backup to take over before Kubernetes restarts a stopped primary.
- Login. Two LoginSet replicas run on different system nodes with the normal Slurm configuration and no SLURM_CONF override. PodDisruptionBudgets keep at least one controller and one login pod available during voluntary disruptions.
Route clients to the active controller
Slurm clients reach the controller through SlurmctldAddr=slurm-controller.slurm. That Service selects only the Pod labelled controller.slinky.slurm.net/active=true, so the label must follow the controller that Slurm has promoted. The patched Slinky 1.3.0 operator finds the active controller without going through that Service:
- It sends a two-second HTTP request to /readyz on port 6817 of every controller Pod. The active slurmctld answers with a 2xx status; a standby answers HTTP 500.
- An unreachable Pod is not counted as active, and probing continues with the remaining Pods.
- The label moves only when exactly one Pod reports active. The old label is removed before the new one is added, so the Service never has two endpoints.
Pod readiness still uses /livez, so the standby stays Ready and rolling updates proceed. The operator patch includes Go tests for both controller orders and for the label hand-over; the operator fix notes describe the probe in detail.
Resume accounting after a takeover
In Slurm 26.05.6, the accounting agent holds queued messages for slurmdbd until the controller signals that it has recovered its state. Normal startup sends this signal after loading state. A backup loads the same state in run_backup() when it takes control, and the controller patch adds the same signal there:
--- a/src/slurmctld/backup.c
+++ b/src/slurmctld/backup.c
@@ -344,6 +344,7 @@ void run_backup(void)
}
select_g_select_nodeinfo_set_all();
unlock_slurmctld(config_write_lock);
+ clusteracct_storage_g_ctld_recovered();
}
The promoted controller then sends job records to slurmdbd while it is in control. Only the slurmctld executable differs from the official Slinky 26.05.6 controller image: libslurmfull.so and the accounting_storage_slurmdbd.so plugin are byte-identical, and the official slurmdbd runs unchanged.
Build the two images
Each image starts from an exact upstream release and adds one patch from the repository. Both commands build locally: they push nothing and leave the cluster unchanged.
# Operator: Slinky v1.3.0 plus patches/slinky-ha-active-discovery.patch;
# runs the focused Go tests, then builds slurm-operator:1.3.0-ha-discovery-local
bash scripts/install-slinky-ha-fix.sh
# Controller: Slurm tag slurm-26-05-6-1 plus the takeover patch; copies only
# slurmctld onto the official Slinky controller image, pinned by digest
bash scripts/build-slurmctld-ha-accounting.sh
Publishing is a separate, explicit step. Sign in to the registry with an account that can write the package. For either build script, --push with a registry-qualified --image tag publishes the image and reports its immutable digest; add --install to update the matching cluster component by digest after recording rollback state. Make the package public, confirm from a signed-out client that docker manifest inspect resolves each digest, and deploy by digest rather than by tag. The tested deployment runs these two digests:
# Operator: Slinky 1.3.0 with direct /readyz discovery
ghcr.io/hmeiland/slurm-operator@sha256:1d08d7c1e690e3cf8c6166597495c1ea58b6874869e99feda51927a99c9f7f1e
# Controller: Slurm 26.05.6 slurmctld with the takeover accounting signal
ghcr.io/hmeiland/slurm-operator@sha256:34ab7076cd7482cc8802f08cdba1c4c0c6cf5adef6b691ab871c4b2c758d8f33
Both images are stored in the same GHCR package, slurm-operator; the digest, not the repository name, identifies the role. The control-plane values pin the controller digest.
Install and verify
Run the stages in this order from the repository root. The database and controller installers require an empty Slurm queue. Each verifier disrupts one component and waits for recovery, so run them in a maintenance window. The FreeIPA verifier also applies config/freeipa-ha.yaml with the replica's address, restarts CoreDNS and refreshes the login pods before it stops the primary.
# Identity: FreeIPA replica with CA, then the primary-outage check
bash scripts/install-freeipa-replica.sh
bash scripts/verify-freeipa-ha.sh
# Accounting: move to the Galera cluster, then the member-loss check
bash scripts/install-database-ha.sh
bash scripts/verify-database-ha.sh
# Operator: patched active-controller discovery, pinned by digest
kubectl -n slinky set image deployment/slurm-operator \
slurm-operator=ghcr.io/hmeiland/slurm-operator@sha256:1d08d7c1e690e3cf8c6166597495c1ea58b6874869e99feda51927a99c9f7f1e
kubectl -n slinky rollout status deployment/slurm-operator --timeout=300s
# Controllers and login: ANF state, two controllers, two login pods.
# The first migration to ANF state needs --replace-controller.
bash scripts/install-controlplane-ha.sh --replace-controller
# One controlled takeover and handback
bash scripts/verify-focused-ha-cycle.sh
The takeover verifier first checks both pinned image digests, Galera and slurmdbd readiness, and the login configuration. It then stops the primary's exact slurmctld process with SIGSTOP, so the Pod and its address remain while the daemon stops answering. It never resumes that process: after its checks, it kills the stopped PID and requires a different non-empty PID:starttime identity in the same Pod before accepting handback. Container replacement and restart-count advancement are recorded but are not required. The run passes only if the ordinary user's job has its complete accounting row while the backup is in control, the same row after handback, and a new job completes under the fresh primary. Our run on 23 November 2026 passed, with its evidence kept in a private file under .state/:
- Baseline. Primary /readyz returned HTTP 204 and standby HTTP 500; the active label and the only Ready endpoint were on controller-0.
- Primary stopped. SIGSTOP reached slurmctld PID 10 on controller-0 at 18:04:20 UTC; the Pod UID and restart count stayed unchanged.
- Takeover. Controller-1 logged Running as primary controller 30 seconds later.
- Routing. Controller-1 answered HTTP 204 and held the only active label and Ready endpoint 66 seconds after the stop.
- Outage job. slinkyuser job 144 was accepted in 2.8 seconds through the normal configuration and wrote its output to the user's home from slinky-0.
- Accounting. The complete COMPLETED row was visible while the backup was in control, and the backup's DBD agent queue stayed at 0.
- Handback. The verifier killed the stopped PID, and a fresh controller-0 process in the same Pod reclaimed the route.
- After handback. The job 144 row was unchanged, and job 145 completed under the fresh primary.
The accounting rows, in the JobID|User|Account|QOS|Partition|State|ExitCode format used above:
# While controller-1 was in control
144|slinkyuser|slinky|cpu-normal|all|COMPLETED|0:0
# After handback to the fresh primary
144|slinkyuser|slinky|cpu-normal|all|COMPLETED|0:0
145|slinkyuser|slinky|cpu-normal|all|COMPLETED|0:0
All of this redundancy sits in one Azure region, and the system nodes are not spread across availability zones. FreeIPA, database and controller-state backups are protected local archives; encrypted off-cluster backup storage, retention automation and regional disaster recovery need their own design. The FreeIPA replica, an isolated FreeIPA restore VM and the additional system nodes are billed resources. The FreeIPA, database and control-plane HA guides record the configuration and checks.
Sources and version notes
- EESSI documentation and CVMFS CSI driver. Deployment files: CSI values and Slinky identity and EESSI mounts.
- Slinky 1.3.0 installation guide, compatibility matrix and chart values.
- cert-manager Helm installation and Slurm sbatch reference.
- AKS RDMA and InfiniBand guidance.
- Control-plane high availability: slurm.conf reference for SlurmctldHost and SlurmctldTimeout, MariaDB Operator and FreeIPA. Repository patches: operator discovery and Slurm takeover accounting.
- Kris Buytaert, Slinky on AKS, an experience report, Q1 2026, chapters 5–12 and accounting/monitoring appendices; Running Slinky (Slurm) on Azure AKS, April 2026. Supporting code: public proof-of-concept repository.
Validated results. Slinky 1.3.0 ran CPU jobs successfully on local Kubernetes 1.35.8 and AKS 1.35.9. FreeIPA-backed SSH and Slurm execution used UID/GID 20001 with shared-home output. EESSI Python job 13 completed with exit code zero. The two-node HBv3 pool passed privileged inter-node InfiniBand diagnostics, measuring 183.92 Gb/s average RDMA write bandwidth and 3.54 µs average RDMA read latency over 10,000 iterations. In the controller takeover cycle, ordinary-user job 144 completed with its full accounting row while the backup controller was in control, and job 145 completed after handback to a fresh primary process.