AKS Service Mesh
An aks service mesh controls how apps talk to each other inside your cluster. It encrypts pod traffic and enforces service rules without changing your app code. Platform teams set up a mesh to secure east-west network calls between containers. Still, teams often pairs this network setup with broad human permissions for cluster debugging. When engineers have wide role bindings, they can bypass mesh rules during live sessions. How an aks service mesh works with cluster roles A service mesh mana
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 aks service mesh controls how apps talk to each other inside your cluster. It encrypts pod traffic and enforces service rules without changing your app code. Platform teams set up a mesh to secure east-west network calls between containers. Still, teams often pairs this network setup with broad human permissions for cluster debugging. When engineers have wide role bindings, they can bypass mesh rules during live sessions.
How an aks service mesh works with cluster roles
A service mesh manages network calls from one pod to another pod. It uses sidecar containers to check service identities and encrypt data in transit. While the mesh handles app traffic, Kubernetes RBAC controls human and admin actions. Both systems work together to secure your cluster from different angles.
In Kubernetes, a Role or ClusterRole holds rules that represent a set of permissions. These permissions are additive, which means there are no deny rules in the system. A Role always sets permissions inside one single namespace for your team. A ClusterRole is not namespaced and can cover resources across all namespaces. It can also cover cluster-scoped resources like nodes or non-resource endpoints.
To grant these rules to a user, you create a binding object. A RoleBinding grants permissions inside one namespace and can reference a Role or ClusterRole. A ClusterRoleBinding grants access across the entire cluster at once. When engineers manage the mesh, the API server checks these bindings first.
Managing mesh control planes and pod subresources
Engineers often need to check mesh sidecars when a network route fails. They read pod logs or run commands inside containers to test network paths. In Kubernetes RBAC, these actions use subresources like pod logs and pod exec. RBAC refers to resources by the exact name that appears in the API URL. You write a subresource with a slash to join the pod and action.
Teams often grant wide ClusterRoleBindings so developers can fix broken mesh routes fast. Since rules are additive, you cannot add a deny rule to block one namespace. If a user gets a broad binding, they can run commands in any pod. They can also read mesh secrets or change routing rules across the cluster.
Service Mesh Security (Istio) + AKS Managed Identity: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Scoping these permissions down to single pods is hard in native Kubernetes. You can restrict some rules to specific resource names, but limits apply here. The resource names restriction on create actions applies only to top-level resources, not subresources. Because of this gap, teams struggle to limit who can exec into specific pods.
What native setup solves and the gap it leaves open
Your aks service mesh solves service-to-service trust and encrypts traffic between running pods. Native Kubernetes RBAC solves who can log in and call the cluster API server. Together, they keep app traffic safe and block unknown users from the control plane.
Still, this native setup leaves a major operational gap open during human sessions. RBAC decides who can start an exec session or read a pod log. It does not check what individual commands or queries do while in flight. Once an engineer opens a shell inside a pod, RBAC steps out of the way. A user inside a container can still read raw data such as emails or card numbers. They can also run dangerous scripts that break the app or expose phone numbers. Securing the cluster requires control over every command and query inside the session.
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
Does an aks service mesh replace Kubernetes RBAC?
No, the mesh only controls network traffic between workloads running inside the cluster. You still need Kubernetes RBAC to control what users can do via the API.
How do RoleBindings differ from ClusterRoleBindings for mesh admins?
A RoleBinding limits an admin to managing mesh rules within one single namespace. A ClusterRoleBinding gives that admin permission to view or change resources across all namespaces.
Why can engineers still see sensitive data when a mesh is active?
A mesh encrypts data moving between pods, not data viewed inside an active shell. When engineers exec into a pod, they can read unmasked emails or national IDs.
Related guides
In this post