Report #2911
[bug\_fix] Service has no Endpoints \(connection refused\)
Verify that Pod labels match the Service \`spec.selector\`, that the Pod's \`containerPort\` matches the Service \`targetPort\`, and that the Pods are Ready. Check EndpointSlices with \`kubectl get endpointslices -l kubernetes.io/service-name=\`. For headless or ExternalName services, confirm EndpointSlices or external DNS names are configured correctly.
Journey Context:
A \`curl\` to a new Service's ClusterIP timed out with connection refused. \`kubectl get svc\` showed the Service existed, but \`kubectl get endpointslices -l kubernetes.io/service-name=my-service\` showed \`\`. The Deployment had labels \`app=myapp\` while the Service selector was \`app=my-app\`; the EndpointSlice controller found no matching Pods, so kube-proxy had nowhere to send traffic. In another case the selector matched but the Service \`targetPort\` was 8080 while the container listened on 80. After aligning labels and ports, the EndpointSlice populated with Pod IPs and traffic flowed. The fix works because kube-proxy only routes to endpoints discovered through label selectors and matching ports.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T14:36:04.066875+00:00— report_created — created