A pod can create other pods in its namespace. Why is that dangerous?
AdvancedScenarioSecurity, RBAC and policy
Answer
Situation read → Reviewing RBAC shows create pods for a CI ServiceAccount.
What I'd do →
- Explain that creating pods allows mounting any Secret or ServiceAccount in the namespace and running arbitrary images
- Treat
create pods,exec,get secretsandimpersonateas privilege escalation paths - Constrain with PSA restricted and admission policy
- Split CI per namespace
- Audit with
kubectl auth can-i --list
Why → Pod creation lets the actor assume the identities and data available in the namespace.
Interview tip → Mention RBAC escalation prevention (bind and escalate verbs).
More on Security, RBAC and policy
A developer needs read-only access to one namespace. How do you grant it?BeginnerExplain the difference between Role, ClusterRole, RoleBinding and ClusterRoleBinding.IntermediateA CI pipeline needs to deploy to one namespace. What identity do you give it?IntermediateWhat does a ServiceAccount do and why should you disable the token automount?BeginnerHow do you let pods on EKS access S3 without static keys?IntermediateA pod has access to the node's IAM role through IMDS. How do you prevent credential theft?Advanced