If you’ve ever sat in a Kubernetes technical interview, you’ve almost certainly faced some variation of this question:
Imagine two Pods are running on different worker nodes in the same Kubernetes cluster. How do they communicate with each other without using a NodePort or LoadBalancer? And what component makes this possible?
I ask this question almost every time I interview candidates for platform and DevOps engineering roles. Why? Because it immediately separates people who have memorized kubectl commands from engineers who actually understand how packets move through a cluster.
If you start talking about external load balancers or port mapping, you’ve already missed the core philosophy of Kubernetes. Let’s break down what the interviewer is actually testing, how the plumbing works under the hood, and how you troubleshoot it in production when things inevitably break.
Understanding the Question (And the "Trap")
First, let's look at why the interviewer specifically mentions "without using NodePort or LoadBalancer."
In traditional Docker networking (before orchestration), containers lived on isolated bridge networks on individual hosts. If Container A on Host 1 wanted to talk to Container B on Host 2, you had to map ports to the host's IP (-p 8080:80) and deal with Network Address Translation (NAT). It was messy, and port collisions were a nightmare.
Kubernetes explicitly rejects this model.The foundational rule of the Kubernetes Networking Model is a flat, routable network:
Every Pod gets its own unique, routable IP address within the cluster.
Every Pod can communicate directly with every other Pod—regardless of which worker node they are scheduled on—without NAT.
NodePort and LoadBalancer Services are strictly for North-South traffic (getting external traffic from outside the cluster into your Pods). For East-West traffic (Pod-to-Pod inside the cluster), they aren't needed at all.
So, the short answer to the interview question is: Pods communicate directly using their Pod IPs (or via a ClusterIP Service backed by CoreDNS), and the component that makes cross-node routing possible is the CNI (Container Network Interface) plugin.
How It Actually Works Under the Hood
To give a senior-level answer, you need to explain what happens to a packet when Pod A (10.244.1.5) on Worker Node 1 sends a request to Pod B (10.244.2.8) on Worker Node 2.
Kubernetes itself doesn't actually implement the network—it defines the rules and delegates the heavy lifting to a CNI Plugin (like Cilium, Calico, or Flannel).
Here is the step-by-step lifecycle of that packet:
1. Inside Pod A: Pod A lives in its own isolated Linux Network Namespace. It sends a packet destined for 10.244.2.8 out of its virtual ethernet interface (eth0).
2. Crossing into Node 1: That eth0 interface is connected via a veth (virtual ethernet) pair to the root network namespace of Worker Node 1 (often attached to a virtual bridge like cbr0 or cni0).
3. Node 1 Routing: Worker Node 1 checks its routing table. It sees that 10.244.2.8 is not local to Node 1, so it needs to send it over the underlying physical/cloud network (the underlay) to Worker Node 2.
4. The CNI Magic (Overlay vs. Underlay): Depending on the CNI plugin you use, one of two things happens here:
Overlay Network (Flannel VXLAN, Calico IP-in-IP): The CNI encapsulates the original Pod-to-Pod packet inside a standard Node-to-Node UDP/IP packet. Node 1 sends it to Node 2's physical IP. Node 2 strips off the outer header and reads the inner Pod IP.
Native Routing/eBPF (Cilium, Calico BGP): The CNI uses BGP (Border Gateway Protocol) or eBPF programs in the Linux kernel to advertise Pod CIDR routes directly to the underlying network. No encapsulation overhead—Node 1 just routes the packet directly to Node 2.
5. Delivery to Pod B: Worker Node 2 receives the packet, looks up 10.244.2.8 in its local routing table, pushes it down through Pod B's veth pair, and Pod B receives it on its eth0 interface.
Bonus Interview Points: Mention that in real-world setups, Pod A won't hardcode Pod B's IP because Pods are ephemeral. Instead, Pod A queries CoreDNS using a Service name, gets a stable virtual ClusterIP, and kube-proxy (or Cilium's eBPF) translates that ClusterIP to Pod B's actual IP using iptables/IPVS rules before sending it across the CNI.)
Real-World Troubleshooting: When Cross-Node Pod Communication Breaks
In an interview, once you nail the theory, the interviewer will almost always follow up with: "Okay, great. Now imagine Pod A on Node 1 can't reach Pod B on Node 2. How do you debug it?"
Here is the exact playbook I use in production when cross-node networking fails:
Step 1: Isolate the Scope (Same-Node vs. Cross-Node)
First, figure out if the application is simply crashing or if you have a genuine cross-node networking failure.
Spin up a debug pod (like nicolaka/netshoot) on Node 1 and try curling Pod B on Node 2.
Spin up another debug pod on Node 2 and curl Pod B locally.
Diagnosis: If same-node communication works, but cross-node fails, your application is fine—your CNI overlay/routing or node-level firewall is broken.
Step 2: Check CNI DaemonSet Health
Since CNI plugins run as DaemonSets in the kube-system namespace, a crashed agent on either node will break routing for that node.
kubectl get pods -n kube-system -o wide
Look for your CNI pods (e.g., calico-node, cilium, kube-flannel). If one is in CrashLoopBackOff on Node 1 or Node 2, check its logs immediately:
kubectl logs -n kube-system <cni-pod-name>
Step 3: Check for Restrictive NetworkPolicies
Kubernetes allows all Pod-to-Pod traffic by default, unless a NetworkPolicy is applied to the namespace. If a policy selects Pod B, any ingress traffic not explicitly whitelisted is silently dropped.
kubectl get networkpolicies -A
Inspect the ingress rules on Pod B's namespace and egress rules on Pod A's namespace to ensure traffic isn't being blocked by label selectors.
Step 4: Verify Node-Level Firewalls & Security Groups
This is the #1 culprit in cloud environments (AWS, GCP, Azure) and on-prem setups. CNI plugins require specific ports to be open between worker nodes to pass encapsulated traffic or exchange BGP routes:
Flannel (VXLAN): Requires UDP port 8472 open between nodes.
Calico (BGP): Requires TCP port 179 open between nodes (or IP-in-IP protocol 4 allowed in AWS Security Groups).
Cilium (VXLAN): Requires UDP port 8472 and TCP 4240 (health checks).
If a Terraform change wiped out a Security Group rule allowing internal node-to-node traffic on these ports, same-node Pods will talk happily while cross-node Pods time out.
Step 5: Inspect Node Routing Tables and Packet Drops
If everything above looks clean, SSH into Worker Node 1 and trace the packet at the OS level:
Check the route: Run ip route get . Verify that the kernel knows to send traffic for Pod B's subnet to Node 2's IP (or via the tunl0/flannel.1/cilium_host interface).
Watch the wire: Use tcpdump on Node 1's physical interface (e.g., eth0) and Node 2's physical interface while pinging from Pod A to Pod B:
sudo tcpdump -i eth0 host <Node-2-IP> and port 8472
If you see packets leaving Node 1 (eth0) but never arriving at Node 2 (eth0), the drop is happening outside Kubernetes (cloud VPC routing, physical switch ACLs, or MTU mismatch fragmentation).
How to Summarize This in Your Interview
When you answer this question, keep it structured and confident:
Kubernetes enforces a flat network model where every Pod gets a unique, routable IP address, allowing direct Pod-to-Pod communication across nodes without NAT or external Services like NodePort or LoadBalancer. This is implemented by the CNI plugin—such as Calico, Cilium, or Flannel—which manages Pod IP allocation and programs node routing tables using either overlay encapsulation (like VXLAN) or native routing (like BGP/eBPF) to move packets between worker nodes. In practice, Pods discover each other via CoreDNS and communicate over a virtual ClusterIP Service managed by kube-proxy, rather than relying on ephemeral Pod IPs.
Nail that explanation, back it up with a logical troubleshooting flow, and you’ll stand out immediately.


Top comments (0)