EKS Login
An eks login connects your cloud user identity to the Kubernetes API server. You get a short token from your cloud account and send it with each request. Most teams map broad cloud roles to cluster admin groups to save time. This shortcut gives too many people the power to change or delete live workloads. How an eks login works with Kubernetes RBAC The eks login process has two main steps. First, the cloud provider checks who you are. Your client tool asks the cloud service for a signed token
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
An eks login connects your cloud user identity to the Kubernetes API server. You get a short token from your cloud account and send it with each request. Most teams map broad cloud roles to cluster admin groups to save time. This shortcut gives too many people the power to change or delete live workloads.
How an eks login works with Kubernetes RBAC
The eks login process has two main steps. First, the cloud provider checks who you are. Your client tool asks the cloud service for a signed token. The client puts this token into your local cluster settings file. When you run a command, your tool sends this token to the cluster API server.
Next, the cluster checks what your user can do. It maps your cloud identity to a Kubernetes user or group. Then Kubernetes role-based rules take over to check your permissions. In Kubernetes, a Role sets rules inside one single namespace. A ClusterRole sets rules across the whole cluster and covers cluster-wide items like nodes.
To give these rules to a user, you create a binding. A RoleBinding grants permissions inside one specific namespace. It can link to a Role in that namespace or to a shared ClusterRole. A ClusterRoleBinding grants permissions across the entire cluster at once. All rules in this system are additive, which means there are no deny rules.
Why native roles are not enough for safe cluster operations
Native roles and bindings solve the first part of cluster security. They decide who can complete an eks login and reach the API server. You can limit a team to one namespace with a RoleBinding. You can also control access to subresources like pod logs or pod exec sessions. In role rules, these subresources use a slash format to separate the resource and action.
Still, native setup stops once the API server approves the request. A role binding decides who logs in, not what individual commands do in flight. If a developer has permission to run pod exec, they can open a shell. Once inside the container, Kubernetes role rules do not check their shell commands. They can read local files, query internal databases, or view sensitive data.
EKS Access Management: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
The same gap exists when engineers read pod logs or inspect app data. Native cluster permissions are all or nothing for that resource. They cannot inspect the text returning from a pod or database query. They cannot rewrite sensitive fields like emails, phone numbers, card numbers, or national IDs. Teams also struggle to review every single command run inside a pod shell.
Managing day-to-day cluster access at scale
As teams grow, keeping cloud mappings and cluster bindings in sync gets hard. Engineers often need temporary access to fix a broken app in production. With native tools, an admin must edit a binding and remember to remove it later. Because there are no deny rules, adding a new binding can grant unexpected power. Teams need a way to approve single requests and mask sensitive output in real time.
Check Kubernetes API requests and responses on the wire
Kubernetes RBAC decides who may call the API server. RBAC does not check response payloads or split listing Secret names from reading Secret values when a role grants get access. With hoop.dev, you run an open-source HTTP proxy, a sidecar for your Kubernetes API. The kubectl client changes only the server address it talks to while RBAC stays in place.
On each call, hoop.dev guardrails read the method, normalized path, and headers to refuse bad deletes or full Secret reads with a 403 error. On the way back, hoop.dev data masking walks JSON responses by key and masks matched values in Secrets, ConfigMaps, and pod logs. Every request and verdict is logged without storing bearer tokens. View the project on GitHub.
Frequently asked questions
What is the difference between a Role and a ClusterRole after an eks login?
A Role applies rules inside one single namespace. A ClusterRole applies rules across all namespaces and covers cluster-wide items like nodes.
Can I add a deny rule to block specific actions in Kubernetes RBAC?
No, Kubernetes role permissions are purely additive. There are no deny rules, so users get the sum of all bound roles.
How does Kubernetes control access to pod logs and exec sessions?
Kubernetes treats logs and exec as subresources under the pods resource. You must grant permissions to those specific subresources in your Role or ClusterRole rules.
Related guides
In this post