Interview Prep/DevSecOps/Container and IaC Security

You must run customer-submitted code in your platform. What isolation do you choose?

AdvancedScenarioContainer and IaC Security
Answer

Situation read → Standard containers share a kernel, which is not a strong enough boundary for hostile code.

What I'd do →

  1. Use microVMs (Firecracker, Kata Containers) or a user-space kernel (gVisor) through a Kubernetes RuntimeClass.
  2. Place them on a dedicated node pool with taints.
  3. Deny egress by default with NetworkPolicy; allow only needed endpoints.
  4. Set CPU, memory, pid and time limits; short-lived pods.
  5. No cloud credentials: block IMDS and use no service account token (automountServiceAccountToken: false).

Why → Defence rests on the smallest possible kernel attack surface plus no useful credentials.

Interview tip → Compare the trade-off: gVisor has syscall overhead, Kata needs virtualisation.

All DevSecOps questions Roadmap: Policy as code

More on Container and IaC Security