K8s East-west Traffic
You manage k8s east west traffic by setting up network policies and strict RBAC rules. These controls limit how pods talk to each other and the API server. Most teams start with a flat cluster network where every pod can reach every other pod. When roles or network permissions stay too broad, one bad pod or user can reach sensitive data across namespaces. How k8s east west traffic and native permissions work In Kubernetes, east-west traffic means data moving between pods, services, and nodes
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 manage k8s east west traffic by setting up network policies and strict RBAC rules. These controls limit how pods talk to each other and the API server. Most teams start with a flat cluster network where every pod can reach every other pod. When roles or network permissions stay too broad, one bad pod or user can reach sensitive data across namespaces.
How k8s east west traffic and native permissions work
In Kubernetes, east-west traffic means data moving between pods, services, and nodes inside the cluster. North-south traffic is different because it enters or leaves the cluster from the outside world. Inside the cluster, apps talk to other apps to fetch data or run jobs. Operators and pods also talk to the Kubernetes API server to read state or run commands.
To lock down API calls during internal traffic flows, Kubernetes uses role-based access control. A Role sets permissions within one single namespace. A ClusterRole is not tied to one namespace and can cover cluster-wide resources like nodes. It can also cover namespaced resources across all namespaces in your cluster. Permissions in Kubernetes are purely additive, which means there are no deny rules.
You link these rules to users or pod service accounts with bindings. A RoleBinding grants permissions inside one namespace and can reference a Role or a ClusterRole. A ClusterRoleBinding grants permissions across the entire cluster at once. RBAC uses the native authorization API group and runs directly on the API server.
How subresources affect pod commands and logs
Internal cluster traffic also includes engineers and automation running commands inside pods. Kubernetes RBAC refers to resources by the exact name that appears in the API URL. Some API calls use a subresource, such as reading pod logs or running a shell command. In RBAC rules, you write the subresource with a slash, like pods/log or pods/exec.
Teams often try to limit which specific pods a role can touch by listing resource names. Still, the resource names restriction on create actions applies only to top-level resources, not subresources. Because of this rule, scoping down exec permissions to single pods inside a namespace takes careful planning. If you grant broad exec permissions, a user can hop into any pod in that namespace. From inside that pod, they can send k8s east west traffic to internal databases or services.
East-West Traffic Security + K8s Namespace Isolation: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
What native controls solve and the gap they leave
Native network policies and RBAC rules solve the first layer of cluster security. Network policies decide which pod IP addresses can open a socket to another pod. RBAC decides which user or service account can call the API server or open a pod shell. Together, they stop unauthorized pods and users from reaching places they do not belong.
Still, these native setups leave an operational gap during live sessions and data requests. Network rules and RBAC only check who is allowed to open the connection at the start. They do not inspect what individual commands, shell actions, or queries do while in flight. Once an engineer opens an exec session or connects to an internal service, the cluster cannot filter the payload.
If a pod or user queries an internal database over east-west routes, raw sensitive fields return in full. Native Kubernetes controls cannot rewrite emails, phone numbers, card numbers, or national IDs in query results. They also cannot ask a team lead to approve a single risky command before it runs inside a pod.
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 east-west and north-south traffic in Kubernetes?
North-south traffic moves into and out of the cluster from external users or the internet. East-west traffic stays inside the cluster and moves between pods, internal services, databases, and the API server.
Can Kubernetes RBAC deny specific east-west API calls?
No, Kubernetes RBAC rules are purely additive and do not support deny rules. You must start with zero permissions and grant only the exact Role or ClusterRole bindings needed.
Why can a user with pod exec access reach internal services?
When RBAC allows the pods/exec subresource, the user runs commands inside that pod's network space. Any east-west network paths open to that pod become open to the user's shell commands as well.
Related guides
In this post