kubernetes
network_error
ai_generated
true
Warning: No endpoints available for service 'default/my-service'
ID: kubernetes/ingress-controller-no-endpoints
87%Fix Rate
88%Confidence
1Evidence
2023-11-05First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| nginx-ingress-controller v1.9.5 | active | — | — | — |
| Kubernetes v1.27.3 | active | — | — | — |
| Kubernetes v1.28.2 | active | — | — | — |
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.
generic中文
Ingress控制器无法找到引用服务的健康Pod端点,通常是因为服务选择器没有匹配到任何Pod或Pod未就绪。
Official Documentation
https://kubernetes.io/docs/concepts/services-networking/ingress-controllers/Workarounds
-
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`
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` -
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.
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.
中文步骤
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`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
Common approaches that don't work:
-
Delete and recreate the Ingress resource
95% fail
The Ingress resource is not the problem; the underlying service or pod configuration is misaligned. Recreating Ingress doesn't fix the endpoint mismatch.
-
Increase the number of replicas in the deployment
80% fail
More replicas won't help if the service selector doesn't match the pod labels or if pods are failing readiness probes.