- Kubernetes service accounts obtain AWS credentials via OIDC.
- IAM users and roles are mapped to Kubernetes RBAC subjects using the
aws-authConfigMap. - EKS IAM APIs enforce control-plane permissions for cluster operations.
EKS clusters must have an OIDC provider associated before you can grant pods AWS permissions. You can set this up via
eksctl or the AWS CLI.Key Components of EKS Authentication
| Component | Purpose | Example Use Case |
|---|---|---|
| OIDC Provider | Federates Kubernetes service accounts with IAM roles | Pod-specific S3 or DynamoDB access |
| aws-auth ConfigMap | Maps IAM users/roles to Kubernetes RBAC identities | Grant team members kubectl permissions |
| EKS IAM APIs | Authorizes control-plane operations | Creating/updating clusters and nodegroups |
1. OpenID Connect (OIDC)
Amazon EKS uses OIDC to exchange a Kubernetes service account token for temporary AWS credentials. Follow these steps:- Associate an OIDC provider
- Create an IAM role with a trust policy
- Annotate your Kubernetes service account
my-service-account the permissions defined in MyPodRole.
2. aws-auth ConfigMap
Theaws-auth ConfigMap defines which IAM users and roles can interact with the Kubernetes API server.Updating it carefully is crucial:
A malformed
aws-auth ConfigMap can lock you out of the cluster. Always back up the existing ConfigMap before applying changes.3. EKS IAM APIs
Every EKS control-plane operation—like creating or scaling a node group—uses AWS IAM behind the scenes:- Cluster creation: Calls
CreateCluster,DescribeCluster. - Node group updates: Calls
UpdateNodegroupConfig,DeleteNodegroup. - Add-ons and attachments: Manage managed add-ons via
CreateAddon,AssociateEncryptionConfig.
References
- Amazon EKS Authentication
- IAM OIDC Identity Providers
- eksctl for cluster and OIDC management