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 →
- Replace it with a read-only pull credential, ideally per namespace or team.
- Better: use node or workload identity (ECR via the node role, GKE Artifact Registry via Workload Identity) so no pull secret is needed.
- Rotate the admin token right away.
- 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.
More on Kubernetes Security
What are the 4Cs of cloud native security?BeginnerWhat happens to a request between `kubectl apply` and etcd from a security point of view?IntermediateExplain Role, ClusterRole, RoleBinding and ClusterRoleBinding.BeginnerHow do you check what a user or service account is allowed to do?BeginnerWhich RBAC permissions are effectively cluster-admin in disguise?AdvancedHow do service account tokens work now, and what is `automountServiceAccountToken`?Intermediate