BM: Baca dalam Bahasa Melayu
World K2: Trays & Orders
Restart or replace?
You will learn: when a container restarts inside its pod, and when the whole pod is replaced.
Checked with Kubernetes 1.37 on 31 Oct 2026
The problem
Two trays had trouble this morning. One kept its name, and its RESTARTS column says 1. The other has a brand-new name. What is the difference?
Pick one answer.
Try it
A container crash. Press “Crash a container”, then run kubectl get pods. Watch the name and RESTARTS: How many times the kubelet started a container again inside the same pod..
kind-dev namespace defaultdev-control-planeOpenManagerNo trays here.
dev-workerOpen- shop·7z98n
- shop·nq25c
dev-worker2Open- shop·blz2l
Hint
The kubelet on the stall restarts the container. The pod stays.Watch
The board wants 3 and sees 3. Delete a tray: it sees 2 and makes a new pod with a new name.
Want 3. See 3. All good.
dev-workerOpen- shop·7z98n
- shop·nq25c
dev-worker2Open- shop·blz2l
Now a whole tray goes. Delete one and watch. The manager makes a new tray with a new name. Kubernetes replaces pods; it does not repair them.
Try it
Restart in place, or a new tray? Sort what happens.
Drag a card into a box. Or tap the card, then tap the box.
Watch
kind-dev namespace defaultkubectl rollout restart replaces every tray, a few at a time. Same recipe, fresh trays. Compare the names before and after.
Check
You changed a setting the app reads only when it starts. How do all trays get it, with no downtime?
Pick one answer.
You did it!
You can now tell a container restart from a pod replacement.
Go deeper (optional)
Restarts wait longer each time: 10 s, 20 s, 40 s, up to 5 minutes. After 10 minutes without a crash, the wait resets. A new pod also gets a new IP address. That is why Services exist (World K3).
Real rep (optional): on a throwaway cluster, watch kubectl get pods -w during a rollout restart.
Bahasa Melayu
Dua dulang ada masalah pagi tadi. Satu kekal namanya, dan lajur RESTARTS tunjuk 1. Satu lagi ada nama baharu. Apa bezanya?
Container crash. Tekan “Rosakkan satu container”, kemudian jalankan kubectl get pods. Perhati nama dan RESTARTS.
Kini seluruh dulang hilang. Padam satu dan perhati. Pengurus buat dulang baharu dengan nama baharu. Kubernetes ganti pod; ia tak baiki pod.
Hidup semula di tempat, atau dulang baharu? Susun apa yang berlaku.
kubectl rollout restart ganti setiap dulang, sedikit demi sedikit. Resepi sama, dulang baharu. Banding nama sebelum dan selepas.
Anda ubah tetapan yang aplikasi baca hanya semasa mula. Bagaimana semua dulang dapat tetapan baharu, tanpa henti?
Kini anda boleh bezakan restart container dengan penggantian pod.
You finished this before. Practice is always welcome!
Official docs: Kubernetes: Container restarts · kubectl rollout restart
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?