BM: Baca dalam Bahasa Melayu
World K2: Trays & Orders
Liveness, readiness and startup probes
You will learn: how Kubernetes checks that your app is awake, ready and started.
Checked with Kubernetes 1.37 on 31 Oct 2026
The problem
A cook dozes off at the stove. The stall still looks open, so orders keep coming. Nothing gets cooked. How would the manager know?
Pick one answer.
Try it
Kubernetes asks each container up to three questions. Each question is a probe. Sort what each one does.
Drag a card into a box. Or tap the card, then tap the box.
Watch
kind-dev namespace defaultA liveness probe: "Is the cook still awake?" If it keeps failing, the kubelet restarts the container. asks: awake? sleepy checks /healthz, a page nginx does not have. Three 404s in a row: the kubelet restarts the container.
Try it
Press “App says not ready”. Watch the trays turn amber. Then run kubectl get pods: READY drops, RESTARTS stays 0.
kind-dev namespace defaultshop3/3 ready
dev-control-planeOpenManagerNo trays here.
dev-workerOpen- shop·75mv6
- shop·zs9v2
dev-worker2Open- shop·jg5l8
Hint
A readiness probe: "Ready to serve?" If it fails, the pod gets no customers from its Service. No restart. never restarts anything. It only takes the tray off the order number.Predict
All 3 shop trays fail readiness. What happens to customers who call the Service?
Pick one answer.
Try it
A startup probe: "Still warming up?" Gives a slow app time to start before the other probes begin. gives a slow cook time. 30 tries, 10 seconds apart: up to 5 minutes. Liveness waits until it passes. Fix the typo.
Fix the manifest, then press Apply.
Check
kind-dev namespace defaultshy fails readiness only. READY 0/1, STATUS Running, RESTARTS 0. Not ready is not broken. It just gets no customers.
You did it!
You can now pick the right probe: awake, ready or warmed up.
Go deeper (optional)
A probe can be httpGet, tcpSocket, exec or grpc. Keep liveness about the app itself. If it checks the database, one slow database restarts every tray.
Real rep (optional): on a throwaway cluster, apply sleepy.yaml and run kubectl describe pod sleepy. Read the Events.
Bahasa Melayu
Seorang tukang masak terlelap depan dapur. Gerai masih nampak buka, jadi pesanan terus masuk. Tiada apa dimasak. Bagaimana pengurus nak tahu?
Kubernetes tanya setiap container sehingga tiga soalan. Setiap soalan ialah probe (semakan). Susun apa yang setiap satu buat.
Liveness probe bertanya: berjaga? sleepy semak /healthz, halaman yang nginx tiada. Tiga kali 404 berturut-turut: kubelet hidupkan semula container.
Tekan “Aplikasi kata belum sedia”. Perhati dulang jadi kuning. Kemudian jalankan kubectl get pods: READY turun, RESTARTS kekal 0.
Ketiga-tiga dulang shop gagal readiness. Apa jadi pada pelanggan yang panggil Service?
Startup probe beri masa kepada tukang masak yang lambat. 30 cubaan, 10 saat setiap satu: sehingga 5 minit. Liveness tunggu sampai ia lulus. Baiki salah taip.
shy hanya gagal readiness. READY 0/1, STATUS Running, RESTARTS 0. Belum sedia bukan bermakna rosak. Ia cuma tak dapat pelanggan.
Kini anda boleh pilih probe yang betul: berjaga, sedia atau dah panas.
You finished this before. Practice is always welcome!
Official docs: Kubernetes: Liveness, readiness and startup probes · Kubernetes: Configure probes
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?