Deploying a Slurm Cluster on NVIDIA Run:ai with Slinky
This tutorial demonstrates how to deploy a Slurm cluster on an NVIDIA Run:ai-managed Kubernetes cluster using Slinky’s slurm-operator. You install the Slurm control plane and compute nodes as Kubernetes workloads, then confirm NVIDIA Run:ai recognizes and schedules them. The workflow also covers GPU scheduling through Slurm GRES.
In this tutorial, you will learn how to:
- Log in to NVIDIA Run:ai and create an API access token
- Install Slinky and deploy a Slurm cluster in an NVIDIA Run:ai project namespace
- Confirm that NVIDIA Run:ai recognizes the Slurm control plane and compute workloads
- Add a GPU-enabled Slurm NodeSet and configure Slurm GRES scheduling
- Verify GPU scheduling from the Slurm login pod
What This Covers
Slinky is an open source toolkit for running Slurm on Kubernetes. Its slurm-operator runs the Slurm controller (slurmctld) and compute daemons (slurmd) as Kubernetes pods represented by custom resources.
This is a standard Kubernetes installation. It uses Helm charts and custom resource definitions (CRDs).
This tutorial does not cover slurm-bridge, which enables Slurm to schedule native Kubernetes workloads.
Prerequisites
Before you begin, make sure you have:
- A project and its Kubernetes namespace. This tutorial uses the
slurmnamespace. Creating a project with--namespace slurmdoes not create the namespace. If it is missing, the project isNotReadywithCan't find namespace for projectuntil you create it withkubectl create ns slurm. kubectland Helm access to the cluster.- GPU-enabled nodes, if you plan to test GPU scheduling. Size the project GPU quota for the NodeSet request. NVIDIA Run:ai enforces this quota for NodeSets. An insufficient quota leaves the GPU NodeSet in
Pending.
Step 1: Logging In
UI
API
CLI v2
Browse to the provided NVIDIA Run:ai user interface and log in with your credentials.
Step 2: Creating a User Access Key
Note
This step is only required if you intend to follow the API steps in this tutorial.
Access keys are used for API integrations with NVIDIA Run:ai. An access key contains a client ID and a client secret. With the client credentials, you can obtain a token and use it within subsequent API calls.
In the NVIDIA Run:ai user interface:
- Click the user avatar at the top right corner, then select Settings
- Click +ACCESS KEY
- Enter the access key’s name and click CREATE
- Copy the Client ID and Client secret and store securely
- Click DONE
To request an API access token, use the client credentials to get a token to access NVIDIA Run:ai using the Tokens API. For example:
Step 3: Installing Slinky and the Slurm Cluster
Note
Check the Slinky installation documentation for newer chart versions. Pin chart versions with --version for reproducible deployments. The commands below pull latest by default.
-
Install cert-manager:
-
Install the
slurm-operatorCRDs, then install the operator: -
Verify that the operator is running:
-
Install the Slurm cluster in the project’s namespace. This example enables the default worker NodeSet, partition, and SSH login access:
The nodesets and partitions.all.enabled settings create the default worker NodeSet and partition. Without them, the chart does not create compute nodes.
rootSshAuthorizedKeys grants root SSH access to the login pod. Review your organization’s access policy before enabling it. Use the path to your own public key where needed.
Step 4: Viewing Slurm Workloads in NVIDIA Run:ai
After installation, NVIDIA Run:ai shows the controller, login service, REST API, and worker NodeSets in the slurm project. Slinky NodeSets are a natively supported NVIDIA Run:ai workload type. No workload-type registration is required. NVIDIA Run:ai schedules the NodeSet pod through a pod group and enforces the project’s GPU quota.
The following example uses the CLI:
The output includes workloads similar to the following:
You can also view these workloads in Workload manager → Workloads. Filter the view by the slurm project.
Step 5: Adding a GPU-Enabled Worker NodeSet
The default Slinky NodeSet has no GPU request. Submit a GPU-enabled NodeSet through the NVIDIA Run:ai user interface, API, or CLI.
Adjust the slurmd.resources, nodeSelector, and GPU count for your cluster. The logfile.image is required for the log-shipping init container. The workload appears as a NodeSet with its requested GPU allocation. After a few seconds, it also appears in Workload manager → Workloads alongside the default NodeSet.
Submitting the Workload
UI
API
CLI v2
-
To create a workload, go to Workload manager → Workloads.
-
Click + NEW WORKLOAD and select Via YAML from the dropdown.
-
In the YAML submission form, select the cluster where the workload will run.
-
Upload or paste your YAML manifest. To upload a file, click UPLOAD YAML FILE and choose your YAML. To paste the YAML, insert it directly into the editor:
-
Select a project. If the
namespaceis not defined in the YAML, select a project from the submission form. -
Click CREATE WORKLOAD.
Configuring Slurm GRES
To make GPUs visible to Slurm as GRES, configure gres.conf with NVML auto-detection. This lets sinfo and scontrol report Gres=gpu:4, and lets jobs request GPUs with srun --gres=gpu:N. AutoDetect=nvidia uses NVML to query the NVIDIA drivers on the node.
In Slinky’s configless mode, configFileRefs mounts the ConfigMap into the controller’s /etc/slurm directory. The controller serves files in that directory to nodes through the configless protocol. slurmd fetches gres.conf over the network and caches it locally. It does not read a file mounted into the NodeSet container, so mounting the file there has no effect. Deliver the file through the controller instead:
If the GPU worker pod already exists, force Slurm to detect its GRES again:
Apply configFileRefs before the GPU NodeSet starts to avoid this recovery step. Dynamic nodes cache GRES during their first registration. A plain pod restart re-registers the same cached empty GRES value.
Step 6: Verifying GPU Scheduling from Slurm
-
Connect to the Slurm login pod with the SSH key configured in Step 3. Check the available nodes:
The output should show a GPU GRES entry for the GPU worker and none for the default worker:
-
Confirm that Slurm registered the GPU resource on the GPU worker:
-
Request a GPU from the GPU-enabled worker:
The command returns the GPU name and UUID. For example:
-
Confirm that Slurm rejects a GPU request against a non-GPU node:
Scope and Limitations
This deployment runs Slurm’s control plane and compute nodes as Kubernetes workloads. NVIDIA Run:ai monitors the NodeSet pods at the Kubernetes layer.
- Node assignment is static. Nodes are assigned to Slurm or Kubernetes workloads during deployment or configuration. This deployment does not move nodes dynamically between the pools based on demand.
- NVIDIA Run:ai does not manage the Slurm control plane. It runs and monitors NodeSet pods at the Kubernetes layer. Submit jobs and manage scheduling, partitions, and accounts through Slurm tools such as
sinfo,sbatch, andsacctmgr. - Configure user access through your existing identity stack, not NVIDIA Run:ai or Slinky. The chain is OIDC, LDAP or Active Directory, SSSD on the Slurm login pod, and Slurm accounting. Slinky supports an SSSD sidecar on the login pod. Your IT team supplies and configures the directory, SSO, and SSSD components.