No endpoints available for service
The Service exists but has no Ready backends, so there’s nothing to forward traffic to. Callers see timeouts or connection refused; kubectl port-forward and API server proxies say it directly.
Diagnose in order
Section titled “Diagnose in order”- What does the Service select?
kubectl get endpointslices -n <ns> -l kubernetes.io/service-name=web -o wide. No addresses at all means no pod matched. - Compare the selector with pod labels:
kubectl get svc web -n <ns> -o jsonpath='{.spec.selector}'andkubectl get pods -n <ns> --show-labels. - If addresses exist but are marked not ready, look at the pods’ readiness: Readiness probe failed.
Usual causes
Section titled “Usual causes”| Cause | Typical origin |
|---|---|
| Selector doesn’t match pod labels | A label renamed in the Deployment but not the Service, or a typo |
| Pods exist but none are Ready | Readiness probe failing, or pods crashing |
| No pods at all | Deployment scaled to zero, or pods can’t be scheduled |
| Service in a different namespace from the pods | Services only select pods in their own namespace |
Align selector and labels (copy them from the Deployment’s spec.selector.matchLabels), and fix pod readiness.
Read next: Services, DNS, and kube-proxy.