What should Kubernetes audit logs and control-plane logs feed into?
AdvancedProductionLog Pipelines
Answer
Audit logs answer "who did what to which resource". Send them to a tamper-resistant store (SIEM, S3 with Object Lock) with long retention, plus a searchable tier for investigations. Write an audit policy that logs Metadata for most resources, RequestResponse for sensitive ones only, and never logs Secret bodies:
- level: Metadata
resources: [{ group: "", resources: ["secrets", "configmaps"] }]
On EKS enable audit control plane logging to CloudWatch, then forward to the SIEM. Alert on things like create clusterrolebinding or exec into prod pods.
More on Log Pipelines
What does a production log pipeline look like end to end?BeginnerWhy structured (JSON) logging, and what fields should every log line have?BeginnerFluent Bit, Vector, Grafana Alloy or the OpenTelemetry Collector: how do you choose a log agent?IntermediateWhy add an aggregation tier instead of sending directly from agents to the backend?IntermediateHow do you design log retention tiers?IntermediateHow do you scrub PII from logs in the pipeline?Intermediate