Skip to content

Commit 8497a23

Browse files
LouisJULIENTim Bannister
andauthored
Improve explanation of failureThreshold for Pod probes (#37416)
* Update configure-liveness-readiness-startup-probes.md * Update content/en/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.md Co-authored-by: Tim Bannister <[email protected]> Co-authored-by: Tim Bannister <[email protected]>
1 parent 197f18f commit 8497a23

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

content/en/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -388,9 +388,24 @@ to 1 second. Minimum value is 1.
388388
* `successThreshold`: Minimum consecutive successes for the probe to be
389389
considered successful after having failed. Defaults to 1. Must be 1 for liveness
390390
and startup Probes. Minimum value is 1.
391-
* `failureThreshold`: When a probe fails, Kubernetes will
392-
try `failureThreshold` times before giving up. Giving up in case of liveness probe means restarting the container. In case of readiness probe the Pod will be marked Unready.
393-
Defaults to 3. Minimum value is 1.
391+
* `failureThreshold`: After a probe fails `failureThreshold` times in a row, Kubernetes
392+
considers that the overall check has failed: the container is _not_ ready / healthy /
393+
live.
394+
For the case of a startup or liveness probe, if at least `failureThreshold` probes have
395+
failed, Kubernetes treats the container as unhealthy and triggers a restart for that
396+
specific container. The kubelet takes the setting of `terminationGracePeriodSeconds`
397+
for that container into account.
398+
For a failed readiness probe, the kubelet continues running the container that failed
399+
checks, and also continues to run more probes; because the check failed, the kubelet
400+
sets the `Ready` [condition](/docs/concepts/workloads/pods/pod-lifecycle/#pod-conditions)
401+
on the Pod to `false`.
402+
* `terminationGracePeriodSeconds`: configure a grace period for the kubelet to wait
403+
between triggering a shut down of the failed container, and then forcing the
404+
container runtime to stop that container.
405+
The default is to inherit the Pod-level value for `terminationGracePeriodSeconds`
406+
(30 seconds if not specified), and the minimum value is 1.
407+
See [probe-level `terminationGracePeriodSeconds`](#probe-level-terminationgraceperiodseconds)
408+
for more detail.
394409

395410
{{< note >}}
396411
Before Kubernetes 1.20, the field `timeoutSeconds` was not respected for exec probes:

0 commit comments

Comments
 (0)