How do you let pods on EKS access S3 without static keys?
IntermediateScenarioSecurity, RBAC and policy
Answer
Situation read → Developers put AWS keys in Secrets.
What I'd do →
- Use IRSA: associate an OIDC provider with the cluster and create an IAM role trusted by the ServiceAccount
- Annotate the ServiceAccount with
eks.amazonaws.com/role-arn - Or use EKS Pod Identity with
aws eks create-pod-identity-association - Scope the IAM policy to the bucket
- Verify with
aws sts get-caller-identityinside the pod
Why → The pod receives temporary credentials via web identity, no secrets to rotate.
Interview tip → Pod Identity is simpler across clusters.
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?BeginnerA pod has access to the node's IAM role through IMDS. How do you prevent credential theft?AdvancedHow do you enforce a default-deny network posture in a namespace?Intermediate