Running jobs and management tasks in the Slurm cluster requires connecting to the Slurm login node. You can access the login node through SSH orDocumentation Index
Fetch the complete documentation index at: https://docs.coreweave.com/llms.txt
Use this file to discover all available pages before exploring further.
kubectl exec, depending on your directory service configuration. Connecting through SSH requires a directory service pre-configured for SSH access, while kubectl exec does not.
For information about initial setup of Slurm login nodes, see Configure Slurm individual login nodes.
Connect through SSH
Accessing the login node through SSH requires a directory service with users configured for SSH access.
kubectl get svc slurm-login command to identify the login service’s IP address or DNS record. The EXTERNAL-IP field in the command output contains the relevant IP address.
In the following example, the target IP address is 203.0.113.100:
Obtain the External IP address
Log in with SSH
Connect through port forwarding
If there is no public IP address allocated for the node, first port-forward the service with thekubectl port-forward command, then log in through SSH using the port-forwarded address. Each login pod has an associated headless service, allowing users to refer to the pod by name without specifying a Fully Qualified Domain Name (FQDN).
To access an individual login pod with port-forwarding, use the kubectl port-forward and ssh commands, as demonstrated below:
Log in with port-forwarding
kubectl port-forward svc/slurm-login-slurmuser1 10022:22, works as follows:
- The
kubectl port-forwardcommand creates a port-forward. svc/specifies that the targeted resource is a Service.slurm-login-slurmuser1is the exact name of the targeted Kubernetes Service. Replace this value with the name used within your namespace.10022:22defines the port mapping. In this case, it forwards traffic from local port10022to port22on the target Service.
ssh example-user@localhost -p 10022, then connects to the local port 10022. Due to the port-forwarding performed in the prior command, this traffic is sent to port 22 of the specified Kubernetes services.
You are now logged into the Slurm login node and can run Slurm commands.
Run Slurm commands
After logging in, you will have access to all normal Slurm operations to submit jobs or manage the cluster. SchedMD provides extensive documentation for Slurm commands and some handy printable cheat-sheets To verify that the cluster is working, run a simple job. For example, discover the hostname on 6 nodes, as shown below:Add yourself as a Slurm user
root, run the command above for each account you need to be added to.
Troubleshooting
For troubleshooting purposes in cases where SSH is not possible,kubectl exec can be used to access the Slurm login node as root. This method is useful for debugging and maintenance tasks.
Access the Slurm login node with kubectl exec