Skip to content

Commit e6eedac

Browse files
Add warning that liveness probe must be configured carefully (#39930)
* a warning on liveness probes about cascading failures, added * A warning that liveness probe must be configured carefully. * better words are added * wrapping of the log lines * warning is modified that liveness probe must be configured carefully
1 parent cdd66be commit e6eedac

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ where an application is running, but unable to make progress. Restarting a
1414
container in such a state can help to make the application more available
1515
despite bugs.
1616

17+
A common pattern for liveness probes is to use the same low-cost HTTP endpoint
18+
as for readiness probes, but with a higher failureThreshold. This ensures that the pod
19+
is observed as not-ready for some period of time before it is hard killed.
20+
1721
The kubelet uses readiness probes to know when a container is ready to start
1822
accepting traffic. A Pod is considered ready when all of its containers are ready.
1923
One use of this signal is to control which Pods are used as backends for Services.
@@ -25,7 +29,18 @@ it succeeds, making sure those probes don't interfere with the application start
2529
This can be used to adopt liveness checks on slow starting containers, avoiding them
2630
getting killed by the kubelet before they are up and running.
2731

32+
{{< caution >}}
33+
Liveness probes can be a powerful way to recover from application failures, but
34+
they should be used with caution. Liveness probes must be configured carefully
35+
to ensure that they truly indicate unrecoverable application failure, for example a deadlock.
36+
{{< /caution >}}
2837

38+
{{< note >}}
39+
Incorrect implementation of liveness probes can lead to cascading failures. This results in
40+
restarting of container under high load; failed client requests as your application became less
41+
scalable; and increased workload on remaining pods due to some failed pods.
42+
Understand the difference between readiness and liveness probes and when to apply them for your app.
43+
{{< /note >}}
2944

3045
## {{% heading "prerequisites" %}}
3146

0 commit comments

Comments
 (0)