World map

 

BM: Baca dalam Bahasa Melayu

World K1: The Food Court

Want 3, See 2

You will learn: how Kubernetes heals itself.

Checked with Kubernetes 1.37 on 31 Oct 2026

The problem

You are here: cluster kind-dev namespace default
The food court at night. The stall dev-worker goes dark: its status is NotReady. Two trays sat on it. Terminal output: $ kubectl get nodes NAME STATUS ROLES AGE VERSION dev-control-plane Ready control-plane 6m22s v1.37.0 dev-worker NotReady <none> 6m22s v1.37.0 dev-worker2 Ready <none> 6m22s v1.37.0

Your app’s server died at 3 a.m. Everyone was asleep. Who fixes it?

Watch

The manager's board says Want 3: the order for shop asks for 3 trays.

Want 3. See 3. All good.

Want3written on the order for shop
See33 ready
Do All goodGaps fixed: 0
Stalls: 3. Trays: 3 (3 ready). Waiting for a stall: 0.
dev-workerOpen
  • shop·d6b6z
  • shop·zbn9j
dev-worker2Open
  • shop·gnjxm

You tell Kubernetes what you want: 3 copies, always. This is the desired state: What is written on the order board. Kubernetes keeps chasing it..

Watch

You are here: cluster kind-dev namespace default
kubectl get deployment shop says READY 3/3. Three green trays sit on the stalls. Terminal output: $ kubectl get deployment shop NAME READY UP-TO-DATE AVAILABLE AGE shop 3/3 3 3 22s

A controller: A manager who checks again and again: want 3, see 2, make 1 more. checks again and again. Want 3. See 3. All good.

Predict

A whole stall closes, and one tray is lost. What happens next?

Pick one answer.

Watch

You are here: cluster kind-dev namespace default
One shop pod is deleted. Right away a new pod with a new name appears, so there are 3 again. Terminal output: $ kubectl delete pod shop-747bf9cf8-d6b6z pod "shop-747bf9cf8-d6b6z" deleted from default namespace $ kubectl get pods NAME READY STATUS RESTARTS AGE shop-747bf9cf8-gnjxm 1/1 Running 0 24s shop-747bf9cf8-wrfvr 0/1 Running 0 2s shop-747bf9cf8-zbn9j 1/1 Running 0 24s

Want 3. See 2. Make 1 more. That is the whole trick.

Try it

Tap “delete” on any pod. Watch what Kubernetes does.

The board shows Want 3, See 3. Delete a pod: See 2, then Make 1 more. The Gaps fixed counter goes up.

Want 3. See 3. All good.

Want3written on the order for shop
See33 ready
Do All goodGaps fixed: 0
Stalls: 3. Trays: 3 (3 ready). Waiting for a stall: 0.
dev-workerOpen
  • shop·d6b6z
  • shop·zbn9j
dev-worker2Open
  • shop·gnjxm

Try it

Now change the order. Type kubectl scale deployment shop --replicas=5.

You are here: cluster kind-dev namespace default

Want 3. See 3. All good.

Want3written on the order for shop
See33 ready
Do All goodGaps fixed: 0
Stalls: 3. Trays: 3 (3 ready). Waiting for a stall: 0.
dev-control-planeOpenManager

No trays here.

dev-workerOpen
  • shop·d6b6z
  • shop·zbn9j
dev-worker2Open
  • shop·gnjxm
Time: +0s (sped up)

Check

Tap the new pod.

0 of 1 found

The new pod has a new name. Kubernetes replaces pods; it does not repair them.

You did it!

You can now explain how Kubernetes heals itself.

Go deeper (optional)

This loop is called reconciliation: The loop that keeps fixing what is real until it matches the order board.. If only a container crashes, the kubelet restarts it in the same pod. Watch the RESTARTS column. When a node dies, Kubernetes waits about 5 minutes. Then it replaces the pods.

You are here: cluster kind-dev namespace default
A pod is deleted. kubectl get pods -w watches: the old pod shows Terminating, a new pod goes Pending, then Running, then ready 1/1. Terminal output: $ kubectl delete pod shop-747bf9cf8-d6b6z --wait=false pod "shop-747bf9cf8-d6b6z" deleted from default namespace $ kubectl get pods -w NAME READY STATUS RESTARTS AGE shop-747bf9cf8-d6b6z 1/1 Terminating 0 22s shop-747bf9cf8-gnjxm 1/1 Running 0 22s shop-747bf9cf8-wrfvr 0/1 Pending 0 0s shop-747bf9cf8-zbn9j 1/1 Running 0 22s shop-747bf9cf8-wrfvr 0/1 Running 0 1s shop-747bf9cf8-d6b6z 1/1 Terminating 0 23s shop-747bf9cf8-wrfvr 1/1 Running 0 6s ^C

Real mission

  1. kubectl create deployment shop --image=nginx:1.29-alpine --replicas=3
  2. kubectl get pods
  3. kubectl delete pod <a shop pod name>
  4. kubectl get pods

0 of 4 steps done · Your ticks are saved.