Interview Prep/DevSecOps/Kubernetes Security

Security wants to know who deleted a production deployment last Friday. Audit logging was never configured. What do you set up?

IntermediateScenarioKubernetes Security
Answer

Situation read → Without audit logs, that question has no answer. Turn them on now and keep them off-cluster.

What I'd do →

  1. Managed clusters: enable control plane audit logs (aws eks update-cluster-config --logging '{"clusterLogging":[{"types":["audit"],"enabled":true}]}', GKE has Admin Activity on by default).
  2. Self-managed: write an audit policy logging RequestResponse for secrets metadata only, Metadata for most, and drop noisy reads.
  3. Ship to a SIEM with retention matching compliance (often 1 year).
  4. Alert on high-risk verbs: delete on deployments in prod, create on clusterrolebindings, pods/exec.
  5. For Friday's event: check GitOps history and CI logs, which may still show who changed what.

Why → Audit logs are the only record of who did what in the cluster.

Interview tip → Never log secret values at RequestResponse level; use Metadata for secrets.

All DevSecOps questions Roadmap: Supply chain, secrets & identity

More on Kubernetes Security