How to Configure EKS Admission Controller
You set up an eks admission controller by registering a webhook with the Kubernetes API server. This webhook checks or changes API requests after role checks pass, before objects save. Teams often start by setting up basic role rules in their cluster. They grant broad rights so developers can deploy apps and fix live issues fast. Over time, these wide roles let users run risky tasks across many namespaces. Adding webhook checks helps teams enforce strict rules on what lands in the cluster. Stil
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.
You set up an eks admission controller by registering a webhook with the Kubernetes API server. This webhook checks or changes API requests after role checks pass, before objects save.
Teams often start by setting up basic role rules in their cluster. They grant broad rights so developers can deploy apps and fix live issues fast. Over time, these wide roles let users run risky tasks across many namespaces. Adding webhook checks helps teams enforce strict rules on what lands in the cluster. Still, teams must understand how role checks and webhooks work together during each API call.
How an eks admission controller works with RBAC
Every request to the Kubernetes API server goes through a clear set of steps. First, the server checks who sent the request. Next, role-based access control checks if that user can run the action. Kubernetes uses Roles and ClusterRoles to hold sets of permission rules. These rules are only additive, which means there are no deny rules in native RBAC.
A Role sets permissions inside one single namespace. A ClusterRole is not tied to one namespace and can cover cluster-wide resources like nodes. It can also cover namespaced resources across all namespaces at once. A RoleBinding grants permissions inside one namespace by linking a user to a Role or ClusterRole. A ClusterRoleBinding grants those permissions across the entire cluster.
Once a request passes these role checks, the eks admission controller step begins. The API server sends the request payload to your mutating or validating webhooks. A mutating webhook can change the object, like adding default labels or resource limits. A validating webhook reads the final object and answers yes or no based on your rules. If any webhook says no, the API server drops the request right away.
How webhooks handle pod subresources
Teams also use webhooks to watch sensitive API calls beyond simple pod creation. In Kubernetes RBAC, resources use the exact same name that appears in the API URL. Some API calls use a subresource, like reading pod logs or running a shell inside a pod. In RBAC rules, you write this subresource with a slash, such as pods/log or pods/exec.
K8s Admission Controllers + EKS Access Management: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
A user might have a Role that allows create requests on the pods/exec subresource. When the user tries to open a shell, RBAC allows the call to move forward. The API server then passes the request to any admission webhook watching that subresource. The webhook can check which pod the user targets and whether the cluster allows shell sessions.
What native admission checks solve and what they miss
Native roles and admission webhooks solve major problems for cluster admins. RBAC stops unknown users from calling the API, while webhooks block bad pod specs. Together, they control who can enter the cluster and what objects can exist.
Still, both tools stop working the moment the API request finishes. An admission webhook only sees the start of a pods/exec call. It decides if the shell session can open, but it cannot see inside the live stream. Once the session starts, the user can run any command or read sensitive files inside the container. Webhooks also do not mask sensitive data like emails, phone numbers, card numbers, or national IDs in output streams. Native cluster tools check the gate, but they leave live commands and data streams unchecked.
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 proxy, a sidecar for your Kubernetes API, inline on the API connection. On every kubectl or API call an AI agent or engineer runs against production, hoop.dev decides to pass, mask, block, or hold it for human review.
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, or hold risky calls for approval. On the way back, hoop.dev data masking walks JSON responses by key and masks matched values in Secrets, ConfigMaps, and pod logs in memory. View the project on GitHub.
Frequently asked questions
What is the difference between RBAC and an admission webhook in EKS?
RBAC checks if a user has permission to run an API action, using additive allow rules. An admission webhook inspects the actual object content after RBAC passes and can change or reject it.
Can an admission webhook block pod exec sessions?
Yes, a validating webhook can watch the pods/exec subresource and reject requests to open a shell. Still, if it allows the request, it cannot inspect or block the commands typed inside that shell.
Why do teams need more than ClusterRoles and webhooks for production security?
ClusterRoles and webhooks only govern API requests at the moment they hit the server. They do not inspect live terminal commands, require step-up approval for single commands, or rewrite sensitive data in outputs.
Related guides
In this post