You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Placeholder docs PR for KEP 4960: Container Stop Signals
* Added note in pod termination page
* Added stop signal section in pod termination docs
* Update pod-lifecycle.md
---------
Co-authored-by: Qiming Teng <[email protected]>
Copy file name to clipboardExpand all lines: content/en/docs/concepts/workloads/pods/pod-lifecycle.md
+51-5Lines changed: 51 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -113,7 +113,8 @@ Value | Description
113
113
114
114
{{< note >}}
115
115
116
-
When a pod is failing to start repeatedly, `CrashLoopBackOff` may appear in the `Status` field of some kubectl commands. Similarly, when a pod is being deleted, `Terminating` may appear in the `Status` field of some kubectl commands.
116
+
When a pod is failing to start repeatedly, `CrashLoopBackOff` may appear in the `Status` field of some kubectl commands.
117
+
Similarly, when a pod is being deleted, `Terminating` may appear in the `Status` field of some kubectl commands.
117
118
118
119
Make sure not to confuse _Status_, a kubectl display field for user intuition, with the pod's `phase`.
119
120
Pod phase is an explicit part of the Kubernetes data model and of the
@@ -453,9 +454,14 @@ Each probe must define exactly one of these four mechanisms:
453
454
the port is open. If the remote system (the container) closes
454
455
the connection immediately after it opens, this counts as healthy.
455
456
456
-
{{< caution >}} Unlike the other mechanisms, `exec` probe's implementation involves the creation/forking of multiple processes each time when executed.
457
-
As a result, in case of the clusters having higher pod densities, lower intervals of `initialDelaySeconds`, `periodSeconds`, configuring any probe with exec mechanism might introduce an overhead on the cpu usage of the node.
458
-
In such scenarios, consider using the alternative probe mechanisms to avoid the overhead.{{< /caution >}}
457
+
{{< caution >}}
458
+
Unlike the other mechanisms, `exec` probe's implementation involves
459
+
the creation/forking of multiple processes each time when executed.
460
+
As a result, in case of the clusters having higher pod densities,
461
+
lower intervals of `initialDelaySeconds`, `periodSeconds`,
462
+
configuring any probe with exec mechanism might introduce an overhead on the cpu usage of the node.
463
+
In such scenarios, consider using the alternative probe mechanisms to avoid the overhead.
464
+
{{< /caution >}}
459
465
460
466
### Probe outcome
461
467
@@ -569,13 +575,53 @@ before the Pod is allowed to be forcefully killed. With that forceful shutdown t
569
575
place, the {{< glossary_tooltip text="kubelet" term_id="kubelet" >}} attempts graceful
570
576
shutdown.
571
577
572
-
Typically, with this graceful termination of the pod, kubelet makes requests to the container runtime to attempt to stop the containers in the pod by first sending a TERM (aka. SIGTERM) signal, with a grace period timeout, to the main process in each container. The requests to stop the containers are processed by the container runtime asynchronously. There is no guarantee to the order of processing for these requests. Many container runtimes respect the `STOPSIGNAL` value defined in the container image and, if different, send the container image configured STOPSIGNAL instead of TERM.
578
+
Typically, with this graceful termination of the pod, kubelet makes requests to the container runtime
579
+
to attempt to stop the containers in the pod by first sending a TERM (aka. SIGTERM) signal,
580
+
with a grace period timeout, to the main process in each container.
581
+
The requests to stop the containers are processed by the container runtime asynchronously.
582
+
There is no guarantee to the order of processing for these requests.
583
+
Many container runtimes respect the `STOPSIGNAL` value defined in the container image and,
584
+
if different, send the container image configured STOPSIGNAL instead of TERM.
573
585
Once the grace period has expired, the KILL signal is sent to any remaining
574
586
processes, and the Pod is then deleted from the
575
587
{{< glossary_tooltip text="API Server" term_id="kube-apiserver" >}}. If the kubelet or the
576
588
container runtime's management service is restarted while waiting for processes to terminate, the
577
589
cluster retries from the start including the full original grace period.
578
590
591
+
### Stop Signals {#pod-termination-stop-signals}
592
+
593
+
The stop signal used to kill the container can be defined in the container image with the `STOPSIGNAL` instruction.
594
+
If no stop signal is defined in the image, the default signal of the container runtime
595
+
(SIGTERM for both containerd and CRI-O) would be used to kill the container.
0 commit comments