Service Has No Endpoints: Where Your Traffic Disappears
curl times out but pods look Running? An empty Endpoints list means the Service selector does not match any Ready pod — trace the chain before blaming the network.
Users report: "The API is down."
kubectl get pods -n shop -l app=apiapi-7f2a 1/1 Running
api-8b1c 1/1 RunningPods look fine. You curl the Service:
kubectl run tmp --rm -it --image=curlimages/curl -- curl -sS --max-time 3 http://api.shop.svc:8080/healthTimeout.
Check Endpoints first
kubectl get endpoints api -n shop
# or
kubectl get endpointslice -n shop -l kubernetes.io/service-name=apiNAME ENDPOINTS AGE
api <none> 3dNo endpoints means the Service has zero Ready backends. kube-proxy (or your dataplane) has nothing to route to — regardless of Running pods.
The usual mismatches
1. Selector ≠ pod labels
# Service
selector:
app: api
# Pod labels
app: api-v2 # typo or rollout label driftFix labels or update the Service selector (carefully — selector is immutable on existing Services; often you fix the Deployment template labels).
2. Pods not Ready
Running but failing readiness → excluded from Endpoints. Back to describe pod and probe config.
3. Wrong port
Service targetPort: 8080 but container listens on 80. Endpoints may exist but connections fail — different symptom, still a Service spec issue.
4. Wrong namespace
Calling http://api from another namespace needs FQDN: api.shop.svc.cluster.local.
Trace order
kubectl get svc,ep -n shop(or EndpointSlices)- Compare Service
.spec.selectorto pod labels kubectl get pods -l <selector> -o wide— Ready column- If not Ready → probe/path/port on pod
Practice
Service Connectivity on Decision Trainer walks this chain with graded first steps — before you reach for NetworkPolicy or node firewall rules.