Kubernetes pod shows Readiness probe failed and never becomes Ready
Warning Unhealthy kubelet Readiness probe failed:Short answer
A failed readiness probe does not restart the pod. The kubelet marks it not ready and removes it from the Service. Read the probe event in kubectl describe pod, then check three things: the app needs longer to start, the probe path or port is wrong, or the endpoint returns a status outside 200 to 399.
Fix it fast
1Find out which cause you have
Read the pod events at the bottom of the describe output. The text after Readiness probe failed names what the kubelet saw.
kubectl describe pod my-app-7d9c6b5f4-abcde2Match what you see, then jump to its fix
- 1
The failures appear only in the first minute, then stop or never stop on a slow appThe app needs longer to start than the probe allowsFix - 2
The failure line shows a status code or connection error immediately, on every attemptThe probe path, port or status code does not match what the app returnsFix - 3
The Pod is Running, the container is not restarting, and requests to the Service failThe Service has no endpoints because every pod is not readyFix
- 1
What does the error look like?
Warning Unhealthy kubelet Readiness probe failed:READY 0/1 with STATUS Running
Cause 1 of 3
The app needs longer to start than the probe allows
1Check
Compare how long the app takes to be ready with initialDelaySeconds plus failureThreshold times periodSeconds. If the app needs more, the probe gives up too soon.
kubectl logs my-app-7d9c6b5f4-abcde
kubectl get pod my-app-7d9c6b5f4-abcde -o jsonpath='{.spec.containers[0].readinessProbe}'2Fix
Add a startup probe on the same endpoint with a high failureThreshold. Kubernetes does not run the liveness or readiness probes until it succeeds.
startupProbe:
httpGet:
path: /healthz
port: 8080
periodSeconds: 10
failureThreshold: 30 # up to about 300 seconds to start
readinessProbe:
httpGet:
path: /healthz
port: 8080
periodSeconds: 53Verify
Apply the change and watch the pod reach 1/1.
kubectl get pod -wConfirmed by kubernetes.io
Cause 2 of 3
The probe path, port or status code does not match what the app returns
1Check
An HTTP probe succeeds for any code from 200 up to 399 and fails on all others, including a redirect to a login page that ends in 401 or a 404 for a path that does not exist. Call the endpoint from your machine through a port-forward.
kubectl port-forward pod/my-app-7d9c6b5f4-abcde 8080:8080 &
curl -i http://127.0.0.1:8080/healthz2Fix
Point the probe at a path and port the app really serves, and make that route answer with a 2xx without needing a login.
readinessProbe:
httpGet:
path: /healthz
port: 8080
periodSeconds: 53Verify
The pod shows READY 1/1 after the next probe period.
kubectl get pod my-app-7d9c6b5f4-abcdeConfirmed by kubernetes.io
Cause 3 of 3
The Service has no endpoints because every pod is not ready
1Check
A pod failing its readiness probe is taken out of the Service's EndpointSlices. List them to see which pods are in.
kubectl get endpointslices -l kubernetes.io/service-name=my-service2Fix
Fix the probe using the two causes above. Do not remove the readiness probe to get traffic flowing: pods that are not ready would then receive requests.
kubectl rollout restart deployment/my-app3Verify
The pod IP appears in the endpoints again.
kubectl get endpointslices -l kubernetes.io/service-name=my-serviceConfirmed by kubernetes.io
How do I stop it coming back?
- Give every slow-starting app a startup probe instead of a long initial delay.
- Use one cheap, login-free health route for probes.
- Test the probe path with a port-forward before you commit the manifest.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
Related fixes
Servers
Argo CD behind an nginx Ingress loops with too many redirects
307 Temporary Redirect on every request to the Argo CD host
The browser and Argo CD disagree about who handles TLS.
3 causes, each with a fixServers
A cert-manager Certificate stays at READY False with Let's Encrypt
Issuing certificate as Secret does not exist
A Certificate that stays not ready is waiting on a chain: Issuer, CertificateRequest, Order, Challenge.
3 causes, each with a fixServers
Kubernetes in Docker Desktop will not start or stays on starting
kubectl shows no contexts, or errors against the docker-desktop context
When the Docker Desktop cluster hangs on starting, the usual causes are too few resources, a broken cluster state, or the kubeadm provisioner failing.
4 causes, each with a fixServers
EKS managed node group ends in Create failed because nodes never joined
NodeCreationFailure
Nodes that do not register within 15 minutes cause NodeCreationFailure and a Create failed status.
4 causes, each with a fixServers
An Elasticsearch pod keeps restarting with Back-off restarting failed container
CrashLoopBackOff
Back-off restarting failed container only says the container keeps dying.
3 causes, each with a fixServers
helm install fails: must either provide a name or specify --generate-name
Error: must either provide a name or specify --generate-name
helm install expects a release name followed by a chart.
3 causes, each with a fix