← Back to all fixes
Service is not reachable inside the cluster
The Issue
Pod A tries to curl `http://my-service:8080` but gets connection refused or no route to host.
Root Cause
Possible causes: Service selector does not match pod labels, wrong targetPort, no running pods backing the service, or CoreDNS issue.
How to Fix
Verify the service has endpoints: `kubectl get endpoints my-service` — if empty, selector is wrongCheck label match: compare `kubectl get svc my-service -o yaml` selector with `kubectl get pods --show-labels`Test DNS resolution from inside a pod: `kubectl run tmp --image=busybox --rm -it -- nslookup my-service`Verify the targetPort matches the port your app listens on inside the containerCheck if backing pods are Running: `kubectl get pods -l app=my-service`