Merge pull request #48639 from taguhoiya/update-doc-for-probes
Fix: improve clarity and formatting in liveness, readiness, and startup probes documentationpull/48663/head
commit
b1aea65eaf
|
@ -16,22 +16,21 @@ Kubernetes has various types of probes:
|
|||
|
||||
## Liveness probe
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
If a container fails its liveness probe repeatedly, the kubelet restarts the container.
|
||||
|
||||
Liveness probes do not wait for readiness probes to succeed. If you want to wait before
|
||||
executing a liveness probe you can either define `initialDelaySeconds`, or use a
|
||||
Liveness probes do not wait for readiness probes to succeed. If you want to wait before executing a liveness probe, you can either define `initialDelaySeconds` or use a
|
||||
[startup probe](#startup-probe).
|
||||
|
||||
|
||||
## Readiness probe
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
If the readiness probe returns a failed state, Kubernetes removes the pod from all matching service endpoints.
|
||||
|
||||
Readiness probes runs on the container during its whole lifecycle.
|
||||
Readiness probes run on the container during its whole lifecycle.
|
||||
|
||||
|
||||
## Startup probe
|
||||
|
|
|
@ -495,9 +495,9 @@ startupProbe:
|
|||
```
|
||||
|
||||
{{< note >}}
|
||||
When the kubelet probes a Pod using HTTP, it only follows redirects if the redirect
|
||||
When the kubelet probes a Pod using HTTP, it only follows redirects if the redirect
|
||||
is to the same host. If the kubelet receives 11 or more redirects during probing, the probe is considered successful
|
||||
and a related Event is created:
|
||||
and a related Event is created:
|
||||
|
||||
```none
|
||||
Events:
|
||||
|
@ -508,7 +508,7 @@ Events:
|
|||
Normal Pulled 24m kubelet Successfully pulled image "docker.io/kennethreitz/httpbin" in 5m12.402735213s
|
||||
Normal Created 24m kubelet Created container httpbin
|
||||
Normal Started 24m kubelet Started container httpbin
|
||||
Warning ProbeWarning 4m11s (x1197 over 24m) kubelet Readiness probe warning: Probe terminated redirects
|
||||
Warning ProbeWarning 4m11s (x1197 over 24m) kubelet Readiness probe warning: Probe terminated redirects
|
||||
```
|
||||
|
||||
If the kubelet receives a redirect where the hostname is different from the request, the outcome of the probe is treated as successful and kubelet creates an event to report the redirect failure.
|
||||
|
|
Loading…
Reference in New Issue