BM: Baca dalam Bahasa Melayu
World K6: Guards
Pod Security Standards
You will learn: the three Pod Security levels, and how one label switches a zone's guard on.
Checked with Kubernetes 1.37 on 31 Oct 2026
The problem
kind-dev namespace defaultA plain nginx tray. It ran fine yesterday. Today the kedai zone refuses it, with four reasons. Plain words: this zone only takes locked-up trays.
Watch
Tap each point on the timeline.
The Pod Security Standards: Three hygiene levels for trays: privileged, baseline and restricted. A namespace label switches one on. are three hygiene levels for trays. Tap each one, loosest first.
Watch
kind-dev namespace defaultOne label on the zone switches the guard on. enforce refuses bad pods. warn lets them in, with a warning.
Try it
Which level is the first to refuse each tray?
Drag a card into a box. Or tap the card, then tap the box.
Try it
Switch the guard on for the kedai zone, at the restricted level.
kind-dev namespace defaultdev-control-planeOpenManagerNo trays here.
dev-workerOpenNo trays here.
dev-worker2OpenNo trays here.
Hint
The label key ispod-security.kubernetes.io/enforce.Predict
Three old root pods already run in kedai. You switch on restricted. What happens to them?
Pick one answer.
Check
Good habit, or risky? Swipe each one.
Swipe right for good, left for needs work. Or use the buttons.
Turn on warn=restricted first, then fix what it reports
You did it!
You can now switch on a Pod Security level for a zone.
Go deeper (optional)
There are three modes: enforce, warn and audit (writes to the audit log). Pin a version with pod-security.kubernetes.io/enforce-version: v1.37. For a Deployment, the guard only warns. Its ReplicaSet’s pods are refused later. You meet that in the boss.
Real mission
kubectl create namespace guard-testkubectl label --dry-run=server --overwrite ns guard-test pod-security.kubernetes.io/enforce=restrictedkubectl label ns guard-test pod-security.kubernetes.io/enforce=restrictedkubectl run plain -n guard-test --image=nginx:1.29-alpine
0 of 4 steps done · Your ticks are saved.
Bahasa Melayu
Dulang nginx biasa. Semalam ia berjalan elok. Hari ini zon kedai menolaknya, dengan empat sebab. Maksud mudah: zon ini hanya terima dulang yang berkunci.
Pod Security Standards ialah tiga tahap kebersihan untuk dulang. Tekan setiap satu, yang paling longgar dulu.
Satu label pada zon hidupkan pengawal. enforce tolak pod yang tak lulus. warn benarkan masuk, dengan amaran.
Tahap mana yang pertama menolak setiap dulang?
Hidupkan pengawal untuk zon kedai, pada tahap restricted.
pod-security.kubernetes.io/enforce.Tiga pod root lama sudah berjalan dalam kedai. Anda hidupkan restricted. Apa jadi pada mereka?
Tabiat baik, atau berisiko? Leret setiap satu.
Kini anda boleh hidupkan tahap Pod Security untuk sesebuah zon.
You finished this before. Practice is always welcome!
Official docs: Pod Security Standards · Pod Security Admission · Enforce with namespace labels
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?