Kubernetes "Readiness probe failed" - pod not serving traffic in CI
A readiness probe gates whether a pod receives traffic. While it fails, the pod stays out of the Service endpoints and the Deployment never reports enough Ready replicas - so a rollout status in CI hangs even though the container is "Running".
What this error means
kubectl get pods shows 0/1 Ready though Running; describe shows Readiness probe failed; kubectl get endpoints <svc> is empty. The deploy step waits and eventually times out.
NAME READY STATUS RESTARTS AGE
api-6b4c9d-xyz 0/1 Running 0 2m
Warning Unhealthy kubelet Readiness probe failed: HTTP probe failed with statuscode: 503Common causes
App not finished warming up
The readiness check fires before caches/connections are ready, so during a slow rollout the pod stays NotReady longer than the probe/deadline allows.
Wrong readiness endpoint or a real dependency outage
The probe path/port is wrong, or a downstream the readiness check depends on (DB, queue) is unavailable.
How to fix it
Check readiness state and endpoints
Confirm whether it is timing (slow warmup) or a genuine failure.
kubectl get pod <pod> -o jsonpath='{.status.conditions}'
kubectl get endpoints <svc>
kubectl describe pod <pod> | grep -i readinessFix the probe or the dependency
- Make the readiness endpoint reflect real serving capability, not just process-up.
- Loosen initialDelay/period/failureThreshold if warmup legitimately takes longer.
- If a dependency is down, the readiness probe is doing its job - fix the dependency.
How to prevent it
- Keep readiness checks fast and tied to actual serving readiness.
- Tune timings to measured warmup, and add a startupProbe for long boots.
- Set a sane progressDeadlineSeconds so a stuck rollout fails clearly.