EKS Access Management API Lab
Why Access Entries are Better for DevSecOps
The legacy aws-auth method was essentially a "black box" to AWS IAM. Kubernetes handled the mapping internally. The new API brings several improvements:
-
Auditability: Every change is logged in AWS CloudTrail. You can see exactly who granted permissions and when.
-
No YAML Risk: You use AWS CLI, Terraform, or Pulumi commands. No more manual editing of a sensitive system ConfigMap.
-
Decoupled Permissions: You can grant access to an IAM role without having to create a corresponding Kubernetes RBAC Group manually in some cases, using Access Policies.
-
Visibility: You can run
aws eks list-access-entriesto see exactly who has access to your cluster directly from the AWS Console or CLI.
How it Works: The Three Components
Instead of one giant string in a ConfigMap, the new system uses three distinct AWS resources:
-
Access Entry: The "Identity" link. It tells EKS that a specific IAM Principal (User or Role) is allowed to talk to the cluster.
-
Access Policy: The "Permission" set. These are AWS-managed policies (like
AmazonEKSAdminPolicyorAmazonEKSViewPolicy) that map to Kubernetes permissions. -
Policy Association: The "Binding." This links the Access Entry to the Access Policy, scoped to a specific namespace or the whole cluster.
Lab: The Modern Way (Access Entry API)
If you still have your cluster from the previous step (or create a new one with --authentication-mode API), here is how you would grant the same "Reader" access using the new API.
Prerequisites
-
AWS CLI and
eksctlinstalled. -
Your AWS Account ID and preferred Region.