Skip to content

Commit 6c67ddd

Browse files
committed
[zh-cn]sync pods/pod-lifecycle.md
Signed-off-by: xin.li <[email protected]>
1 parent 5c9e45e commit 6c67ddd

File tree

1 file changed

+28
-4
lines changed

1 file changed

+28
-4
lines changed

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

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -977,27 +977,51 @@ documentation for
977977
请参阅[从 StatefulSet 中删除 Pod](/zh-cn/docs/tasks/run-application/force-delete-stateful-set-pod/) 的任务文档。
978978

979979
<!--
980-
### Garbage collection of terminated Pods {#pod-garbage-collection}
980+
### Garbage collection of Pods {#pod-garbage-collection}
981981
982982
For failed Pods, the API objects remain in the cluster's API until a human or
983983
{{< glossary_tooltip term_id="controller" text="controller" >}} process
984984
explicitly removes them.
985985
986-
The control plane cleans up terminated Pods (with a phase of `Succeeded` or
986+
The Pod garbage collector (PodGC), which is a controller in the control plane, cleans up terminated Pods (with a phase of `Succeeded` or
987987
`Failed`), when the number of Pods exceeds the configured threshold
988988
(determined by `terminated-pod-gc-threshold` in the kube-controller-manager).
989989
This avoids a resource leak as Pods are created and terminated over time.
990990
-->
991-
### 已终止 Pod 的垃圾收集 {#pod-garbage-collection}
991+
### Pod 的垃圾收集 {#pod-garbage-collection}
992992

993993
对于已失败的 Pod 而言,对应的 API 对象仍然会保留在集群的 API 服务器上,
994994
直到用户或者{{< glossary_tooltip term_id="controller" text="控制器" >}}进程显式地将其删除。
995995

996-
控制面组件会在 Pod 个数超出所配置的阈值
996+
Pod 的垃圾收集器(PodGC)是控制平面的控制器,它会在 Pod 个数超出所配置的阈值
997997
(根据 `kube-controller-manager``terminated-pod-gc-threshold` 设置)时删除已终止的
998998
Pod(阶段值为 `Succeeded``Failed`)。
999999
这一行为会避免随着时间演进不断创建和终止 Pod 而引起的资源泄露问题。
10001000

1001+
<!--
1002+
Additionally, PodGC cleans up any Pods which satisfy any of the following conditions:
1003+
1. are orphan pods - bound to a node which no longer exists,
1004+
2. are unscheduled terminating pods,
1005+
3. are terminating pods, bound to a non-ready node tainted with [`node.kubernetes.io/out-of-service`](/docs/reference/labels-annotations-taints/#node-kubernetes-io-out-of-service), when the `NodeOutOfServiceVolumeDetach` feature gate is enabled.
1006+
1007+
When the `PodDisruptionConditions` feature gate is enabled, along with
1008+
cleaning up the pods, PodGC will also mark them as failed if they are in a non-terminal
1009+
phase. Also, PodGC adds a pod disruption condition when cleaning up an orphan
1010+
pod (see also:
1011+
[Pod disruption conditions](/docs/concepts/workloads/pods/disruptions#pod-disruption-conditions)).
1012+
-->
1013+
此外,PodGC 会清理满足以下任一条件的所有 Pod:
1014+
1. 孤儿 Pod - 绑定到不再存在的节点,
1015+
2. 计划外终止的 Pod
1016+
3. 终止过程中的 Pod,当启用 `NodeOutOfServiceVolumeDetach` 特性门控时,
1017+
绑定到有 [`node.kubernetes.io/out-of-service`](/zh-cn/docs/reference/labels-annotations-taints/#node-kubernetes-io-out-of-service)
1018+
污点的未就绪节点。
1019+
1020+
若启用 `PodDisruptionConditions` 特性门控,在清理 Pod 的同时,
1021+
如果它们处于非终止状态阶段,PodGC 也会将它们标记为失败。
1022+
此外,PodGC 在清理孤儿 Pod 时会添加 Pod 干扰状况(另请参阅:
1023+
[Pod 干扰状况](/zh-cn/docs/concepts/workloads/pods/disruptions#pod-disruption-conditions))。
1024+
10011025
## {{% heading "whatsnext" %}}
10021026

10031027
<!--

0 commit comments

Comments
 (0)