Kubernetes Ingress "503 Service Temporarily Unavailable": the Service has no ready pods
Fix a Kubernetes Ingress 503 Service Temporarily Unavailable: check the Service endpoints, label selectors, readiness probes and ports, and read the ingress-nginx log.
by OhSudo ··
Not sure this is your cause?Find it step by step: Website down →Find it step by step: Pod not running →
Part of a learning path:Kubernetes: debugging pods
503 Service Temporarily UnavailablenginxThe Ingress matched your request, so the host and path are fine. It then looked for a pod to send it to, and found none ready. The controller only sends traffic to a Service’s endpoints: the pods that match its selector and pass their readiness check. Here there are zero.
So the question is: why does this Service have no endpoints?
- Ingresshost and path matched(works)routes to
- Serviceselectorhas no endpoints(fails)
- EndpointSliceno ready pods(breaks here)
TL;DR
kubectl get endpointslices -n web -l kubernetes.io/service-name=webkubectl get pods -n web --show-labelskubectl describe svc web -n webNo addresses in the EndpointSlice? Compare the Service’s Selector with the pods’ labels, and check that the pods are READY 1/1.
1. Look at the endpoints
NAME ADDRESSTYPE PORTS ENDPOINTS AGEweb-7xk2p IPv4 <unset> <unset> 5m<unset> means none. kubectl describe ingress says the same in its own way:
The Backends line lists the Service, with the pod addresses it found, or none.
2. The selector doesn’t match
The most common cause. A Service picks pods by labels, and one typo means it picks none:
kubectl get svc web -n web -o jsonpath='{.spec.selector}'kubectl get pods -n web --show-labels{"app":"web"}web-5d8c9-abcde 1/1 Running app.kubernetes.io/name=web,...The Service wants app=web, and the pods have app.kubernetes.io/name=web. Make them match, usually in the Service. The Kubernetes Manifest Generator writes a Deployment, Service and Ingress whose labels match.
3. The pods aren’t ready
Pods that match, and fail their readiness probe, are kept out of the endpoints. That’s the probe doing its job:
kubectl get pods -n webkubectl describe pod web-5d8c9-abcde -n web | grep -A 5 -i readinesskubectl get events -n web --sort-by=.lastTimestamp | tail -n 100/1 Running with Readiness probe failed means the probe’s path or port is wrong, or the app is slow to start. Check what the probe asks for, against what the app serves. Pods that aren’t running at all have their own story: see CrashLoopBackOff, ImagePullBackOff and Pending.
During a rollout with no ready new pods, or with zero replicas, you get the same 503. Check kubectl get deploy web -n web.
4. The ports
The chain has three ports, and they must line up:
Ingress backend.service.port → Service port → Service targetPort → container's portAn Ingress that names a Service port that doesn’t exist also gives a 503. kubectl describe svc web -n web shows Port and TargetPort. When targetPort is a name, like http, it must match a named port in the pod’s spec.
5. Read the controller’s log
ingress-nginx says exactly what it found:
kubectl logs -n ingress-nginx deploy/ingress-nginx-controller --tail=50 | grep -i -E 'endpoint|web'Service "web/web" does not have any active Endpoint.That confirms this article’s case. A Service in another namespace than the Ingress also fails here: an Ingress can only send to Services in its own namespace.
About ingress-nginx: the Kubernetes project retired it in March 2026, so it gets no further fixes, including security fixes. It keeps working where it’s installed, and this 503 still means the same. For new clusters, the project recommends moving to the Gateway API, with an implementation such as Envoy Gateway, Cilium or the cloud provider’s own.
6. 503, 502 and 404
| You get | Means |
|---|---|
503 |
No ready endpoints: this article |
502 |
There are endpoints, and the pod refused or broke the connection: wrong targetPort, or the app listens on 127.0.0.1 |
504 |
The pod accepted, and took too long: see 504 Gateway Time-out |
404 from the controller |
No Ingress rule matched the host or path, or ingressClassName is wrong |
Warning
Don’t remove the readiness probe to make the 503 go away. Traffic then reaches pods that can’t serve it yet, and users get errors from the app instead, which are harder to trace. Fix the probe’s path, port or timing so that it reflects when the app is really ready.
Shell, we have a problem!
Similar, but different: a 502 Bad Gateway from plain Nginx has the same idea, outside Kubernetes. On IIS, a 503 means the application pool stopped: see IIS 500.19 and 503. CreateContainerConfigError stops pods before they’re ready. Why pods drop out of the endpoints: Readiness probe failed. HAProxy’s version of this page is 503 No server is available.
$ ./practice.sh
Practice this in the terminal
Open the Terminal Playground with this article’s scenario loaded. It is safe and runs in your browser.
Found this useful? Share it.
Found a mistake? Let us know at contact@ohsudo.com.