Liveness probe failed: Kubernetes keeps restarting the container
Liveness probe failed
The kubelet ran a container's liveness probe, got a failure, and killed and restarted the container. The RESTARTS count on the Pod goes up each time.
From Kubernetes's documentation, checked 1 Dec 2026.
Liveness probe failed: cat: can't open '/tmp/healthy': No such file or directory. Container liveness failed liveness probe, will be restartedAlso searched as: Liveness probe failed · Unhealthy Liveness probe failed · failed liveness probe, will be restarted · Container failed liveness probe · Kubernetes liveness probe restarting container
What it means
A liveness probe tells the kubelet when to restart a container. It can be a command, an HTTP request, a TCP check or a gRPC check. When the probe fails more times than its tolerance allows, the kubelet kills and restarts the container. The Warning event reads Liveness probe failed, and the Normal event after it says the container will be restarted. The event text after the colon depends on the probe type.
Common causes
- The application really is broken, such as stuck in a deadlock. Restarting it is what the probe is for.
- The probe checks something that is not there. In the Kubernetes example, the command cat /tmp/healthy fails once the file is removed after 30 seconds.
- An HTTP probe gets a status outside 200 to 399. Any code from 200 up to, but not including, 400 counts as success. Any other code is a failure.
- The application needs more time to start than the liveness probe allows. Without an initial delay or a startup probe, early checks can fail and the container is killed before it is ready.
From Kubernetes's documentation
How to fix it
Read the Pod events for the failed probe
Look at the Events at the bottom of the output. A Warning with reason Unhealthy and the text Liveness probe failed shows what the probe reported. The Normal Killing event after it says the container failed its liveness probe and will be restarted. Note the probe type and what it checks, so you can test the same thing yourself.
kubectl describe pod <pod-name> --namespace=<namespace>
Check the restart count
The RESTARTS column rises each time a failed container comes back to the running state. A count that keeps climbing means the probe keeps failing.
kubectl get pod <pod-name> --namespace=<namespace>
Compare the probe settings with how the application behaves
Read the livenessProbe block in the Pod's YAML: the command, path or port, initialDelaySeconds, periodSeconds and failureThreshold. Make sure what it checks is something the healthy application provides. If the application is slow to start, add a startup probe with a failureThreshold times periodSeconds long enough for the worst case. The kubelet then runs no liveness checks until the startup probe succeeds. Fix the probe or the application, and apply the change.
kubectl get pod <pod-name> --namespace=<namespace> --output=yaml
Following along? Tap a step’s number to tick it off.
How to confirm it's fixed
- kubectl describe pod shows no new Unhealthy events for the liveness probe.
- The RESTARTS count in kubectl get pod stops going up while the Pod stays Running.
Related notes
The page shows a Pod event for an exec probe. The page shows the event for an exec probe only. If a startup probe is set, liveness and readiness probes don't run until it succeeds. A startup probe that never succeeds also gets the container killed.
Related engineering templates
Continue the investigation
Found this useful? Follow KBY for more like it.
Recommended reading
More from KBY that goes with this error.
- Kubernetes error
Pod status: Failed / Reason: Evicted: Kubernetes Pod evicted by node pressure
2 min read
Follow Kubernetes failures and fixes
A short email about twice a week for IT teams: new runbooks, configuration traps and fixes, and the Microsoft and Apple deadlines coming up.