Interview Prep/Kubernetes/Security: RBAC, ServiceAccounts & Pod Security

How does IRSA (and EKS Pod Identity) give Pods AWS permissions?

IntermediateConceptSecurity: RBAC, ServiceAccounts & Pod Security
Answer

IRSA: the ServiceAccount is annotated with an IAM role ARN; a projected OIDC token is exchanged through sts:AssumeRoleWithWebIdentity against the cluster's OIDC provider, so the Pod gets short-lived role credentials. EKS Pod Identity (newer) uses an agent and pods.eks.amazonaws.com trust, an association API and no per-cluster OIDC provider setup.

metadata:
  annotations:
    eks.amazonaws.com/role-arn: arn:aws:iam::123456789012:role/s3-reader
All Kubernetes questions Roadmap: Kubernetes networking, storage & scaling

More on Security: RBAC, ServiceAccounts & Pod Security