BM: Baca dalam Bahasa Melayu
World K2: Trays & Orders
Deployments: the standing order
You will learn: how a Deployment, its ReplicaSet and its pods fit together.
Checked with Kubernetes 1.37 on 31 Oct 2026
The problem
A ReplicaSet keeps 3 trays of nginx 1.29. The menu moves to 1.30, so you edit its template. What happens to the 3 trays already out?
Pick one answer.
Watch
kind-dev namespace defaultA Deployment: The manager's standing order, like "always 3 trays". is the manager’s standing order: “always 3 trays of this dish”. It makes a ReplicaSet, which makes the pods. Three layers, one file.
Try it
Who makes whom? Put the one you write at the top.
The one you write at the top. Put these in order. Use the arrows, or drag.
- ReplicaSet shop-747bf9cf8: the Deployment makes it
- Pods shop-747bf9cf8-…: the ReplicaSet makes them
- Deployment shop: you write this
Hint
Look at the names. Each layer adds a piece to the name above it.Try it
Your turn. Apply shop.yaml. When all 3 trays are up, change the order to 4.
kind-dev namespace defaultWant 0. See 0. All good.
dev-control-planeOpenManagerNo trays here.
dev-workerOpenNo trays here.
dev-worker2OpenNo trays here.
Hint
kubectl apply -f shop.yaml, then kubectl scale deployment shop --replicas=4.Predict
Someone deletes the ReplicaSet shop-747bf9cf8. Its 3 trays go with it. What does the Deployment do?
Pick one answer.
Check
kind-dev namespace defaultThe ReplicaSet came back with the same name. Its name comes from the template, so same template, same name. The trays inside are new.
You did it!
You can now explain how a Deployment, its ReplicaSet and its pods fit together.
Go deeper (optional)
Read a pod name from the left. shop is the Deployment. 747bf9cf8 comes from the template (the pod-template-hash label). The last part is random. To close the shop for good, delete the Deployment, not its pods.
Real rep (optional): on a throwaway cluster, run kubectl get deploy,rs,pods --show-labels.
Bahasa Melayu
ReplicaSet jaga 3 dulang nginx 1.29. Menu bertukar ke 1.30, jadi anda ubah templatnya. Apa jadi pada 3 dulang yang sudah keluar?
Deployment ialah arahan tetap pengurus: “sentiasa 3 dulang hidangan ini”. Ia buat ReplicaSet, dan ReplicaSet buat pod. Tiga lapisan, satu fail.
Siapa buat siapa? Letak yang anda tulis di atas sekali.
Giliran anda. Apply shop.yaml. Bila 3 dulang sudah sedia, tukar pesanan kepada 4.
kubectl apply -f shop.yaml, kemudian kubectl scale deployment shop --replicas=4.Seseorang padam ReplicaSet shop-747bf9cf8. Tiga dulangnya hilang sekali. Apa Deployment buat?
ReplicaSet kembali dengan nama yang sama. Namanya datang dari templat, jadi templat sama, nama sama. Dulang di dalamnya baharu.
Kini anda boleh terangkan cara Deployment, ReplicaSet dan pod saling berkait.
You finished this before. Practice is always welcome!
Official docs: Kubernetes: Deployments · kubectl get
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?