AWS EC2 EKS
To run an aws ec2 eks setup, you link cloud roles to Kubernetes cluster rules. You deploy worker servers as compute instances and manage containers through the control plane. Most teams start by giving admin rights to developers so they can deploy apps fast. When roles are too broad, anyone can run commands inside live pods or read secrets. How aws ec2 eks permissions work in practice An aws ec2 eks cluster splits work between the control plane and worker nodes. The control plane runs the Kub
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.
To run an aws ec2 eks setup, you link cloud roles to Kubernetes cluster rules. You deploy worker servers as compute instances and manage containers through the control plane. Most teams start by giving admin rights to developers so they can deploy apps fast. When roles are too broad, anyone can run commands inside live pods or read secrets.
How aws ec2 eks permissions work in practice
An aws ec2 eks cluster splits work between the control plane and worker nodes. The control plane runs the Kubernetes API server and tracks the state of your apps. Worker nodes are virtual servers that run your containers and talk to the control plane. For this setup to work, both the cloud side and the cluster side check permissions.
First, a user or server logs in with a cloud identity. Then, the Kubernetes API server checks role-based rules to see what that user can do. In Kubernetes, a Role sets permissions inside one single namespace. A ClusterRole sets permissions across the whole cluster, including cluster-wide resources like worker nodes.
All rules in Kubernetes are purely additive, which means there are no deny rules. You attach these rules to users or groups with a RoleBinding or a ClusterRoleBinding. A RoleBinding grants rights inside one namespace, even if it points to a ClusterRole. A ClusterRoleBinding grants those rights across every namespace in the entire cluster.
How node and pod access work in aws ec2 eks
Admins often need to read pod logs or open a shell on a running container. Kubernetes treats these actions as subresources under the main pod resource. When you write a rule for logs or shell commands, you must list the subresource. If you grant broad rights to pod subresources, users can run any command in containers.
Worker nodes also need their own rules to join the cluster and pull container images. Each worker server uses a cloud role to talk to the cluster API server. Inside the cluster, node rules allow the server to report status and mount storage volumes. Keeping human user rules separate from worker server rules helps prevent mistakes during daily work.
AWS IAM Policies + EKS Access Management: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
What native cluster roles solve and what they miss
Native roles are great at deciding who can log into the cluster and view resources. You can limit a team to one namespace so they do not break other apps. You can also stop junior staff from deleting worker nodes or changing cluster settings.
Still, native setup rules only check permissions when a session starts. Once a user opens a container shell, Kubernetes does not check individual commands in flight. A user with shell rights can still read local files or dump app memory. Also, standard cluster logs only show that a shell session started, not every command run.
If an app holds sensitive data like emails or card numbers, shell access creates risk. Native roles cannot rewrite matched fields in results when someone queries a container or tool. Teams also struggle to manage long-lived static keys on local laptops for every single developer. To close this gap, teams need controls that inspect commands and mask data during sessions.
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 in EKS?
A Role grants permissions inside one specific namespace only. A ClusterRole can grant permissions across all namespaces and covers cluster-wide objects like worker nodes.
Can I write a deny rule in Kubernetes RBAC for my worker nodes?
No, Kubernetes rules are purely additive and do not support deny rules. You must start with zero permissions and only add the exact rules each user needs.
Why can users still run risky commands after I restrict namespaces?
Namespace rules only control which pods a user can reach at login time. Once a user starts an exec session, native rules do not inspect the commands inside.
Related guides
In this post