How do you make sure audit logs from the Kubernetes API server are captured and useful?

IntermediateScenarioLogging Pipelines
Answer

Situation read → API audit logs answer "who did what to which resource", but default levels can be huge.

What I'd do →

  1. Write an audit policy: Metadata for most resources, RequestResponse for RBAC and secrets changes, None for noisy reads like get on events and leases.
  2. On self-managed clusters set --audit-policy-file and --audit-log-path or a webhook backend. On EKS enable the audit control plane log type to CloudWatch.
  3. Ship to the SIEM and alert on sensitive actions: create clusterrolebinding, exec into pods, secret reads by humans.

Why → Audit logs are your forensic record for cluster access.

Interview tip → Never log secret contents; use Metadata level for secrets.

All Monitoring & Observability questions Roadmap: Logging & tracing

More on Logging Pipelines