Skip to content

Commit 2b72413

Browse files
authored
update pod-lifecycle.md
Add the EndpointSliceTerminatingCondition section
1 parent 65ec8c6 commit 2b72413

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

content/zh-cn/docs/concepts/workloads/pods/pod-lifecycle.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -912,6 +912,23 @@ An example flow:
912912
和其他工作负载资源不再将关闭进程中的 Pod 视为合法的、能够提供服务的副本。
913913
关闭动作很慢的 Pod 也无法继续处理请求数据,
914914
因为负载均衡器(例如服务代理)已经在终止宽限期开始的时候将其从端点列表中移除。
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+
915932

916933
<!--
917934
1. When the grace period expires, the kubelet triggers forcible shutdown. The container runtime sends
@@ -921,14 +938,14 @@ An example flow:
921938
to 0 (immediate deletion).
922939
1. The API server deletes the Pod's API object, which is then no longer visible from any client.
923940
-->
924-
4. 超出终止宽限期限时,`kubelet` 会触发强制关闭过程。容器运行时会向 Pod
941+
1. 超出终止宽限期限时,`kubelet` 会触发强制关闭过程。容器运行时会向 Pod
925942
中所有容器内仍在运行的进程发送 `SIGKILL` 信号。
926943
`kubelet` 也会清理隐藏的 `pause` 容器,如果容器运行时使用了这种容器的话。
927944

928-
5. `kubelet` 触发强制从 API 服务器上删除 Pod 对象的逻辑,并将体面终止限期设置为 0
945+
1. `kubelet` 触发强制从 API 服务器上删除 Pod 对象的逻辑,并将体面终止限期设置为 0
929946
(这意味着马上删除)。
930947

931-
6. API 服务器删除 Pod 的 API 对象,从任何客户端都无法再看到该对象。
948+
1. API 服务器删除 Pod 的 API 对象,从任何客户端都无法再看到该对象。
932949

933950
<!--
934951
### Forced Pod termination {#pod-termination-forced}

0 commit comments

Comments
 (0)