MidKubernetes

How does networking work in Kubernetes: pod-to-pod, Services, and Ingress?

What they are really testing: Whether you understand the flat pod network, the role of the CNI and kube-proxy, cluster DNS, and where Ingress fits. This underpins most connectivity debugging.

A real interview question

How does networking work in Kubernetes: pod-to-pod, Services, and Ingress?

What most people say

drag me

Pods talk to each other over the network and Services route traffic to them.

It states the outcome but none of the mechanism: the flat pod network, the CNI, kube-proxy, cluster DNS, or NetworkPolicies. That mechanism is what you need when connectivity breaks.

The follow-ups they ask next

  • A Service exists but requests to it fail. What do you check?

    Whether the Service has endpoints (kubectl get endpoints), which depends on the selector matching ready pods; DNS resolution of the service name; and whether a NetworkPolicy is blocking. No endpoints usually means a label-selector mismatch or no ready pods.

  • What is the default network policy behavior in Kubernetes?

    Allow-all: with no NetworkPolicy, every pod can reach every other pod. You add a default-deny policy and then explicitly allow required flows to get real segmentation.

What the interviewer is listening for

  • Knows flat pod network + CNI
  • Explains Service/kube-proxy + CoreDNS
  • Knows default allow-all and NetworkPolicies; Ingress for L7

What sinks the answer

  • Only "pods talk over the network"
  • No notion of CNI/kube-proxy/DNS
  • Thinks traffic is denied by default

If you genuinely do not know

Say this instead of freezing. Reasoning out loud from what you do know beats silence every single time, and a good interviewer is listening for exactly that.

Every pod [gets its own IP and reaches any pod with no NAT, implemented by a CNI]. A Service [gives a stable virtual IP, kube-proxy routes it to ready pods]. [CoreDNS resolves service names]. [An Ingress controller does L7 routing/TLS at the edge]. [NetworkPolicies segment traffic, default is allow-all until you add deny]. Debug by [walking DNS, endpoints, readiness, policies].

Keep going with kubernetes

All 336 cloud engineer questions

Knowing the answer is not the same as recalling it under pressure

Sign in to send the questions you fumble to spaced recall, so they come back right before you would forget them, and learn the concepts behind them with hands-on labs.

Start free