EKS Compute

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up eks compute by provisioning worker nodes or serverless pod capacity for your cluster. Next, you link identity roles to native Kubernetes RBAC rules to control what runs. Many engineering teams start with wide admin permissions to get apps running fast. Broad roles let any user or pod read secrets or alter nodes across the cluster. If an attacker steals a wide token, they can take over every workload. How eks compute permissions work in Kubernetes Your cluster runs containers on vir

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 compute by provisioning worker nodes or serverless pod capacity for your cluster. Next, you link identity roles to native Kubernetes RBAC rules to control what runs. Many engineering teams start with wide admin permissions to get apps running fast. Broad roles let any user or pod read secrets or alter nodes across the cluster. If an attacker steals a wide token, they can take over every workload.

How eks compute permissions work in Kubernetes

Your cluster runs containers on virtual machines or managed serverless capacity. Both options rely on the Kubernetes API server to check every action. When a node or engineer sends a request, the API server checks RBAC rules. In Kubernetes, RBAC rules only add permissions and never use deny rules. A Role sets permissions inside a single namespace for local resources like pods. A ClusterRole sets permissions across the whole cluster, including cluster-scoped resources like nodes. You link a Role to a user or group with a RoleBinding. You use a ClusterRoleBinding to grant permissions across all namespaces at once.

Engineers also need to check logs and run commands inside running containers. Kubernetes handles these actions through subresources on the pod API path. A Role must grant access to the log subresource so users can read logs. It must grant the exec subresource before a user can open a shell. Without these specific subresource rules, the API server blocks the request right away. Teams group these rules by namespace so devs only touch their own apps. This separation keeps test workloads from changing production nodes or reading production data.

What native eks compute access controls leave open

Native Kubernetes RBAC is great for deciding who can reach the cluster API. It stops unauthorized users from listing nodes, deleting pods, or starting new containers. Still, RBAC stops checking once a user starts an active shell session. If a Role allows the exec subresource, the user gets a full shell. Kubernetes does not inspect the individual commands typed inside that open container session. An engineer can run destructive scripts or dump local memory without any check.

Standard logs also miss what happens inside the container after the session starts. The API server records that a user opened a shell on a pod. It does not record the exact shell commands or the text returned on screen. If a pod holds database keys, a user can query tables from that shell. Output from those queries can return sensitive emails, phone numbers, or card numbers. Native node and pod roles cannot rewrite matched fields in results during a session. Teams need a way to check live commands and mask sensitive output in flight.

EKS Access Management: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

How to tighten node and pod permissions

Start by removing cluster-wide bindings from human users and everyday CI pipelines. Give each team a RoleBinding that applies only to their specific app namespace. Split read roles from write roles so most users can only view pod status. Do not grant the exec subresource in default developer roles. When someone needs to run a command, check each request at the command level. Filter the response stream so sensitive fields like national IDs get masked before display.

Add request guardrails and response masking beside Kubernetes

Cluster roles and service accounts govern who reaches the Kubernetes API. Still, a broad role or agent can delete workloads or print sensitive values from ConfigMaps and logs. In practice, hoop.dev runs beside the API server as a sidecar for your Kubernetes API and checks every request and response alongside RBAC.

With hoop.dev Kubernetes controls, guardrails can allow listing Secret names while refusing reads of Secret data before execution. Data masking redacts matched keys in returned JSON responses and log streams in memory. Furthermore, hoop.dev holds SOC 2 Type II and is MIT licensed on GitHub.

Frequently asked questions

What is the difference between a Role and a ClusterRole for eks compute?

A Role applies to one namespace and controls local objects like pods. A ClusterRole applies across the whole cluster and controls cluster objects like nodes. You can also bind a ClusterRole to one namespace with a RoleBinding.

Can Kubernetes RBAC block specific shell commands inside a pod?

No, Kubernetes RBAC only checks if a user can start the exec subresource. Once the shell opens, RBAC does not inspect or block individual shell commands. You need command-level controls to stop risky actions inside the container.

How do I let engineers read pod logs without granting shell access?

Create a Role that grants get and list on the pod log subresource. Leave the pod exec subresource out of the rule list. Because RBAC rules are additive, users can read logs but cannot open shells.

The query runs. The emails stay hidden.