How do you manage Kubernetes access on EKS for humans and CI in a current setup?
IntermediateProductionIdentity, Least Privilege & OIDC for CI
Answer
Use EKS access entries (cluster authentication mode API) instead of editing the aws-auth ConfigMap. Access entries are managed through the EKS API, show up in CloudTrail and cannot be broken by a bad YAML edit that locks everyone out.
aws eks create-access-entry --cluster-name prod \
--principal-arn arn:aws:iam::111122223333:role/AWSReservedSSO_Developer_abc123
aws eks associate-access-policy --cluster-name prod \
--principal-arn arn:aws:iam::111122223333:role/AWSReservedSSO_Developer_abc123 \
--policy-arn arn:aws:eks::aws:cluster-access-policy/AmazonEKSViewPolicy \
--access-scope type=namespace,namespaces=payments
For finer control, map the entry to a Kubernetes group and bind that group with namespaced RoleBindings. Disable bootstrapClusterCreatorAdminPermissions in Terraform so the creator role does not keep hidden admin.
More on Identity, Least Privilege & OIDC for CI
How do you design AWS OIDC trust for GitHub Actions so only production deploys can assume the prod role?IntermediateWhat are the common mistakes in OIDC trust policies for CI?AdvancedHow do you configure OIDC for GitLab CI to AWS?IntermediateHow do you get from "everyone has AdministratorAccess" to least privilege without breaking things?AdvancedWhat SCP guardrails do you apply across an AWS organisation?IntermediateHow do you implement just-in-time (JIT) privileged access for production?Intermediate