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