# Warning: No endpoints available for service 'default/my-service'

- **ID:** `kubernetes/ingress-controller-no-endpoints`
- **Domain:** kubernetes
- **Category:** network_error
- **Verification:** ai_generated
- **Fix Rate:** 87%

## Root Cause

The Ingress controller cannot find any healthy pod endpoints for the referenced service, often because the service selector doesn't match any pods or pods are not ready.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| nginx-ingress-controller v1.9.5 | active | — | — |
| Kubernetes v1.27.3 | active | — | — |
| Kubernetes v1.28.2 | active | — | — |

## Workarounds

1. **Verify the service selector matches the pod labels: `kubectl get service my-service -n default -o jsonpath='{.spec.selector}'` and `kubectl get pods -n default --show-labels | grep my-service`** (90% success)
   ```
   Verify the service selector matches the pod labels: `kubectl get service my-service -n default -o jsonpath='{.spec.selector}'` and `kubectl get pods -n default --show-labels | grep my-service`
   ```
2. **Check pod readiness: `kubectl get pods -n default -l app=my-service -o wide` and ensure readiness probes pass. If pods are not ready, fix the probe configuration in the deployment.** (85% success)
   ```
   Check pod readiness: `kubectl get pods -n default -l app=my-service -o wide` and ensure readiness probes pass. If pods are not ready, fix the probe configuration in the deployment.
   ```

## Dead Ends

- **Delete and recreate the Ingress resource** — The Ingress resource is not the problem; the underlying service or pod configuration is misaligned. Recreating Ingress doesn't fix the endpoint mismatch. (95% fail)
- **Increase the number of replicas in the deployment** — More replicas won't help if the service selector doesn't match the pod labels or if pods are failing readiness probes. (80% fail)
