kubernetes-service-connectivity-troubleshooting
Kubernetes Service Connectivity Troubleshooting
Purpose
A Kubernetes Service is just a stable virtual IP and DNS name backed
by a continuously reconciled list of pod IPs — its Endpoints/
EndpointSlice — populated automatically from pods matching its
spec.selector and currently passing readiness. When traffic doesn't
reach a workload, the fault almost always lives in one of three narrow
places: the selector doesn't actually match the pods it's meant to (a
label typo or case mismatch), the pods match but aren't currently
Ready (excluding them from Endpoints correctly, not as a bug), or DNS
resolution for the Service name itself is failing for an unrelated
reason (CoreDNS health, or a NetworkPolicy blocking DNS traffic). Each
produces a similar-looking "can't connect" symptom but needs a different
fix, and jumping straight to loosening a selector or disabling a
NetworkPolicy tends to create a new, worse problem instead of finding
the real one. This skill covers the diagnostic sequence for all three.