Before any formula: read every symbol out loud in plain words so nothing enters undefined.
Every cell below is a distinct shape of problem. The worked examples are tagged with the cell(s) they cover.
| # |
Cell (case class) |
What makes it tricky |
Example |
| A |
Exact fit — request divides capacity |
no waste; floor is exact |
Ex 1 |
| B |
Leftover / stranded — request does not divide capacity |
floor drops a fraction → wasted resource |
Ex 2 |
| C |
Two constraints at once — RAM and GPU both limit |
the tighter one wins |
Ex 3 |
| D |
HPA scale-up — metric above target |
ratio >1, ceil rounds up |
Ex 4 |
| E |
HPA scale-down — metric below target |
ratio <1, replicas shrink |
Ex 5 |
| F |
Degenerate: zero load — Mcur=0 |
formula wants 0 replicas → floor/min-replica clamp |
Ex 6 |
| G |
Dead-band / no-op — ratio inside tolerance |
correct action is do nothing |
Ex 7 |
| H |
Limiting value: hits cluster ceiling — desired > max that fits |
HPA blocked by capacity, not maths |
Ex 8 |
| I |
Word problem — real cost/traffic story end-to-end |
translate English → symbols |
Ex 9 |
| J |
Exam twist — the "obvious" answer is the trap |
crash-loop / QoS misconception |
Ex 10 |
Recall the engine, and re-earn every symbol:
Recall Test the matrix (hide answers)
- Node 20 GB, Pod 6 GB — Pods and stranded? ::: ⌊20/6⌋=3, stranded 20−18=2 GB.
- Two limits RAM→7, GPU→4, which wins? ::: min(7,4)=4; the scarcer resource.
- Rcur=3, Mcur=80, Mtar=40? ::: ⌈3⋅2⌉=6.
- Mcur=0 — real answer? :::
minReplicas, not 0 (stock HPA can't scale to zero).
- Ratio 0.95 with 10% tolerance? ::: inside dead-band → do nothing.
- HPA wants 15 but only 8 GPUs fit? ::: 8 run, 7 Pending; add nodes.
- Fix for a crash-looping Pod? ::: probes / image, NOT more replicas.