Skip to main content
Kubernetes coreLesson 7 of 13

How a Request Reaches a Pod

When a user opens shop.example.com, let's follow how that request arrives at a pod inside the cluster, and which one.

Request host—
Target Service—
Serving pod—
Ready pods3 / 3
Kubernetes clusterBrowsershop.example.comLoad balancerExternal entryIngressControllerIngress ruleshop → shop-svcServiceshop-svcEndpointsReady pod listshop-a10.0.1.11shop-b10.0.2.12shop-c10.0.3.13
RequestResponse / reportWatchAppears in a later step

What you will learn

  • Where requests from outside the cluster come in
  • Ingress rules vs. the Ingress controller
  • Why a Service acts as a stable address
  • How traffic avoids pods that are not ready

What to check when you cannot connect​

OrderWhat to checkCommon causes
1Does the domain point to the load balancer address?DNS not registered, load balancer address changed
2Are the Ingress rule host and path correct?Typo, rule conflict with another Ingress
3Do the Service labels and ports match?Label mismatch leaves 0 target pods
4Is at least one pod Ready?Readiness probe failing, all pods restarting

Try it yourself​

kubectl get ingress -A # HOSTS and load balancer ADDRESS
kubectl describe ingress <name> # Host and path → Service rules
kubectl get svc <service> -o wide # SELECTOR and ports
kubectl get endpointslices -l kubernetes.io/service-name=<service> -o yaml # conditions.ready per Pod
kubectl get pods -o wide # READY column per Pod

Check yourself

  1. The readiness probe of shop-c fails, but its container is still alive. What happens to traffic?
  2. The labels in a Service's selector do not match any pod. What happens to requests sent to that Service?
  3. Users cannot connect. The domain points to the load balancer, and the Ingress host and path are correct. What should you check next?

Further reading: Ingress · Service · EndpointSlices