Skip to content

Commit 76e8a52

Browse files
authored
Merge pull request #42376 from pegasas/probe
Add Liveness, Readiness, and Startup Probes concept
2 parents 81feb45 + 5dab5f8 commit 76e8a52

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
title: Liveness, Readiness, and Startup Probes
3+
content_type: concept
4+
weight: 40
5+
---
6+
7+
<!-- overview -->
8+
9+
Kubernetes has various types of probes:
10+
11+
- [Liveness probe](#liveness-probe)
12+
- [Readiness probe](#readiness-probe)
13+
- [Startup probe](#startup-probe)
14+
15+
<!-- body -->
16+
17+
## Liveness probe
18+
19+
Liveness probes determine when to restart a container. For example, liveness probes could catch a deadlock, when an application is running, but unable to make progress.
20+
21+
If a container fails its liveness probe repeatedly, the kubelet restarts the container.
22+
23+
Liveness probes do not wait for readiness probes to succeed. If you want to wait before
24+
executing a liveness probe you can either define `initialDelaySeconds`, or use a
25+
[startup probe](#startup-probe).
26+
27+
28+
## Readiness probe
29+
30+
Readiness probes determine when a container is ready to start accepting traffic. This is useful when waiting for an application to perform time-consuming initial tasks, such as establishing network connections, loading files, and warming caches.
31+
32+
If the readiness probe returns a failed state, Kubernetes removes the pod from all matching service endpoints.
33+
34+
Readiness probes runs on the container during its whole lifecycle.
35+
36+
37+
## Startup probe
38+
39+
A startup probe verifies whether the application within a container is started. This can be used to adopt liveness checks on slow starting containers, avoiding them getting killed by the kubelet before they are up and running.
40+
41+
If such a probe is configured, it disables liveness and readiness checks until it succeeds.
42+
43+
This type of probe is only executed at startup, unlike readiness probes, which are run periodically.
44+
45+
* Read more about the [Configure Liveness, Readiness and Startup Probes](/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes).

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ weight: 140
88

99
This page shows how to configure liveness, readiness and startup probes for containers.
1010

11+
For more information about probes, see [Liveness, Readiness and Startup Probes](/docs/concepts/configuration/liveness-readiness-startup-probes)
12+
1113
The [kubelet](/docs/reference/command-line-tools-reference/kubelet/) uses
1214
liveness probes to know when to restart a container. For example, liveness
1315
probes could catch a deadlock, where an application is running, but unable to

0 commit comments

Comments
 (0)