# Service has no endpoints (no endpoints available for service / Endpoints: <none>)

**Code:** `no endpoints` · **Category:** Kubernetes · **Seen on:** Kubernetes

The Service’s selector matches no ready pods, so traffic to it is refused or returns 503.

## Meaning

A Service forwards only to pods whose labels match its selector and which are Ready. A label typo, pods failing readiness, or a targetPort that doesn’t match the container port leave it empty or broken. Ingress controllers then return 503.

## Common causes

- Selector labels don’t match pod labels
- Pods not Ready (readiness probe failing)
- targetPort doesn’t match the containerPort/name
- Service and pods in different namespaces

## Quick fix

1. Compare selector and pod labels
2. kubectl get endpoints <svc> (or endpointslices)
3. Fix readiness or targetPort

## Detailed fix by platform

### Kubernetes

1. 

```bash
kubectl get svc web -o jsonpath='{.spec.selector}'; echo
kubectl get pods -l app=web --show-labels
kubectl get endpointslices -l kubernetes.io/service-name=web
```


## How to diagnose

1. **Selector** — Matches pod labels exactly?
2. **Ready** — Pods READY 1/1?
3. **Ports** — targetPort vs containerPort

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/kubernetes/service-no-endpoints)
