AI Infra Interviews logo
Kubernetes, Slurm & GPU Scheduling / 15
mediumNewAnyscaleDatabricks

What is Ray on Kubernetes good for, and where do its scheduler and the Kubernetes scheduler fight each other?

Ray gives you actors, tasks and placement groups inside a cluster of pods that Kubernetes thinks are just pods. Two schedulers, two views of the same GPUs: the idle-node arithmetic, the placement group that cannot be gang-scheduled by the layer below, and the rules that stop the two from wasting each other's capacity.

Updated Sep 2026 · Grounded in real AI infrastructure interview loops and written to a senior-engineer editorial bar, with every number worked and every diagram hand-built.

Ray gives you actors, tasks and placement groups inside a cluster of pods that Kubernetes thinks are just pods. Two schedulers, two views of the same GPUs: the idle-node arithmetic, the placement group that cannot be gang-scheduled by the layer below, and the rules that stop the two from wasting each other's capacity.

more free answers with an account · no card

The concepts behind this question

Ranked by how closely each one overlaps this question's topic, so the first card is the thing to read if the answer above moved too fast.

Advanced
🗂️ Scheduling & Orchestration🔒 Premium
Ray on KubernetesRay is a distributed compute framework that turns a cluster into one Python program: tasks and actors placed by Ray's own scheduler, with libraries for data loading, training, tuning and serving on top. KubeRay runs Ray clusters as Kubernetes resources. The combination is common in ML platforms because it gives researchers a single API for pipelines, distributed training and serving, and it is awkward in exactly one place: Ray has a scheduler and Kubernetes has a scheduler, and a platform engineer has to decide which one owns the GPUs. This page covers what Ray is good for, how KubeRay works, and where the two schedulers fight.
Advanced
🚀 Inference & Serving🔒 Premium
Inference Autoscaling and Cold StartsScaling an LLM fleet is harder than scaling a web service because a replica takes minutes to become useful (pull an image, load 141 GB of weights, warm the cache) and costs several dollars an hour while idle. The signals that work are queue depth and TTFT against the SLO, not GPU utilization, which is misleading for memory-bound decode. The design is a warm pool sized for the burst, hysteresis so the fleet does not thrash, and a cold-start path measured in seconds through snapshots and weight streaming.
Core
🗂️ Scheduling & OrchestrationSign in
MIG, MPS and Time-SlicingA whole H100 is far more than a notebook, a small inference service or a CI job needs, and giving each of them a card leaves most of the fleet idle. Three mechanisms share a GPU, and they differ in what they isolate: MIG partitions the hardware into up to seven slices with their own memory and compute, MPS lets several processes share one GPU's SMs concurrently with no memory isolation, and time-slicing context-switches between processes with no isolation at all. The choice is the isolation the workload needs against the utilization the platform wants.
Foundational
🗂️ Scheduling & Orchestration
Kubernetes GPU SchedulingKubernetes knows nothing about GPUs until something tells it. The NVIDIA device plugin advertises each node's GPUs as a countable resource, the scheduler matches a pod's request to a node with enough of them, and the container runtime wires the device in. That model is enough for one job per GPU and breaks the moment you need sharing, topology or multi-node placement, which is where Dynamic Resource Allocation, the GPU Operator and the batch schedulers come in. Knowing which layer does what is the platform interview's opening question.
UP NEXT ON YOUR JOURNEY
FEDITOR'S NOTE

Scored on saying clearly that Ray schedules work inside pods that Kubernetes schedules onto nodes, on the placement-group versus gang mismatch, and on giving a concrete waste number for the double-autoscaler problem.

DISCUSSION · 0

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