The logs told a story no one wanted to hear. A container was breached. Credentials were abused. The Kubernetes cluster was no longer trusted.
Forensic investigations in Kubernetes are fast, precise, and unforgiving. Every second after an incident matters. You need to capture container runtime state, audit API server activity, and secure control plane logs before evidence disappears. Attackers understand how ephemeral workloads work—they count on traces vanishing.
Start with cluster-wide API audit logs. These reveal every request, command, and authentication. In Kubernetes, this is where you find unusual kubectl exec calls, unexpected pod creation, or altered role bindings. Lock these logs into an immutable store immediately.
Inspect node-level runtime data. Capture pod filesystem snapshots, environment variables, and running process lists. Use tools that work with container runtime interfaces to extract these artifacts without altering them. In forensic terms, preserve before you analyze.
Check etcd directly. It holds cluster state—Secrets, ConfigMaps, RBAC policies—and changes here can show hidden privilege escalations. Protect the etcd data directory as evidence.