BM: Baca dalam Bahasa Melayu
World K6: Guards
Three gates: authn, authz, admission
You will learn: the three checks every kubectl request passes, and how to tell their errors apart.
Checked with Kubernetes 1.37 on 31 Oct 2026
The problem
At 3 a.m., someone ran kubectl delete on your shop. The cluster said yes. Which question should it have asked first?
Pick one answer.
Watch
Tap each point on the timeline.
Every kubectl command knocks on the API server’s door. Three gates stand there, one after another. Tap each gate.
Watch
kind-dev namespace defaultGate 1 is authentication: Gate 1, the ID check: "Who are you?" A certificate or token proves it.. It reads your ID card and learns your name and groups. kubectl auth whoami shows what gate 1 sees.
Try it
Which gate stops each one? Sort them.
Drag a card into a box. Or tap the card, then tap the box.
Hint
Gate 1 knows people. Gate 2 knows rights. Gate 3 knows trays.Try it
Pretend to be the CI bot. Ask the cluster for its secrets.
kind-dev namespace defaultdev-control-planeOpenManagerNo trays here.
dev-workerOpenNo trays here.
dev-worker2OpenNo trays here.
Hint
The bot’s full name issystem:serviceaccount:default:ci-bot.Check
Three real errors. Each one comes from a different gate.
Tap the error from gate 2.
0 of 1 found
Plain words: Unauthorized is gate 1. Forbidden with “cannot” is gate 2. Forbidden with “violates” is gate 3.
Predict
Gate 2 says yes: you may create pods. Can gate 3 still say no?
Pick one answer.
You did it!
You can now name the three gates every request passes.
Go deeper (optional)
Kubernetes has no user objects. People come from certificates or a login provider (OIDC). Robots use ServiceAccounts, which are objects. Gate 3 has two halves. Mutating admission may change your object. Then validating admission checks it. Reads like get skip gate 3.
Real mission
kubectl auth whoamikubectl get secrets --as=system:serviceaccount:default:default
0 of 3 steps done · Your ticks are saved.
Bahasa Melayu
Pukul 3 pagi, seseorang jalankan kubectl delete pada kedai anda. Kluster kata boleh. Soalan apa patut ia tanya dulu?
Setiap arahan kubectl ketuk pintu API server. Tiga pintu berdiri di situ, satu demi satu. Tekan setiap pintu.
Pintu 1 ialah authentication (semakan identiti). Ia baca kad ID anda, lalu tahu nama dan kumpulan anda. kubectl auth whoami tunjuk apa yang pintu 1 nampak.
Pintu mana yang halang setiap satu? Asingkan.
Berlakon jadi bot CI. Minta secret daripada kluster.
system:serviceaccount:default:ci-bot.Tiga ralat sebenar. Setiap satu datang dari pintu berbeza.
Maksud mudah: Unauthorized ialah pintu 1. Forbidden dengan “cannot” ialah pintu 2. Forbidden dengan “violates” ialah pintu 3.
Pintu 2 kata boleh: anda boleh cipta pod. Bolehkah pintu 3 masih kata tidak?
Kini anda boleh namakan tiga pintu yang setiap permintaan lalui.
You finished this before. Practice is always welcome!
Official docs: Controlling access to the Kubernetes API · Authenticating · Authorization · Admission control
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?