BM: Baca dalam Bahasa Melayu
World K5: Lunch Rush
Capstone mission 4: Run it
You will learn: to run Kedai Kancil in your kind cluster with overlays, a Gateway, probes and an HPA, then prove it survives.
Checked with Kubernetes 1.37 on 31 Oct 2026
The problem
Want 3, see 3. Delete a tray: the manager sees 2 and makes 1 more.
Want 3. See 3. All good.
dev-workerOpen- shop·d6b6z
- shop·zbn9j
dev-worker2Open- shop·gnjxm
Mission 4: Run it. Kedai Kancil moves into your kind cluster. Goal: it survives a pod kill and a lunch rush. Kill a tray above to see the idea.
Watch
Your repo gets a k8s/ folder. The base holds what every kitchen shares. An overlay changes it for one kitchen: dev. Where does each piece go?
Drag a card into a box. Or tap the card, then tap the box.
Watch
The base only says kedai-kancil-web. The dev overlay below has an images: part. What does it do?
Pick one answer.
Here is the overlay. Put your GitHub name where it says YOU.
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: kedai
resources: [../../base, hpa.yaml, gateway.yaml]
images:
- { name: kedai-kancil-web, newName: ghcr.io/YOU/kedai-kancil-web, newTag: main }
- { name: kedai-kancil-api, newName: ghcr.io/YOU/kedai-kancil-api, newTag: main }Try it
Step 1: build it, on your machine. Your ticks are saved.
Real mission
mkdir -p k8s/base k8s/overlays/devkubectl create namespace kedaikubectl apply -k k8s/overlays/dev --dry-run=serverkubectl apply -k k8s/overlays/devgit add k8s && git commit -m "Run Kedai Kancil on Kubernetes" && git push
0 of 11 steps done · Your ticks are saved.
Predict
api runs 2 ready trays. You delete one during the load test. What should a customer see?
Pick one answer.
Try it
Step 2: prove it survives. Use a second terminal to watch.
Real mission
kubectl get pods -n kedai --watchkubectl delete pod -n kedai API_POD_NAMEkubectl run load -n kedai --image=busybox:1.37 --restart=Never -- /bin/sh -c "while sleep 0.01; do wget -q -O- http://api; done"kubectl get hpa -n kedai --watchkubectl delete pod load -n kedai
0 of 6 steps done · Your ticks are saved.
Check
GitHub’s public API can see your files. Type your username, then check.
Check it on GitHub
- Your kedai-kancil repo is publicNot checked yet
- It has a kustomization.yaml in k8s/baseNot checked yet
- It has a kustomization.yaml in k8s/overlays/devNot checked yet
Check
The API can’t see your laptop’s cluster. Check these yourself.
Real mission
0 of 6 steps done · Your ticks are saved.
You did it!
You can now run Kedai Kancil on Kubernetes, and prove it heals and scales.
Go deeper (optional)
Safety: use a throwaway kind cluster. Run kubectl config current-context before every delete. The insecure metrics-server flag is for kind only. Your images are public, so never bake a secret into them. Make the database Secret with kubectl, and keep the password out of Git.
Bahasa Melayu
Misi 4: Jalankan. Kedai Kancil pindah ke kluster kind anda. Matlamat: ia bertahan bila pod dibunuh dan bila waktu puncak. Bunuh satu pod (dulang) di atas untuk lihat ideanya.
Repo anda dapat folder k8s/. Base simpan apa yang semua dapur kongsi. Overlay ubahnya untuk satu dapur: dev. Di mana setiap bahagian diletak?
Base cuma kata kedai-kancil-web. Overlay dev di bawah ada bahagian images:. Apa yang ia buat?
Ini overlay itu. Letak nama GitHub anda di tempat YOU.
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: kedai
resources: [../../base, hpa.yaml, gateway.yaml]
images:
- { name: kedai-kancil-web, newName: ghcr.io/YOU/kedai-kancil-web, newTag: main }
- { name: kedai-kancil-api, newName: ghcr.io/YOU/kedai-kancil-api, newTag: main }
Langkah 1: bina, di komputer anda. Tanda anda disimpan.
api ada 2 pod sedia. Anda padam satu semasa ujian beban. Apa yang pelanggan patut nampak?
Langkah 2: buktikan ia bertahan. Guna terminal kedua untuk memerhati.
API awam GitHub boleh nampak fail anda. Taip nama pengguna anda, kemudian semak.
API tak dapat lihat kluster di laptop anda. Semak ini sendiri.
Kini anda boleh jalankan Kedai Kancil di Kubernetes, dan buktikan ia pulih dan berskala.
You finished this before. Practice is always welcome!
Official docs: Kubernetes: Kustomize · Gateway API: getting started · Kubernetes: configure probes · Kubernetes: HPA walkthrough
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?