How to Configure EKS Read Only Access
You set up eks read only access by mapping cloud roles to Kubernetes roles. These roles grant read rules without allowing write actions on your cluster. Many teams start by giving developers broad admin rights to fix bugs fast. Broad roles let one mistake delete live pods or expose secret keys. How eks read only access works in Kubernetes Setting up eks read only access takes two main steps. First, your cloud provider checks who the user is. Second, the Kubernetes API server checks what that
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 eks read only access by mapping cloud roles to Kubernetes roles. These roles grant read rules without allowing write actions on your cluster. Many teams start by giving developers broad admin rights to fix bugs fast. Broad roles let one mistake delete live pods or expose secret keys.
How eks read only access works in Kubernetes
Setting up eks read only access takes two main steps. First, your cloud provider checks who the user is. Second, the Kubernetes API server checks what that user can do. Kubernetes uses Role-Based Access Control, or RBAC, to manage these rules.
In RBAC, a Role sets permissions inside one single namespace. A ClusterRole sets permissions across the whole cluster. It can cover cluster-wide items like nodes or resources across all namespaces. Both role types hold rules that list allowed actions, such as read or list.
Kubernetes permissions are additive, which means there are no deny rules. You start with zero access and add rules one by one. To give someone read rights, you create a RoleBinding or a ClusterRoleBinding. A RoleBinding links a user or group to a Role in one namespace. A ClusterRoleBinding grants those read rules across every namespace in the cluster.
A RoleBinding can also reference a ClusterRole to keep rule management simple. When you do this, the user gets those rules only in that one namespace. Teams use this pattern to give developers read access to their own apps. The cloud identity maps to a Kubernetes group, and the binding grants view rights.
How subresources affect read rules
Kubernetes RBAC refers to resources by the exact name in the API URL. Some APIs include a subresource, such as the logs of a pod. In RBAC rules, you write the subresource with a slash after the main resource.
For example, reading pod status is separate from reading pod logs. If a developer needs to read logs, the role must allow the log subresource. This separation helps teams keep read roles tight and focused.
Auditor Read-Only Access + EKS Access Management: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
You can also limit rules to specific items by using a resource name list. Still, Kubernetes applies resource name limits on create actions only to top-level resources. It does not apply them to subresources like pod exec.
What native read roles solve and what they miss
Native RBAC is great for stopping accidental changes to your cluster state. A user with a read role cannot delete deployments or change service routes. It separates people who build apps from people who run the cluster.
Still, native setup only decides who logs in and which API endpoints they can call. It does not check the content inside the responses or commands in flight. If a read role includes Kubernetes Secrets, the user can read every key in that namespace. Even if you block Secrets, app logs often print sensitive customer data.
A developer reading pod logs might see raw emails, phone numbers, or card numbers. Native RBAC cannot rewrite matched fields in results before they reach the screen. Also, when someone needs temporary pod exec access to debug, RBAC is all or nothing. It cannot inspect individual commands or require approval for a single action.
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
Can I deny access to one specific resource in a Kubernetes read role?
No, Kubernetes RBAC rules are additive and do not support deny rules. To block access to Secrets, you must leave Secrets out of the allowed resource list.
What is the difference between a RoleBinding and a ClusterRoleBinding?
A RoleBinding grants permissions inside one specific namespace. A ClusterRoleBinding grants permissions across all namespaces and cluster-scoped resources like nodes.
Does pod read access automatically allow a user to view pod logs?
No, pod logs are a separate subresource in the Kubernetes API. Your role must explicitly include the pod log subresource to let users read logs.
Related guides
In this post