EKS interview question · Most asked
IRSA or EKS Pod Identity: how do pods get AWS permissions?
Summary
Both give a Kubernetes ServiceAccount an IAM role so pods get short-lived AWS credentials without static keys. IRSA (IAM Roles for Service Accounts) uses the cluster's OIDC provider and a trust policy per role referencing the cluster and ServiceAccount. EKS Pod Identity, the newer option, uses an EKS-managed agent and pod identity associations created through the EKS API, with a simpler trust policy that can be reused across clusters.
Longer Answer
Pod Identity advantages: no OIDC provider to set up per cluster, role trust policies that do not change per cluster, associations managed alongside the cluster, and session tags for attribute-based access control. IRSA remains necessary in some cases (for example self-managed Kubernetes on EC2, or pods on Fargate, which Pod Identity has not supported; check the current docs), and many existing setups use it.
Either way, avoid granting permissions to the node instance role, because every pod on the node could use them; restrict pod access to the instance metadata service (IMDSv2 with hop limit 1).
Key Points
- Both map ServiceAccounts to IAM roles.
- IRSA: OIDC provider + per-cluster trust.
- Pod Identity: EKS agent + associations, reusable trust.
- Never rely on the node role; restrict IMDS.
More most-asked EKS questions
- How do you secure an EKS cluster end to end?
- EKS or ECS: how would you choose?
- How does the Amazon VPC CNI work, and why do EKS clusters run out of IP addresses?
- Compare the EKS compute options: managed node groups, self-managed nodes, Fargate, Karpenter and EKS Auto Mode.
- How do you expose services on EKS? Explain the AWS Load Balancer Controller.
- How do you upgrade an EKS cluster, and what are standard and extended support?
- Why is Karpenter popular on EKS, and how does it differ from the Cluster Autoscaler?
- What is Amazon EKS, and what does AWS manage versus what do you manage?