BM: Baca dalam Bahasa Melayu
World K1: The Food Court
Drive it with kubectl
You will learn: the six kubectl commands you will use every day.
Checked with Kubernetes 1.37 on 31 Oct 2026
The problem
Your boss says the shop is acting weird. You have one tool: kubectl. What do you do first?
Pick one answer.
Watch
kind-dev namespace defaultkubectl: Your walkie-talkie to the office: the command-line tool that talks to the API server. is your walkie-talkie to the office. kubectl apply -f tray.yaml puts up the order in that file. kubectl get pods lists your trays. Pending means still getting ready.
Try it
A tray looks odd? Ask for its whole story. Type kubectl describe pod tray. Read the Events at the end.
kind-dev namespace defaultdev-control-planeOpenManagerNo trays here.
dev-workerOpen- tray
dev-worker2Open- kitchen
Hint
describe ends with Events: what happened to this tray, in order.Predict
The kitchen app printed a message. Which command shows it?
Pick one answer.
Watch
kind-dev namespace defaultkubectl logs kitchen shows what the app printed. kubectl exec kitchen -- hostname runs one command inside the tray.
Try it
Build a command that asks the kitchen pod its name, from inside.
Tap the pieces in the right order.
Try it
Now tidy up. Read the pink bar first: kind-dev, default. Then delete the tray with kubectl delete pod tray.
kind-dev namespace defaultdev-control-planeOpenManagerNo trays here.
dev-workerOpen- tray
dev-worker2Open- kitchen
Hint
Only the tray goes. The kitchen pod stays.Check
Which commands only look, and which change the cluster?
Drag a card into a box. Or tap the card, then tap the box.
You did it!
You can now look, change and clean up with kubectl.
Go deeper (optional)
kubectl get pods -w keeps watching. kubectl logs -f kitchen follows new lines. kubectl exec -it kitchen -- sh opens a shell inside. The practice terminal only explains that one.
Real mission
kubectl run tray --image=nginx:1.29-alpinekubectl get podskubectl describe pod traykubectl logs traykubectl delete pod tray
0 of 5 steps done · Your ticks are saved.
Bahasa Melayu
Bos kata kedai berperangai pelik. Anda ada satu alat: kubectl. Apa yang anda buat dulu?
kubectl ialah walkie-talkie anda ke pejabat. kubectl apply -f tray.yaml pasang pesanan dalam fail itu. kubectl get pods senaraikan dulang anda. Pending maksudnya masih bersiap.
Dulang nampak pelik? Minta cerita penuhnya. Taip kubectl describe pod tray. Baca Events di hujung.
Aplikasi kitchen cetak satu mesej. Arahan mana yang tunjuk mesej itu?
kubectl logs kitchen tunjuk apa yang aplikasi cetak. kubectl exec kitchen -- hostname jalankan satu arahan di dalam dulang.
Bina arahan yang tanya nama pod kitchen, dari dalam.
Sekarang kemaskan. Baca bar merah jambu dahulu: kind-dev, default. Kemudian padam dulang dengan kubectl delete pod tray.
Arahan mana yang cuma tengok, dan mana yang ubah kluster?
Kini anda boleh tengok, ubah dan kemaskan dengan kubectl.
You finished this before. Practice is always welcome!
Official docs: kubectl quick reference · Debug pods · kubectl logs · kubectl exec
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?