User Management
Crusoe Managed Slurm allows you to create multiple Linux users with access to your Slurm cluster. Each user is provisioned across all Slurm components — login nodes, compute nodes, and the controller. Users are managed via the SlurmUser Kubernetes Custom Resource, and groups via the SlurmUserGroup Custom Resource.
CLI-based user management is coming soon. For now, users and groups are managed via kubectl.
Prerequisites
- A running Managed Slurm cluster (see Quickstart)
kubectlconfigured with access to the CMK cluster backing the Slurm cluster. Since the name of the backing CMK cluster matches the name of your Slurm cluster, the following command will givekubectlthe correct credentials:crusoe kubernetes clusters get-credentials <slurm-cluster-name>
Get Your Cluster Name
Run the following command to find the SlurmCluster name used as the clusterReference in user and group resources:
kubectl get slurmclusters -n slurm
Example output:
NAMESPACE NAME AGE
slurm my-slurm-cluster 4h25m
Limitations
- By default, all users have sudo access (via the
slurm-admingroup). SetdisableSudo: truein the user spec to remove sudo access. - Usernames must be valid POSIX usernames: max 32 characters, start with a lowercase letter, contain only lowercase letters, digits, or hyphens, and not end with a hyphen
- UIDs are automatically assigned from the range 10000–29999. Group GIDs are assigned from the range 50000–65533.
- Changes to users or groups take approximately one minute to propagate through the cluster
Managing Users
Creating a User
Create a file named user-alice.yaml:
apiVersion: slurm.crusoe.ai/v1alpha1
kind: SlurmUser
metadata:
name: alice # POSIX username (max 32 chars, lowercase + digits + hyphens)
namespace: slurm
spec:
clusterReference: my-slurm-cluster # Must match your SlurmCluster name (immutable after creation)
fullName: "Alice Johnson" # Optional — GECOS field
shell: /bin/bash # Optional — defaults to /bin/bash
sshPublicKeys: # One or more SSH public keys
- ssh-ed25519 AAAAC3... alice@laptop
disableSudo: false # Optional — set to true to remove sudo access (default: false)
Apply it:
kubectl apply -f user-alice.yaml
The user can now SSH into the login nodes:
ssh -i <path-to-private-key> alice@<login-node-endpoint>
Find the login node IP using crusoe slurm clusters get <cluster-name> and looking at the login node endpoint field. You can also find the login node IP in the UI in the Slurm cluster detail view. Alternatively:
kubectl get svc -n slurm
The EXTERNAL-IP of the login service is the login node IP.
Listing Users
kubectl get slurmusers -n slurm
Example output:
NAMESPACE NAME USERNAME UID GID CLUSTER CREATED AGE
slurm alice alice 10001 10001 my-slurm-cluster True 8s
Updating a User
The sshPublicKeys, fullName, shell, and disableSudo fields can be updated after creation. The clusterReference field is immutable. Use the following command:
kubectl edit slurmuser -n slurm alice
Use kubectl explain slurmusers.spec to see all available fields and their descriptions directly from the cluster.
Deleting a User
kubectl delete slurmuser -n slurm alice
The user immediately loses access to the Slurm cluster.
Managing Groups
SlurmUserGroup resources let you organize users into groups for features like partition access control.
Creating a Group
Create a file named group-ml-team.yaml:
apiVersion: slurm.crusoe.ai/v1alpha1
kind: SlurmUserGroup
metadata:
name: ml-team # POSIX group name (max 32 chars, same naming rules as users)
namespace: slurm
spec:
clusterReference: my-slurm-cluster # Must match your SlurmCluster name (immutable after creation)
members: # List of SlurmUser names
- alice
- bob
Apply it:
kubectl apply -f group-ml-team.yaml
Users must reconnect their SSH session to pick up new group membership.
Listing Groups
kubectl get slurmusergroups -n slurm
Example output:
NAMESPACE NAME GROUPNAME GID MEMBERS CLUSTER CREATED AGE
slurm ml-team ml-team 50000 2 my-slurm-cluster True 80s
Updating a Group
Add or remove users by editing the spec.members list:
kubectl edit slurmusergroup -n slurm ml-team
Deleting a Group
kubectl delete slurmusergroup -n slurm ml-team
Next Steps
- Quickstart — Set up your Slurm cluster
- Managing Partitions — Create and manage partitions in your Slurm cluster
- Slurm Metrics — Monitor cluster health and job performance
- Advanced: Kubernetes Operations — Direct kubectl access, CRD-level configuration, and prolog/epilog scripts
- For Slurm command reference, see the official Slurm documentation