Amazon EKS Kubernetes Cluster

Published
Length
3 min read

Luis Felipe Dias

All posts

You secure an amazon eks kubernetes cluster by mapping cloud identities to native role bindings. This setup restricts which users can view or change pods in each namespace. Most teams start by linking broad cloud groups to default cluster roles for quick setup. When those roles are too wide, one mistake can break live workloads across every namespace. How permissions work in an amazon eks kubernetes cluster Access control inside the cluster relies on the native role-based API group on the ser

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 secure an amazon eks kubernetes cluster by mapping cloud identities to native role bindings. This setup restricts which users can view or change pods in each namespace. Most teams start by linking broad cloud groups to default cluster roles for quick setup. When those roles are too wide, one mistake can break live workloads across every namespace.

How permissions work in an amazon eks kubernetes cluster

Access control inside the cluster relies on the native role-based API group on the server. A standard role holds rules that define a set of allowed actions. Every rule in this system is additive, which means there are no deny rules. You start with zero access and add permissions one by one.

A role always sets permissions inside a single namespace for local isolation. A cluster role is not namespaced and covers objects across the whole system. It can control cluster-scoped objects like nodes or namespaced objects across all namespaces. It also manages non-resource endpoints on the control plane.

To give permissions to a user, you create a binding object. A role binding grants access inside one specific namespace to a person or group. That binding can point to a local role in the same namespace. It can also reference a global cluster role while keeping the permissions inside that one namespace. By contrast, a cluster role binding grants permissions across the entire cluster at once.

Scoping pod subresources and day-to-day commands

Engineers often need to read logs or run commands inside a running pod. The API server treats these actions as subresources under the main pod object. In your permission rules, you write a subresource with a slash, such as pods and log. Another common subresource covers running remote commands inside a container.

Admins try to lock down these actions by listing specific resource names in a rule. Still, the resource names filter does not work when a verb creates a new subresource request. Teams must grant subresource permissions across all pods in that namespace instead. This architectural rule makes fine-grained command control hard to manage with native bindings alone.

Kubernetes RBAC + EKS Access Management: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

What native roles solve and what they leave open

Native roles and bindings do a good job of deciding who can reach the API. They stop unauthorized users from deleting nodes or reading secrets in other namespaces. Separating teams by namespace with local role bindings prevents many cross-team accidents.

Still, native roles only check permissions at the moment a request hits the API server. Once an engineer opens an interactive shell in a pod, the role check is finished. The cluster does not inspect the shell commands that run inside that container session. It also cannot mask sensitive data like emails or card numbers in log output. Teams need controls that inspect individual commands and rewrite sensitive fields in results during flight.

Govern kubectl and API calls in flight

Identity providers and Kubernetes RBAC decide who logs into a cluster. They cannot redact keys inside returned JSON objects or hold a risky delete call for review. By design, hoop.dev runs as an open-source proxy, a sidecar for your Kubernetes API, checking requests and responses without replacing RBAC.

First, hoop.dev guardrails refuse banned methods, paths, or headers before they run. Next, hoop.dev data masking rewrites sensitive keys in returned Secret, ConfigMap, and log responses in memory, and writes each decision to the audit trail. Explore the repo on GitHub.

Frequently asked questions

Can I write a deny rule in Kubernetes RBAC to block one specific pod?

No, native permissions are additive and do not support deny rules. You must build smaller roles that only grant access to the allowed resources.

How does a RoleBinding differ from a ClusterRoleBinding?

A role binding applies permissions inside one single namespace. A cluster role binding applies permissions across all namespaces and cluster-wide nodes.

Why can a user with log access read sensitive data from pod output?

Subresource rules only check if a user can open the log stream. The native API does not inspect or mask phone numbers or emails inside the text.

The query runs. The emails stay hidden.