@@ -221,13 +221,13 @@ to override this behaviour, see [Delete owner objects and orphan dependents](/do
221
221
## Garbage collection of unused containers and images {#containers-images}
222
222
223
223
The {{<glossary_tooltip text="kubelet" term_id="kubelet">}} performs garbage
224
- collection on unused images every five minutes and on unused containers every
224
+ collection on unused images every two minutes and on unused containers every
225
225
minute. You should avoid using external garbage collection tools, as these can
226
226
break the kubelet behavior and remove containers that should exist.
227
227
-->
228
228
## 未使用容器和镜像的垃圾收集 {#containers-images}
229
229
230
- {{<glossary_tooltip text="kubelet" term_id="kubelet">}} 会每五分钟对未使用的镜像执行一次垃圾收集 ,
230
+ {{<glossary_tooltip text="kubelet" term_id="kubelet">}} 会每两分钟对未使用的镜像执行一次垃圾收集 ,
231
231
每分钟对未使用的容器执行一次垃圾收集。
232
232
你应该避免使用外部的垃圾收集工具,因为外部工具可能会破坏 kubelet
233
233
的行为,移除应该保留的容器。
@@ -273,6 +273,36 @@ until disk usage reaches the `LowThresholdPercent` value.
273
273
垃圾收集器会基于镜像上次被使用的时间来按顺序删除它们,首先删除的是最近未使用的镜像。
274
274
kubelet 会持续删除镜像,直到磁盘用量到达 ` LowThresholdPercent ` 值为止。
275
275
276
+ <!--
277
+ #### Garbage collection for unused container images {#image-maximum-age-gc}
278
+ -->
279
+ #### 未使用容器镜像的垃圾收集 {#image-maximum-age-gc}
280
+
281
+ {{< feature-state for_k8s_version="v1.29" state="alpha" >}}
282
+
283
+ <!--
284
+ As an alpha feature, you can specify the maximum time a local image can be unused for,
285
+ regardless of disk usage. This is a kubelet setting that you configure for each node.
286
+ -->
287
+ 这是一个 Alpha 特性,不论磁盘使用情况如何,你都可以指定本地镜像未被使用的最长时间。
288
+ 这是一个可以为每个节点配置的 kubelet 设置。
289
+
290
+ <!--
291
+ To configure the setting, enable the `ImageMaximumGCAge`
292
+ [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) for the kubelet,
293
+ and also set a value for the `ImageMaximumGCAge` field in the kubelet configuration file.
294
+ -->
295
+ 请为 kubelet 启用 ` ImageMaximumGCAge `
296
+ [ 特性门控] ( /zh-cn/docs/reference/command-line-tools-reference/feature-gates/ ) ,
297
+ 并在 kubelet 配置文件中为 ` ImageMaximumGCAge ` 字段赋值来配置该设置。
298
+
299
+ <!--
300
+ The value is specified as a Kubernetes _duration_; for example, you can set the configuration
301
+ field to `3d12h`, which means 3 days and 12 hours.
302
+ -->
303
+ 该值应遵循 Kubernetes __ 持续时间(Duration)__ 格式;例如,你可以将配置字段设置为 ` 3d12h ` ,
304
+ 代表 3 天 12 小时。
305
+
276
306
<!--
277
307
### Container garbage collection {#container-image-garbage-collection}
278
308
0 commit comments