Prerequisites
kubectlCLI installed and configured- Kubeconfig downloaded from your cluster
- Access to your cluster’s Slurm namespace
Configuration Files
Your Slurm cluster configuration is stored in a Kubernetes ConfigMap with four main files:| File | Purpose |
|---|---|
slurm.conf | Main cluster configuration (nodes, partitions, scheduling) |
gres.conf | GPU and generic resource definitions |
cgroup.conf | Control group resource management |
plugstack.conf | SPANK plugin configuration |
Edit Configuration
Update ConfigMap
Edit the ConfigMap directly:Restart Components
After editing the ConfigMap, restart the appropriate components: Forslurm.conf changes:
gres.conf or plugstack.conf changes:
Verify Changes
Configuration Examples
Configure GPU Resources
Editgres.conf to define GPU resources:
Modify Partitions
Edit the partition section inslurm.conf:
Tune Scheduler
Adjust scheduler parameters inslurm.conf:
Update Resource Allocation
Modify resource allocation settings:Enable Cgroup Limits
Editcgroup.conf to enforce resource limits:
slurm.conf:
Troubleshooting
Configuration Not Applied
Syntax Errors
Pods Not Restarting
Jobs Failing After Changes
Quick Reference
View Configurations
Restart Components
Monitor Cluster
Best Practices
- Back up configurations before making changes
- Test in development before applying to production
- Make incremental changes to isolate issues
- Document your changes for future reference
- Monitor logs and jobs after applying changes
- Use version control to track configuration changes
Slurm compute nodes run as pods (not daemonsets). When you delete compute node pods, they will automatically restart with the new configuration. Running jobs may be affected during the restart.
Additional Resources
- Slurm Configuration Tool - Interactive configuration generator
- Slurm Configuration Reference - Complete parameter documentation
- GRES Configuration - GPU and resource configuration guide
- Scheduling Configuration - Scheduler tuning guide