How do you secure access to the API server on EKS?
IntermediateScenarioSecurity, RBAC and policy
Answer
Situation read → The cluster endpoint is open to the world.
What I'd do →
- Set the endpoint to private or restrict
publicAccessCidrs - Use IAM authentication with access entries and least-privilege groups
- Enable control plane logging (api, audit, authenticator)
- Remove the creator admin where possible
- Use SSO and short-lived tokens for humans
Why → Reducing exposure and authenticating through IAM covers most risk.
Interview tip → Mention aws eks update-cluster-config.
More on Security, RBAC and policy
A developer needs read-only access to one namespace. How do you grant it?BeginnerExplain the difference between Role, ClusterRole, RoleBinding and ClusterRoleBinding.IntermediateA CI pipeline needs to deploy to one namespace. What identity do you give it?IntermediateWhat does a ServiceAccount do and why should you disable the token automount?BeginnerHow do you let pods on EKS access S3 without static keys?IntermediateA pod has access to the node's IAM role through IMDS. How do you prevent credential theft?Advanced