Skip to content

Troubleshooting guide

Kubernetes readiness probe failed: how to fix it

A readiness failure takes the pod out of traffic. A liveness failure restarts it. Badly configured probes can turn a small slowdown into a full outage.

3 min read9 sectionsUpdated

On this page

Key points

  • Readiness removes from Service endpoints; liveness restarts.
  • Liveness probes must not check dependencies.
  • Use a startup probe for slow boots.
  • A default timeout of one second is often too short under load.

What the failure means

The kubelet calls your probe at intervals. After failureThreshold failures, readiness marks the pod unready and removes it from the Service, while liveness kills the container. The event text shows whether it was a connection refused, a status code or a timeout.

Common causes

  • Slow startup. The probe begins before the application is ready.
  • Wrong port or path, or an app bound to 127.0.0.1.
  • A one-second timeout that a loaded application cannot meet.
  • Health handlers sharing the same exhausted worker pool as normal requests.
  • Dependency checks inside the probe, so a slow database marks every pod unready at once.

Diagnose it

Read the event, and call the endpoint from inside the pod using the same port the kubelet uses.

bash
# Why it failed
kubectl describe pod my-pod | grep -E 'Unhealthy|Liveness|Readiness' | tail -10

# Probe configuration in use
kubectl get pod my-pod -o jsonpath='{.spec.containers[0].readinessProbe}'; echo

# Call the endpoint and time it from inside the pod
kubectl exec my-pod -- sh -c 'time wget -qO- http://localhost:8080/ready'

# Is the pod in the Service?
kubectl get endpointslices -l kubernetes.io/service-name=my-svc

Fixes

Add a startupProbe for slow applications instead of giving liveness a huge delay. Raise timeoutSeconds to a realistic value. Make liveness dumb: it should only confirm that the process can respond. Keep readiness about this instance, and be very careful about including shared dependencies. Run health handlers on a separate port or thread where the framework allows. The detailed guidance is in liveness, readiness and startup probes.

Catch it automatically

Count Unhealthy events by deployment and chart how many pods are ready compared with desired. Probe failures that rise with latency suggest overload. External uptime checks confirm what users experience, independently of what Kubernetes believes.

Frequently asked questions

Should my liveness probe check the database?

No. If the database is slow, every pod restarts and makes things worse. Restarting the app cannot fix the database.

What is a startup probe for?

It holds off the other probes until a slow application has started, so startup time does not need a long liveness delay.

Why are all my pods unready at once?

A shared dependency in the readiness check is the likely cause.

Watch your own site and services with VitalRix

Uptime checks, APM, logs, real-user monitoring, alerts and status pages in one place. Every product has a free tier and no credit card is needed.