VFlash: Fast, Accurate Visual Planning via Flash Primitive Decoding
u_Unrolled
D17: Cloud & AI Platform · Kubernetes for ML — Reconciliation, GPU Scheduling and Batch Jobs

Kubernetes for ML — Reconciliation, GPU Scheduling and Batch Jobs

15 min read·Intermediate· Unrolled Pro
Kubernetes for ML — Reconciliation, GPU Scheduling and Batch Jobs

You already know: containers and images (D11 Platform tools); probes, autoscaling and rollouts as concepts (D11 Model deployment, D14 Reliability); consensus and etcd (D14 Fundamentals); gang-scheduled multi-GPU training (D15); instance types and pricing (Cloud fundamentals).

Why this matters for Atlas. Kubernetes is the standard way to run containers across a fleet of machines: you declare what should run ("5 replicas of the tutor server, each with 1 GPU"), and controllers continuously make reality match. For ML it provides a shared pool of GPUs that training, inference, evaluation and pipelines can all draw from, with health checks, rollouts and autoscaling. It also has well-known gaps for ML (it schedules one pod at a time, so a 64-GPU job can wait forever), filled by add-ons like Kueue, Volcano and operators for Ray and PyTorch. This lesson builds the core ideas: the reconciliation loop, resource requests and bin-packing GPUs, and gang scheduling with queues.


1. Declarative state and the reconciliation loop

The question. What does Kubernetes actually do when you "apply" a Deployment?

Start from nothing. You submit desired state (YAML objects) to the API server, which stores it in etcd (a Raft-replicated store, D14). Controllers run endless loops: observe the actual state, compare with the desired state, take actions to reduce the difference, repeat. A Deployment controller makes sure the right number of pods (one or more containers scheduled together) exist; the scheduler assigns pending pods to nodes; the kubelet on each node starts containers and reports health. Crashes, node failures and manual deletions are all just "actual ≠ desired" and get corrected the same way. That's the property that makes Kubernetes resilient: no step-by-step scripts, only convergence.

That's the preview. The full lesson, with its code and exercises, is part of Unrolled Pro.
Staff AI & Pro Tier Lesson

Unlock "Kubernetes for ML — Reconciliation, GPU Scheduling and Batch Jobs"

The foundations are free forever. Unrolled Pro unlocks the complete lesson, production architectures, and 55 battle-tested ML system design case studies.

Everything included with Pro:
All 234+ Deep-Dive Lessons across transformer internals, inference, RAG & agents
55 Staff-Level ML & System Design Case Studies with mathematical capacity estimates
AI Engineer Sheet & Exercises with worked solutions, self-checks, and code
100 Landmark Research Papers guided walkthroughs & progress tracking
14-Day Money-Back Guarantee — 100% full refund if you aren't satisfied
View Plans & Unlock All Lessons

From ₹167/mo (~$2/mo) · Cancel anytime · Instant activation

100% Risk-Free: 14-day no-questions-asked money-back guarantee