EKS Job
An eks job runs one or more pods until a task finishes. You define the job spec and submit it to the Kubernetes API server. Platform teams often start by giving engineers broad cluster permissions to run tasks. When roles are too wide, any user can run work across every namespace. Overbroad rules also let a user read logs or open shells in any pod. How an eks job works with Kubernetes permissions When you submit an eks job, the API server checks your identity first. Next, the server checks it
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.
An eks job runs one or more pods until a task finishes. You define the job spec and submit it to the Kubernetes API server. Platform teams often start by giving engineers broad cluster permissions to run tasks. When roles are too wide, any user can run work across every namespace. Overbroad rules also let a user read logs or open shells in any pod.
How an eks job works with Kubernetes permissions
When you submit an eks job, the API server checks your identity first. Next, the server checks its role-based access rules to allow or block the request. Kubernetes RBAC uses roles and bindings to manage these rules. All rules in this system are additive, so there are no deny rules. A Role sets permissions inside one single namespace. A ClusterRole sets rules across the whole cluster or across all namespaces. To give a user those permissions, you create a binding. A RoleBinding grants access inside one namespace and can link to a Role. A RoleBinding can also link to a ClusterRole to keep access in one namespace. A ClusterRoleBinding grants those permissions across every namespace in the cluster. For a job workflow, teams bind a Role that allows job creation in one namespace. Once the API server approves the request, the job controller creates the pods. Those pods run the container image until the batch task exits with success.
What native roles solve and what they leave open
Native roles are great for controlling who can start a job in a namespace. You can also control who can view pod logs or run commands inside pods. In Kubernetes RBAC, logs and command execution are subresources of a pod. You write them with a slash in the rule, like the pod log subresource. You can also grant access to the pod exec subresource for debugging. Still, native RBAC has limits when you try to lock down specific pods. The resource names restriction on create verbs applies only to top-level resources. It does not apply to subresources like pod exec. Once a user has exec permissions in a namespace, they can enter any pod there. Native roles also decide who can start a job or open a shell. They do not inspect the commands a user runs inside that shell. They also do not check what data a batch job reads or prints to logs. If a job prints emails, phone numbers, or card numbers, anyone with log access sees them. Teams need a way to check commands in flight and mask sensitive fields in results.
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.
EKS Access Management: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
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
How do I limit an eks job to a single namespace?
Create a Role in that target namespace with rules for batch job resources. Then link your user or group to that Role with a RoleBinding in the same namespace.
Can I use a ClusterRole for a single namespace job?
Yes, you can define common job rules once in a ClusterRole. Reference that ClusterRole inside a namespaced RoleBinding to keep permissions inside that single namespace.
Why can users with exec permissions enter any pod in a namespace?
Pod exec is a subresource in the Kubernetes API. Name restrictions on create requests only apply to top-level resources, not to subresources.
Teams that document these role rules and review logs each month catch config drift early. Clear ownership for each role keeps live systems simple to run and easy to audit across the whole team.
Related guides
In this post