Interview Prep/DevSecOps/Container and IaC Security

A team wants a privileged container for Docker-in-Docker builds in Kubernetes CI. What do you offer instead?

BeginnerScenarioContainer and IaC Security
Answer

Situation read → Privileged pods can break out to the node. The need is to build images, not to run Docker.

What I'd do →

  1. Use BuildKit in rootless mode or Buildah in an unprivileged pod.
  2. Use a remote builder service (BuildKit daemon, cloud build) outside the cluster.
  3. Run builders on a separate, tainted node pool with no production credentials.
  4. Block privileged: true through admission policy elsewhere.

Why → Moving builds off shared nodes isolates the risk.

Interview tip → Say you replace the tool instead of granting the privilege.

All DevSecOps questions Roadmap: Policy as code

More on Container and IaC Security