The cluster is the exam
Every lesson is a small cluster that is broken or unfinished, plus a goal. You fix it with your own kubectl. Nothing is multiple choice: kdrill verify checks the cluster and says exactly what is still wrong.
Recorded terminal session. kdrill verify passes five checks and fails one: all 3 replicas Running and ready, expected 3, got 2, with a hint to describe the Pending pod. After the fix, all six checks pass and verify exits 0.
$ kdrill verify
✓ Deployment web still asks for 3 replicas
✗ All 3 replicas are Running and ready
expected: 3 got: 2
→ Look at the Pending pod: kubectl describe pod <name>, then read the Events at the bottom.
✓ Each pod requests at least 1 CPU (1000m)
✓ There are still exactly 2 worker nodes
✓ node-a still has 4 allocatable CPUs
✓ node-b still has 4 allocatable CPUs
$ # a few kubectl commands later
$ kdrill verify
✓ Deployment web still asks for 3 replicas
✓ All 3 replicas are Running and ready
✓ Each pod requests at least 1 CPU (1000m)
✓ There are still exactly 2 worker nodes
✓ node-a still has 4 allocatable CPUs
✓ node-b still has 4 allocatable CPUs
Real kdrill verify output from k8s-scheduling/01, before and after the fix.
- 1A broken clusterA small k3d cluster, broken or unfinished on purpose. One pod is Pending and nobody has said why.
- 2A goalWhat done looks like, in one sentence: all 3 replicas Running, on the 2 existing nodes, each pod still requesting 1 CPU.
- 3Your own kubectlNot included. You already have one, and probably an alias for it.
- 4kdrill verifyChecks the real cluster and tells you exactly what is still wrong. Exits 0 when you are done.
- 5Progressive hintskdrill hint gives a little more away each time. kdrill solution has the reference answer.
- 6A reset buttonkdrill reset puts the lesson back the way it started. Break it as often as you like.
The bit set
Nine courses, 168 lessons. The more lessons, the bigger the bit. Press one to lift it out of the case.
Press a bit to see its lessons.
Specifications
| Power source | Your laptop |
|---|---|
| Memory | 8 GB (give Docker 4) |
| Cluster | One k3d (k3s) cluster called kdrill |
| Cloud bill | $0.00 |
| GPUs required | 0 (simulated: as many as you like) |
| Fake nodes | KWOK. Dozens of “H100 nodes” cost a few MB of RAM |
| Real traffic | Real containers for the Envoy and Istio courses |
| Real model | SmolLM2-135M on llama.cpp, CPU only, about 57 tokens/s |
| Training run | A 354k-parameter GPT in PyTorch, 1 to 3 minutes |
| Cluster required | Not for llm-from-zero : plain Python in a container |
| Gradients | Written by hand, before PyTorch does it for you |
| Lessons | 168 |
| Courses | 9, 2 more planned |
| Pager | Not included |
| Verify | Exits 0 when you are done |
- No cloud account
- Fits in 8 GB
- Your own kubectl
Caution
Will break your cluster. kdrill reset puts it back.
Do not point at production.
Requires Docker (Docker Desktop, OrbStack or Colima), k3d, kubectl, Go and helm. Sold separately, for free.
Instructions for use
Quick start
- git clone https://github.com/mousavian/kdrill
- cd kdrill && make build
- bin/kdrill doctorChecks docker, memory, k3d, kubectl.
- bin/kdrill cluster upOne k3d cluster called “kdrill”.
- bin/kdrill start k8s-scheduling/01Your first broken cluster.
Before you start
- Docker (Docker Desktop, OrbStack or Colima), k3d, kubectl, Go and helm.
- Give Docker about 4 GB of memory. The whole lab fits on an 8 GB laptop.
- No cloud account, no cloud bill, no GPU.