Investigation
Treat admission logs and policy reports as the definitive record of cluster safety.
Safe investigation sequence:
- Identify Violation: Use
kubectl get policyreportsor check cluster events for denied requests. - Trace Origin: Determine how the non-compliant workload reached the cluster (CI bypass, manual apply, GitOps drift).
- Analyze Intent: Compare the rejected manifest with the intended security baseline.
- Review Exceptions: Check if the failure was caused by a missing or misconfigured policy exception.
Containment
Containment is about re-establishing the cluster boundary without breaking existing legitimate workloads.
Containment steps:
- Activate Audit Mode: Switch new or complex policies to
Auditmode to gather evidence without blocking. - Remediate Upstream: Fix the root cause in the CI/CD pipeline or GitOps manifests.
- Isolate Non-Compliant: Move existing non-compliant workloads to a restricted namespace for investigation.
- Transition to Enforce: Shift policies back to
Enforcemode only after the audit reports are clean.
The goal is “enforcement by default, exceptions by documentation.”
Pause and Predict: What automated guardrail would have prevented this incident entirely?