Interview Prep/DevSecOps/Kubernetes Security

Your private image registry is reachable but pods in some namespaces pull from it with a shared imagePullSecret containing an admin token. What is wrong?

BeginnerScenarioKubernetes Security
Answer

Situation read → The pull secret can push and delete images. Anyone who reads it can overwrite production images.

What I'd do →

  1. Replace it with a read-only pull credential, ideally per namespace or team.
  2. Better: use node or workload identity (ECR via the node role, GKE Artifact Registry via Workload Identity) so no pull secret is needed.
  3. Rotate the admin token right away.
  4. Enable tag immutability on the registry.

Why → Pulling and pushing are different trust levels; runtime only needs to pull.

Interview tip → Pair this with "deploy by digest" for defence in depth.

All DevSecOps questions Roadmap: Supply chain, secrets & identity

More on Kubernetes Security