AI Infra Interviews logo
← Kubernetes, Slurm & GPU Scheduling / 03
medium★ EssentialCoreWeaveCrusoeNebius

Slurm or Kubernetes for a 2,000-GPU training cluster? Make the case, and tell me what you lose either way.

Choose the control plane from job admission, placement, recovery and service needs, with a concrete partial-allocation failure.

Updated Sep 2026 · Learn how AI infrastructure works through explanations, worked examples and diagrams, then practise applying it to interview questions.

TL;DR: Choose between complete, configured platforms for the jobs you need to run. Slurm provides a mature batch allocation model; Kubernetes provides service reconciliation and container tooling, with batch behavior depending on the installed integrations. Either choice needs tested placement, recovery and a team that can operate it.

How to approach it

Describe the dominant jobs, their size and failure behavior. Test whether each candidate admits complete jobs, maps ranks to the intended topology and restores progress. Include service lifecycle and operator effort in the comparison.

A strong answer

A team has synchronous training jobs and an inference service. Training needs all required workers together; inference needs replicas that become ready, receive traffic and roll forward safely. Choosing a scheduler because it can launch a container leaves most of that work unanswered. Slurm vs Kubernetes is useful only when the comparison names the installed components and policies.

A job needs the whole allocationJob ANeeds 8 GPUsHolds 4; waitsJob BNeeds 8 GPUsHolds 4; waits8 GPUs occupied; neither can start.Coordinated admissionGive A all 8; B stays queued.Release, then admit B.

The diagram is a hypothetical broken allocator, not a claim that every Kubernetes installation behaves this way. The current Kubernetes ecosystem includes multiple ways to coordinate workloads. Verify the deployed release, enabled APIs, batch controllers and scheduler integrations rather than repeating that Kubernetes can never schedule groups.

Slurm for AI Clusters explains its resource and job model. Slurm's scheduling guide describes priority ordering and backfill. Backfill can start a lower-priority job when doing so will not delay a higher-priority reservation under the scheduler's assumptions. Requested time limits matter. GPU generic-resource configuration, topology and accounting also need explicit setup; they are not inferred perfectly from installing a controller.

Be precise about terminology. Slurm's feature called gang scheduling includes timeslicing jobs on shared resources. That is different from the broader requirement to allocate enough workers together for synchronous progress. Container integrations such as Pyxis are additional components, not proof that every Slurm installation has the same container support.

RequirementEvidence to request
Whole-job admissionTwo competing large jobs make progress without holding unusable partial allocations
Topology placementActual rank/device/NIC map and matched throughput
RecoveryOne failed worker produces a bounded, correct restart
Service operationReadiness, traffic draining, rollout and rollback behavior
FairnessDocumented quota, borrowing and starvation policy

Kubernetes can combine workload admission, a training controller and GPU scheduling. Kueue's ClusterQueue model manages resource quota and sharing, but quota admission is not by itself proof that every worker can be physically placed. Test the complete path, including topology and health. Count each integration as something to configure, upgrade and diagnose.

Slurm can keep a process running, but a serving platform also needs to decide when that process is ready, send it traffic and replace it safely during a release. Those responsibilities need an owner. The same distinction applies in the other direction: a Kubernetes Deployment can replace a failed pod, but it does not automatically coordinate recovery of a distributed training job. Compare how each proposed platform supplies the missing behavior.

A simple capacity example separates scheduler efficiency from workload demand:

Cluster: 2,000 GPUs in 250 eight-GPU nodes
Job request: 1,200 GPUs = 150 nodes
Remaining capacity after admission: 800 GPUs = 100 nodes
Another 1,200-GPU job cannot start at full size yet
Two 1,000-GPU jobs could fit: 125 + 125 = 250 nodes, subject to other constraints
Sanity: better scheduling cannot fit 2,400 simultaneous GPUs into 2,000.

Favor Slurm when the team's requirements and expertise center on batch allocation, accounting and training. Favor a Kubernetes-based platform when service lifecycle and existing operational integrations dominate and the batch path passes acceptance tests. A hybrid can work, but it needs clear resource ownership and two maintained control planes. Reverse the initial choice if measured reliability or staffing cost makes the presumed advantage disappear; there is no universal workload-percentage threshold.

What interviewers probe next

  • "Can both schedule the same GPU?" Only through explicit coordination; independent ownership creates conflicting allocations.
  • "What makes backfill safe?" A valid reservation model and credible runtime limits, not merely a small job size.
  • "What is the migration test?" Reproduce admission, placement, recovery and output correctness on representative jobs.

Common mistakes

  • Calling every useful integration a native feature.
  • Comparing a configured batch platform with an unconfigured container scheduler.
  • Ignoring who maintains a second control plane.

Key takeaways

  • Test complete-job progress, not successful pod creation.
  • Two 1,200-GPU jobs cannot fit simultaneously on 2,000 GPUs.
  • Version, integration and operating ownership decide the practical comparison.
You can read the first 10 answers per topic without an account. Signing in increases that to 20, includes lessons marked Plus, and saves your progress so you can return to topics you want to review.no card · Google sign-in · nothing to cancel
HOW DID IT GO?
0
READING SIGNED OUT

Signing in doubles your free answers, from 10 to 20 per topic, and the site starts remembering you: mastery per topic, bookmarks, and a next-focus recommendation. Free, no card.

Sign in free
UP NEXT ON YOUR JOURNEY
FEDITOR'S NOTE

Compare the configured systems against the same job lifecycle, including queueing, cancellation, recovery and upgrades.

DISCUSSION · 0

No comments yet — be the first to share your approach.