Interview Prep/Kubernetes/Security, RBAC and policy

What would you do after finding a compromised pod in production?

AdvancedScenarioSecurity, RBAC and policy
Answer

Situation read → A crypto miner is running in a container.

What I'd do →

  1. Isolate: apply a deny-all NetworkPolicy or label to quarantine the pod
  2. Keep evidence: kubectl logs, kubectl get pod -o yaml, node-level forensics, and snapshot the volume
  3. Cordon the node and review other pods on it
  4. Rotate Secrets, ServiceAccount tokens and IAM roles it could reach
  5. Find the entry point (image, exposed dashboard, RBAC), fix, then rebuild from clean images

Why → Containing first preserves evidence and stops lateral movement.

Interview tip → Say "isolate, preserve, eradicate, rotate".

All Kubernetes questions Roadmap: Kubernetes networking, storage & scaling

More on Security, RBAC and policy