Skip to content

Commit 60426d0

Browse files
authored
Merge pull request #35708 from yanrongshi/zh-cn]Sync-garbage-collection.md
[zh-cn]Sync garbage-collection.md
2 parents 0ec99a3 + 7748ca1 commit 60426d0

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

content/zh-cn/docs/concepts/architecture/garbage-collection.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ object. In most cases, Kubernetes manages owner references automatically.
5454
-->
5555
## 属主与依赖 {#owners-dependents}
5656

57-
Kubernetes 中很多对象通过[*属主引用*](/zh-cn/docs/concepts/overview/working-with-objects/owners-dependents/)
57+
Kubernetes 中很多对象通过[**属主引用**](/zh-cn/docs/concepts/overview/working-with-objects/owners-dependents/)
5858
链接到彼此。属主引用(Owner Reference)可以告诉控制面哪些对象依赖于其他对象。
5959
Kubernetes 使用属主引用来为控制面以及其他 API 客户端在删除某对象时提供一个清理关联资源的机会。
6060
在大多数场合,Kubernetes 都是自动管理属主引用的。
@@ -70,9 +70,9 @@ an owner reference. Owner references help different parts of Kubernetes avoid
7070
interfering with objects they don’t control.
7171
-->
7272
属主关系与某些资源所使用的[标签和选择算符](/zh-cn/docs/concepts/overview/working-with-objects/labels/)不同。
73-
例如,考虑一个创建 `EndpointSlice` 对象的 {{<glossary_tooltip text="Service" term_id="service">}}
74-
对象。Service 对象使用*标签*来允许控制面确定哪些 `EndpointSlice` 对象被该
75-
Service 使用。除了标签,每个被 Service 托管的 `EndpointSlice` 对象还有一个属主引用属性。
73+
例如,考虑一个创建 `EndpointSlice` 对象的 {{<glossary_tooltip text="Service" term_id="service">}}对象。
74+
Service 对象使用**标签**来允许控制面确定哪些 `EndpointSlice` 对象被该Service 使用。
75+
除了标签,每个被 Service 托管的 `EndpointSlice` 对象还有一个属主引用属性。
7676
属主引用可以帮助 Kubernetes 中的不同组件避免干预并非由它们控制的对象。
7777

7878
{{< note >}}
@@ -149,7 +149,7 @@ owner object:
149149
-->
150150
### 前台级联删除 {#foreground-deletion}
151151

152-
在前台级联删除中,正在被你删除的属主对象首先进入 *deletion in progress* 状态。
152+
在前台级联删除中,正在被你删除的属主对象首先进入 **deletion in progress** 状态。
153153
在这种状态下,针对属主对象会发生以下事情:
154154

155155
<!--
@@ -242,7 +242,7 @@ resource type.
242242
要配置对未使用容器和镜像的垃圾收集选项,可以使用一个
243243
[配置文件](/zh-cn/docs/tasks/administer-cluster/kubelet-config-file/),基于
244244
[`KubeletConfiguration`](/zh-cn/docs/reference/config-api/kubelet-config.v1beta1/#kubelet-config-k8s-io-v1beta1-KubeletConfiguration)
245-
资源类型来调整与垃圾搜集相关的 kubelet 行为。
245+
资源类型来调整与垃圾收集相关的 kubelet 行为。
246246

247247
<!--
248248
### Container image lifecycle
@@ -253,7 +253,7 @@ which is part of the kubelet, with the cooperation of
253253
considers the following disk usage limits when making garbage collection
254254
decisions:
255255
-->
256-
### 容器镜像生命期 {#container-image-lifecycle}
256+
### 容器镜像生命周期 {#container-image-lifecycle}
257257

258258
Kubernetes 通过其镜像管理器(Image Manager)来管理所有镜像的生命周期,
259259
该管理器是 kubelet 的一部分,工作时与
@@ -270,7 +270,7 @@ starting with the oldest first. The kubelet deletes images
270270
until disk usage reaches the `LowThresholdPercent` value.
271271
-->
272272
磁盘用量超出所配置的 `HighThresholdPercent` 值时会触发垃圾收集,
273-
垃圾收集器会基于镜像上次被使用的时间来按顺序删除它们,首先删除的是最老的镜像
273+
垃圾收集器会基于镜像上次被使用的时间来按顺序删除它们,首先删除的是最近未使用的镜像
274274
kubelet 会持续删除镜像,直到磁盘用量到达 `LowThresholdPercent` 值为止。
275275

276276
<!--
@@ -302,7 +302,7 @@ kubelet 会基于如下变量对所有未使用的容器执行垃圾收集操作
302302
In addition to these variables, the kubelet garbage collects unidentified and
303303
deleted containers, typically starting with the oldest first.
304304
305-
`MaxPerPodContainer` and `MaxContainer` may potentially conflict with each other
305+
`MaxPerPodContainer` and `MaxContainers` may potentially conflict with each other
306306
in situations where retaining the maximum number of containers per Pod
307307
(`MaxPerPodContainer`) would go outside the allowable total of global dead
308308
containers (`MaxContainers`). In this situation, the kubelet adjusts
@@ -311,12 +311,12 @@ downgrade `MaxPerPodContainer` to `1` and evict the oldest containers.
311311
Additionally, containers owned by pods that have been deleted are removed once
312312
they are older than `MinAge`.
313313
-->
314-
除以上变量之外,kubelet 还会垃圾收集除无标识的以及已删除的容器,通常从最老的容器开始
314+
除以上变量之外,kubelet 还会垃圾收集除无标识的以及已删除的容器,通常从最近未使用的容器开始
315315

316316
当保持每个 Pod 的最大数量的容器(`MaxPerPodContainer`)会使得全局的已死亡容器个数超出上限
317-
`MaxContainers`)时,`MaxPerPodContainer``MaxContainers` 之间可能会出现冲突。
317+
`MaxContainers`)时,`MaxPerPodContainers``MaxContainers` 之间可能会出现冲突。
318318
在这种情况下,kubelet 会调整 `MaxPerPodContainer` 来解决这一冲突。
319-
最坏的情形是将 `MaxPerPodContainer` 降格为 `1`并驱逐最老的容器
319+
最坏的情形是将 `MaxPerPodContainer` 降格为 `1`并驱逐最近未使用的容器
320320
此外,当隶属于某已被删除的 Pod 的容器的年龄超过 `MinAge` 时,它们也会被删除。
321321

322322
{{<note>}}

0 commit comments

Comments
 (0)