AKS Control
You set up aks control by mapping cloud identities to Kubernetes roles and bindings. These rules tell the cluster API server who can read or change each resource. Most teams start by linking developer groups to broad cluster roles during setup. Over time, those wide roles let users run commands across every namespace and pod. When one account gets too much power, a single mistake can break production apps. How native aks control works with Kubernetes roles Kubernetes role-based rules run on t
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 aks control by mapping cloud identities to Kubernetes roles and bindings. These rules tell the cluster API server who can read or change each resource. Most teams start by linking developer groups to broad cluster roles during setup. Over time, those wide roles let users run commands across every namespace and pod. When one account gets too much power, a single mistake can break production apps.
How native aks control works with Kubernetes roles
Kubernetes role-based rules run on the API server to check every user request. In this system, all rules are additive, and there are no deny rules. You start with zero access and add permissions through roles and bindings. A Role sets permissions inside one specific namespace for resources like pods or services. A ClusterRole works across the whole cluster and covers nodes or all namespaces.
Once you define a Role or ClusterRole, you must bind it to a user. A RoleBinding grants those permissions to a user or group inside one namespace. Note that a RoleBinding can point to a local Role or a global ClusterRole. When you bind a ClusterRole with a RoleBinding, it only works in that namespace. This trick lets admins write one standard role and reuse it for many teams. By contrast, a ClusterRoleBinding grants access across every namespace in the entire cluster.
Managing subresources and pod actions in your cluster
Basic resource rules are not enough for day-to-day cluster operations and support. Kubernetes APIs also use subresources for actions like reading pod logs or running commands. The API server checks these subresources using a slash format in the role rules. For example, reading pod logs requires permission on the log subresource for pods. Opening a shell inside a container requires permission on the exec subresource for pods.
Teams often grant exec and log permissions together so engineers can fix broken apps. Once a role grants exec rights in a namespace, the user can enter any pod there. The role system checks if the user can start the exec call at the door. After that check passes, the native role system stops watching the active terminal stream.
AKS Managed Identity: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
What native cluster roles solve and what they miss
Native cluster roles are great for sorting out which team owns which namespace. They keep staging workloads separate from production workloads at the API level. They also stop unauthorized users from deleting deployments or changing cluster nodes. This setup handles the basic question of who can connect to the cluster API.
Still, static roles leave a big gap during live debugging and incident response. A role decides who can start a pod shell, not what commands run inside. Once inside a container, an engineer can read local files or query linked databases. Pod logs and command outputs can also print sensitive user data to the screen. Native roles do not rewrite emails, phone numbers, or card numbers in those outputs. Teams also struggle when engineers need temporary elevated rights to fix an urgent outage. Granting a permanent binding is fast, but people rarely remove that binding later. Without per-command checks and data masking, static cluster roles cannot protect live sessions alone.
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 in AKS?
A Role applies only to resources inside a single namespace that you specify. A ClusterRole applies to cluster-wide objects like nodes, or resources across all namespaces.
Can I write a deny rule in Kubernetes RBAC for aks control?
No, Kubernetes RBAC rules are only additive and do not support deny rules. You must start with no permissions and only grant the exact roles a user needs.
How do I limit who can run commands inside pods?
You must remove the pod exec subresource from standard developer roles in your cluster. Only grant pod exec permissions when a user has an approved task to run.
Related guides
In this post