@@ -912,6 +912,20 @@ An example flow:
912
912
和其他工作负载资源不再将关闭进程中的 Pod 视为合法的、能够提供服务的副本。
913
913
关闭动作很慢的 Pod 也无法继续处理请求数据,
914
914
因为负载均衡器(例如服务代理)已经在终止宽限期开始的时候将其从端点列表中移除。
915
+ {{<note >}}
916
+ <!--
917
+ If you don't have the `EndpointSliceTerminatingCondition` feature gate enabled
918
+ in your cluster (the gate is on by default from Kubernetes 1.22, and locked to default in 1.26), then the Kubernetes control
919
+ plane removes a Pod from any relevant EndpointSlices as soon as the Pod's
920
+ termination grace period _begins_. The behavior above is described when the
921
+ feature gate `EndpointSliceTerminatingCondition` is enabled.
922
+ -->
923
+ 如果你的集群中没有启用 EndpointSliceTerminatingCondition 特性门控
924
+ (该门控从 Kubernetes 1.22 开始默认开启,在 1.26 中锁定为默认),
925
+ 那么一旦 Pod 的终止宽限期开始,Kubernetes 控制平面就会从所有的相关 EndpointSlices 中移除 Pod。
926
+ 上述行为是在 EndpointSliceTerminatingCondition 特性门控被启用时描述的。
927
+ {{</note >}}
928
+
915
929
916
930
<!--
917
931
1. When the grace period expires, the kubelet triggers forcible shutdown. The container runtime sends
@@ -921,14 +935,14 @@ An example flow:
921
935
to 0 (immediate deletion).
922
936
1. The API server deletes the Pod's API object, which is then no longer visible from any client.
923
937
-->
924
- 4 . 超出终止宽限期限时,` kubelet ` 会触发强制关闭过程。容器运行时会向 Pod
938
+ 1 . 超出终止宽限期限时,` kubelet ` 会触发强制关闭过程。容器运行时会向 Pod
925
939
中所有容器内仍在运行的进程发送 ` SIGKILL ` 信号。
926
940
` kubelet ` 也会清理隐藏的 ` pause ` 容器,如果容器运行时使用了这种容器的话。
927
941
928
- 5 . ` kubelet ` 触发强制从 API 服务器上删除 Pod 对象的逻辑,并将体面终止限期设置为 0
942
+ 1 . ` kubelet ` 触发强制从 API 服务器上删除 Pod 对象的逻辑,并将体面终止限期设置为 0
929
943
(这意味着马上删除)。
930
944
931
- 6 . API 服务器删除 Pod 的 API 对象,从任何客户端都无法再看到该对象。
945
+ 1 . API 服务器删除 Pod 的 API 对象,从任何客户端都无法再看到该对象。
932
946
933
947
<!--
934
948
### Forced Pod termination {#pod-termination-forced}
0 commit comments