BM: Baca dalam Bahasa Melayu
World K3: Counters & Doors · Boss challenge
Open the doors
You will learn: to route / and /api through a Gateway with TLS, and lock the database.
Checked with Kubernetes 1.37 on 31 Oct 2026
The problem
kind-dev namespace defaultBoss: opening night at Kedai Kancil! Customers need / and /api, over HTTPS. The database must stay locked. Five rooms. Go!
Try it
Room 1: Mei copied the /api sign from an old Ingress. It won’t apply. Fix it.
Fix the manifest, then press Apply.
Hint
kubectl lists the path types it knows. Pick the prefix one.Try it
Room 2: build the entrance and put up the signs. Then knock on /api.
kind-dev namespace defaultapi2/2 readydb1/1 readyshop3/3 ready
dev-control-planeOpenManagerNo trays here.
dev-workerOpen- api·t8fcl
- shop·4jjmg
- shop·s7gcz
dev-worker2Open- api·czglm
- db·jlkfb
- shop·dxr6c
Hint
The door isentrance.yaml. The signs are routes.yaml.Try it
Room 3: on a teammate’s copy, /api answers 503. Find the broken hop and switch it back.
Something is broken. Find it, fix it, then send again.
- BrowserGET /api/menu on port 80
- Gateway (entrance)entrance listens on :80
- HTTPRoute (signboard)/api → api:80
- Service (order number)api: port 80 → 8080
- EndpointSlice (ready trays)0 ready of 0
- Pod (tray)api-6d8f7b9c5d-k2x8p listens on :8080
Hint
503 means the order number has no ready trays. Check what it selects.Try it
Room 4: lock the order on the way. The certificate Secret kedai-tls is ready. Open the HTTPS door.
kind-dev namespace defaultentrance 172.18.0.200/ → shop/api → apiapi2/2 readydb1/1 readyshop3/3 ready
dev-control-planeOpenManagerNo trays here.
dev-workerOpen- api·l2nhc
- shop·7vjrt
- shop·zs7lw
dev-worker2Open- api·6dt9n
- db·mqvk2
- shop·crjtt
Hint
tls.yaml adds the HTTPS listener to the same entrance.Check
Your boss asks: “Who renews that certificate in three months?”
Pick one answer.
Try it
Final room: lock the database. Only the api may call it. Two files are ready: db-deny.yaml and db-lock.yaml. Read them first.
kind-dev namespace defaultentrance 172.18.0.200/ → shop/api → apiapi2/2 readydb1/1 readyshop3/3 ready
dev-control-planeOpenManagerNo trays here.
dev-workerOpen- api·shnfm
- shop·65h4h
- shop·vfxd9
dev-worker2Open- api·fbvhc
- db·9vvzw
- shop·dv2kn
Hint
Locking out everyone also locks out the api. You need a guest list.Check
Last question. Why did the shop get a timeout, not an error page?
Pick one answer.
You did it!
You can now open the doors safely, and lock the database.
Go deeper (optional)
In the practice cluster, the database answers web requests on 5432. So wget can test the lock. A real Postgres speaks its own protocol. Test it with a database client instead.
Real rep (optional): the same rooms on your kind cluster (kind 0.24 or newer):
Real mission
0 of 4 steps done · Your ticks are saved.
Bahasa Melayu
Boss: malam pembukaan Kedai Kancil! Pelanggan perlukan / dan /api, melalui HTTPS. Pangkalan data mesti kekal berkunci. Lima bilik. Jom!
Bilik 1: Mei salin papan /api dari Ingress lama. Ia tak boleh apply. Baikinya.
Bilik 2: bina pintu masuk dan pasang papan tanda. Kemudian ketuk di /api.
entrance.yaml. Papan tandanya routes.yaml.Bilik 3: dalam salinan rakan sepasukan, /api jawab 503. Cari langkah yang rosak dan tukar semula.
Bilik 4: kunci pesanan di tengah jalan. Secret sijil kedai-tls dah sedia. Buka pintu HTTPS.
tls.yaml tambah listener HTTPS pada pintu masuk yang sama.Bos anda tanya: “Siapa perbaharui sijil itu tiga bulan lagi?”
Bilik terakhir: kunci pangkalan data. Hanya api boleh panggil. Dua fail dah sedia: db-deny.yaml dan db-lock.yaml. Baca dulu.
Soalan terakhir. Kenapa kedai dapat timeout, bukan halaman ralat?
Kini anda boleh buka pintu dengan selamat, dan kunci pangkalan data.
You finished this before. Practice is always welcome!
Official docs: Gateway API: HTTP routing · cert-manager: Gateway API support · Kubernetes: Network Policies
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?