BM: Baca dalam Bahasa Melayu
World K6: Guards
Audit logs
You will learn: to find out who did what in your cluster, and how much the logbook should write.
Checked with Kubernetes 1.37 on 31 Oct 2026
The problem
Friday, 3 a.m.: someone deleted the shop Deployment. Who did it?
Pick one answer.
Watch
An audit log: The guard's logbook: who asked the API server for what, and when. is the guard’s logbook. Every request becomes one event. Here is one, trimmed. Tap the line that says who.
Tap the line that says who did it.
0 of 1 found
Try it
Each rule in the audit policy picks a level: how much the guard writes. Put the levels from least to most.
Least detail at the top. Put these in order. Use the arrows, or drag.
- None: write nothing
- Request: also what was sent
- Metadata: who, what, when
- RequestResponse: also what came back
Try it
Pick a level for each kind of request.
Drag a card into a box. Or tap the card, then tap the box.
Predict
Your policy logs Secrets at RequestResponse. What did you just do?
Pick one answer.
Check
Good logbook habit, or risky? Swipe each one.
Swipe right for good, left for needs work. Or use the buttons.
Ship audit logs off the cluster to safe storage
You did it!
You can now read the guard’s logbook, and choose what it writes.
Go deeper (optional)
The API server needs --audit-policy-file and --audit-log-path. Without a policy file, nothing is logged. Pod Security adds notes too, like pod-security.kubernetes.io/audit-violations. kind can turn auditing on with a little extra config. Its docs have an Auditing page.
Real mission
kubectl run audit-me --image=nginx:1.29-alpine && kubectl delete pod audit-me
0 of 4 steps done · Your ticks are saved.
Bahasa Melayu
Jumaat, pukul 3 pagi: seseorang padam Deployment shop. Siapa buat?
Log audit ialah buku log pengawal. Setiap permintaan jadi satu event. Ini satu, dipendekkan. Tekan baris yang sebut siapa.
Setiap peraturan dalam polisi audit pilih satu tahap: berapa banyak pengawal catat. Susun tahap dari paling sikit ke paling banyak.
Pilih tahap untuk setiap jenis permintaan.
Polisi anda catat Secret pada tahap RequestResponse. Apa yang anda baru buat?
Tabiat buku log yang baik, atau berisiko? Leret setiap satu.
Kini anda boleh baca buku log pengawal, dan pilih apa yang ia catat.
You finished this before. Practice is always welcome!
Official docs: Auditing · Audit annotations · Audit event API (audit.k8s.io/v1)
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?