At Quillfern Parcels. This is the system from chapter 4 of the Quillfern story, "From one server to a cluster": Bookings triple. One server cannot hold the load, and a failed server still means an outage.
What the model simplifies
The scheduler places each replica on a node whose free allocatable CPU and memory cover its requests, preferring the node with the most room left (the default least-allocated scoring, with no other plugins). Limits do not affect placement: CPU over the limit is throttled, memory over the limit gets the container killed (OOMKilled, exit code 137) and restarted with a growing back-off. Every number on this page comes from one shared set of calculations, which the simulation questions use too, so a question can never disagree with what the simulator shows.
The drills, written out
New pods stay Pending after a scale-up
- Healthy state. Three replicas, each requesting 500m CPU and 512Mi, are spread over the three nodes and all ready.
- Trigger. Before a sale, someone scales to six replicas and raises the CPU request to 1500m "to be safe".
- What is affected. The new pods, and the sale traffic they were meant to serve.
- Symptoms. kubectl get pods shows 5 pods Pending for minutes. The old pods were replaced in a rolling update, so capacity went down, not up.
- Metrics. 1 of 6 scheduled. Free CPU is about 1100m on node-a, 1400m on node-b, and 2600m on node-c, so only node-c fits a 1500m pod, and only once.
node-a free: 1100m CPU, 2596Mi
node-b free: 1400m CPU, 2992Mi
node-c free: 2600m CPU, 5592Mi
- Logs. The pod events name the reason.
Warning FailedScheduling 0/3 nodes are available: node-a: insufficient cpu (1100m free, 1500m requested); node-b: insufficient cpu (1400m free, 1500m requested); node-c: insufficient cpu (1100m free, 1500m requested).
- Reasoning. Scheduling uses requests, not real use. The nodes have idle CPU, but it is promised to other pods, so a large request cannot fit anywhere.
- Mitigation. Set the request back to what the app uses, 500m, measured from its metrics. All six pods fit: 1, 1, 4 on nodes a, b, c.
- Recovery. All six replicas are ready before the sale starts.
- Prevention. Size requests from measured use, add a cluster autoscaler for real growth, and alert on pods Pending for more than a few minutes.
A memory leak puts pods in CrashLoopBackOff
- Healthy state. The orders container uses about 416Mi of memory against a 768Mi limit.
- Trigger. Release 2.14 caches every order it reads and never lets go, so memory climbs past 900Mi.
- What is affected. Every replica, because they all run the same release.
- Symptoms. Pods restart again and again; their status turns to CrashLoopBackOff, and requests fail while no pod is ready.
- Metrics. Ready drops to 0 of 3; the restart count climbs; memory use rises in a sawtooth that ends at the limit each time.
- Logs. kubectl describe pod shows how the last container ended.
Last State: Terminated
Reason: OOMKilled
Exit Code: 137
Warning BackOff Back-off restarting failed container
- Reasoning. Exit code 137 is 128 plus signal 9: the kernel killed the process because the container went over its memory limit. CPU over a limit only slows a container; memory over a limit ends it.
- Mitigation. Roll back to release 2.13, which does not leak, and raise the limit to 1024Mi for headroom while the leak is fixed.
- Recovery. Pods stay up: 3 of 3 ready, memory flat at about 416Mi.
- Prevention. Load-test each release for memory growth over time, alert on restarts and OOMKilled events, and keep limits based on measured peaks.
Learn it properly
All simulators · Curriculum map