Kubernetes' liveness and readiness probes for pods (deployment) can be configured with this initial delay ---- meaning the probe will start after this many seconds after the container is up. If it is not specified, what is the default value? I can't seem to find it. The default value for periodSeconds is documented as 10 second.
Thanks
livenessProbe: Indicates whether the Container is running. If the liveness probe fails, the kubelet kills the Container, and the Container is subjected to its restart policy. If a Container does not provide a liveness probe, the default state is Success.
A readiness probe indicates whether applications running in a container are ready to receive traffic. If so, Services in Kubernetes can send traffic to the pod, and if not, the endpoint controller removes the pod from all services.
If a container fails its startup probe, then the container is killed and follows the pod's restartPolicy . This type of probe is only executed at startup, unlike readiness probes, which are run periodically. The startup probe is configured in the spec. containers.
Increase the Timeout of the Readiness Probe To increase the Readiness probe timeout, configure the Managed controller item and update the value of "Readiness Timeout". By default it set to 5 (5 seconds). You may increase it to for example 30 (30 seconds).
It seems that the default value of 0
is missing from the documentation.
The health or readiness check algorithm works like this:
initialDelaySeconds
timeoutSeconds
for a timeoutsuccessThreshold
return success
failureThreshold
return failure
periodSeconds
and start a new readiness checkGiven the pace at which the project changes, I wanted to make sure the code actually confirms this.
Found a test in the public Kubernetes repo that verifies the default settings for probes:
expectedProbe := v1.Probe{
InitialDelaySeconds: 0,
TimeoutSeconds: 1,
PeriodSeconds: 10,
SuccessThreshold: 1,
FailureThreshold: 3,
}
See method TestSetDefaultProbe
in
https://github.com/kubernetes/kubernetes/blob/master/pkg/apis/core/v1/defaults_test.go
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With