Hello, novice here.
While learning and trying out liveness probe myself, I’ve noticed that it takes 30 seconds for the container to restart after failing the liveness check.
On the docs, it says wait 30 seconds .
This page shows how to configure liveness, readiness and startup probes for containers.
The kubelet uses liveness probes to know when to restart a container. For example, liveness probes could catch a deadlock, where an application is running, but...
Wait another 30 seconds, and verify that the container has been restarted
Is this 30 seconds fixed?
I’ve tried settings periodSeconds
and failureThreshold
to 1
but has no effect.
Thanks
Bump.
Seems like no one else knows. Perhaps it is really hardcoded to 30 seconds. Will try to look at kubernetes source code as my next approach.
cks_s
April 8, 2021, 8:12am
3
kubectl -n production get events | grep -i “Liveness probe failed”