BM: Baca dalam Bahasa Melayu
World K5: Lunch Rush
PodDisruptionBudgets
You will learn: how to keep enough trays serving while you empty a stall.
Checked with Kubernetes 1.37 on 31 Oct 2026
The problem
Tonight you fix stall dev-worker. Two of your three shop trays sit there. If both leave at once, one tray serves the whole queue. How do you stop that?
Pick one answer.
Watch
kind-dev namespace defaultThat rule is a PodDisruptionBudget (PDB): A rule like "at least 2 trays stay up" during planned work, such as a drain. (PDB). --min-available=2 keeps 2 trays up. With 3 ready, ALLOWED DISRUPTIONS is 1: one may leave at a time.
Try it
Build that command yourself. Each piece shows what it means.
Tap the pieces in the right order.
Try it
Now empty stall dev-worker. The danger badge shows: a drain moves trays. Watch the budget make one tray wait its turn.
kubectl drain dev-worker --ignore-daemonsetskind-dev namespace defaultdev-control-planeOpenManagerNo trays here.
dev-workerOpen- shop·7tl6k
- shop·swpd9
dev-worker2Open- shop·frd8c
Hint
Copy the command above. Then let the clock run.Check
The drain printed: Cannot evict pod as it would violate the pod's disruption budget. What does it mean?
Pick one answer.
Check
A PDB only slows down planned moves. Sort each event.
Drag a card into a box. Or tap the card, then tap the box.
You did it!
You can now keep the shop serving while you empty a stall.
Go deeper (optional)
Use --max-unavailable instead to say how many may be down. Careful: a budget that allows 0 disruptions blocks every drain forever. After the work, kubectl uncordon dev-worker opens the stall again.
Real rep (optional): on kind, make a PDB. Then drain a worker and read each line.
Bahasa Melayu
Malam ini anda baiki node (gerai) dev-worker. Dua daripada tiga pod (dulang) kedai ada di situ. Kalau kedua-duanya pergi serentak, satu pod layan seluruh barisan. Macam mana nak elak?
Peraturan itu ialah PodDisruptionBudget (PDB). --min-available=2 kekalkan 2 pod hidup. Dengan 3 sedia, ALLOWED DISRUPTIONS ialah 1: satu boleh pergi pada satu masa.
Bina arahan itu sendiri. Setiap kepingan tunjuk maksudnya.
Sekarang kosongkan gerai dev-worker. Lencana bahaya muncul: drain pindahkan pod. Lihat bajet buat satu pod tunggu gilirannya.
kubectl drain dev-worker --ignore-daemonsetsDrain cetak: Cannot evict pod as it would violate the pod's disruption budget. Apa maksudnya?
PDB hanya perlahankan pemindahan yang dirancang. Asingkan setiap kejadian.
Kini anda boleh pastikan kedai terus melayan semasa anda kosongkan gerai.
You finished this before. Practice is always welcome!
Official docs: Kubernetes: disruptions · Kubernetes: configure a PodDisruptionBudget · kubectl drain
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?