A pod has access to the node's IAM role through IMDS. How do you prevent credential theft?
AdvancedScenarioSecurity, RBAC and policy
Answer
Situation read → A compromised pod can query 169.254.169.254 and use node permissions.
What I'd do →
- Enforce IMDSv2 with hop limit 1 on node launch templates
- Use IRSA or Pod Identity for workload permissions
- Block
169.254.169.254with a NetworkPolicy for pods that do not need it - Keep the node role minimal
- Detect with GuardDuty EKS protection
Why → Hop limit 1 stops containers from reaching IMDS through the extra network hop.
Interview tip → Credential theft via IMDS is a classic cloud breach path.
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?IntermediateHow do you enforce a default-deny network posture in a namespace?Intermediate