Interview Prep/Kubernetes/Security, RBAC and policy

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 →

  1. Use IRSA: associate an OIDC provider with the cluster and create an IAM role trusted by the ServiceAccount
  2. Annotate the ServiceAccount with eks.amazonaws.com/role-arn
  3. Or use EKS Pod Identity with aws eks create-pod-identity-association
  4. Scope the IAM policy to the bucket
  5. Verify with aws sts get-caller-identity inside the pod

Why → The pod receives temporary credentials via web identity, no secrets to rotate.

Interview tip → Pod Identity is simpler across clusters.

All Kubernetes questions Roadmap: Kubernetes networking, storage & scaling

More on Security, RBAC and policy