An attacker could create pods in one namespace. List the paths they would use to escalate, and how you block each.
AdvancedScenarioKubernetes Security
Answer
Situation read → "Create pods" is more powerful than it sounds.
What I'd do →
- Mount any Secret or service account in that namespace via the pod spec: limit what lives there and use separate namespaces for sensitive workloads.
- Run privileged or with hostPath/hostPID to escape to the node: PSA
restrictedblocks it. - Schedule onto control plane or sensitive nodes with tolerations: policy engine restricting tolerations and nodeSelectors.
- Steal node credentials from IMDS: IMDSv2 hop limit 1 and egress deny.
- Reach other services: default-deny NetworkPolicies.
Why → Each control closes one escalation path; together they contain the attacker in one namespace.
Interview tip → Saying "create pod is effectively read all secrets in the namespace" shows 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