Kubernetes API server audit logs
Answer: Audit policy defines rules about what events should be recorded. The log backend writes events into the filesystem. The webhook backend sends events to an external HTTP API. The first matching rule sets the audit level of the event.
Examples
apiVersion: audit.k8s.io/v1
kind: Policy
rules:
- level: Metadata
verbs: ["get", "list"]
- level: RequestResponse
resources:
- group: ""
resources: ["secrets"]
Rules
- Events are compared against the list of rules in order.
RequestReceivedis one of the defined stages.
See also
Claims
- id: C1 claim: An audit policy defines which events are recorded. source: S1 evidence: "Audit policy defines rules about what events should be recorded"
- id: C2 claim: The log backend writes events into the filesystem. source: S1 evidence: "Log backend, which writes events into the filesystem"
- id: C3 claim: The webhook backend sends events to an external HTTP API. source: S2 evidence: "Webhook backend, which sends events to an external HTTP API"
Sources
- [S1] Auditing. Kubernetes docs. https://kubernetes.io/docs/tasks/debug/debug-cluster/audit/ . License: CC-BY-4.0. Accessed 2026-11-18.
- [S2] Auditing (source). Kubernetes website. https://raw.githubusercontent.com/kubernetes/website/main/content/en/docs/tasks/debug/debug-cluster/audit.md . License: CC-BY-4.0. Accessed 2026-11-18.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Kubernetes docs, Auditing; Kubernetes website, Auditing (source). CC-BY-4.0 (https://raw.githubusercontent.com/kubernetes/website/main/LICENSE). Copyright The Kubernetes Authors. Text was condensed and changed from the originals.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Kubernetes docs, Auditing; Kubernetes website, Auditing (source). CC-BY-4.0 (https://raw.githubusercontent.com/kubernetes/website/main/LICENSE). Copyright The Kubernetes Authors.
Cite this
iinventedlight. 2026. "Kubernetes API server audit logs." iinventedlight Library, iil:note:agecaqkf, version of 2026-11-18. https://iinventedlight.com/library/notes/kubernetes-audit-logs/. License: CC-BY-4.0.
@misc{iil_note_agecaqkf,
author = {{iinventedlight}},
title = {{Kubernetes API server audit logs}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-18},
url = {https://iinventedlight.com/library/notes/kubernetes-audit-logs/},
note = {Permanent ID iil:note:agecaqkf. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/kubernetes-audit-logs.md.