Skip to content

Commit 336478b

Browse files
authored
Merge pull request #41177 from my-git9/path-7723
[zh-cn] sync controller.md garbage-collection.md
2 parents 2f01041 + 45a7061 commit 336478b

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

content/zh-cn/docs/concepts/architecture/controller.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ closer to the desired state, by turning equipment on or off.
3737
## Controller pattern
3838
3939
A controller tracks at least one Kubernetes resource type.
40-
These [objects](/docs/concepts/overview/working-with-objects/kubernetes-objects/#kubernetes-objects)
40+
These {{< glossary_tooltip text="objects" term_id="object" >}}
4141
have a spec field that represents the desired state. The
4242
controller(s) for that resource are responsible for making the current
4343
state come closer to that desired state.
@@ -56,7 +56,7 @@ detail.
5656
## 控制器模式 {#controller-pattern}
5757

5858
一个控制器至少追踪一种类型的 Kubernetes 资源。这些
59-
[对象](/zh-cn/docs/concepts/overview/working-with-objects/kubernetes-objects/#kubernetes-objects)
59+
{{< glossary_tooltip text="对象" term_id="object" >}}
6060
有一个代表期望状态的 `spec` 字段。
6161
该资源的控制器负责确保其当前状态接近期望状态。
6262

@@ -287,14 +287,14 @@ Kubernetes 允许你运行一个稳定的控制平面,这样即使某些内置
287287
## {{% heading "whatsnext" %}}
288288
<!--
289289
* Read about the [Kubernetes control plane](/docs/concepts/overview/components/#control-plane-components)
290-
* Discover some of the basic [Kubernetes objects](/docs/concepts/overview/working-with-objects/kubernetes-objects/)
290+
* Discover some of the basic [Kubernetes objects](/docs/concepts/overview/working-with-objects/)
291291
* Learn more about the [Kubernetes API](/docs/concepts/overview/kubernetes-api/)
292292
* If you want to write your own controller, see
293293
[Extension Patterns](/docs/concepts/extend-kubernetes/#extension-patterns)
294294
in Extending Kubernetes.
295295
-->
296296
* 阅读 [Kubernetes 控制平面组件](/zh-cn/docs/concepts/overview/components/#control-plane-components)
297-
* 了解 [Kubernetes 对象](/zh-cn/docs/concepts/overview/working-with-objects/kubernetes-objects/)
297+
* 了解 [Kubernetes 对象](/zh-cn/docs/concepts/overview/working-with-objects/)
298298
的一些基本知识
299299
* 进一步学习 [Kubernetes API](/zh-cn/docs/concepts/overview/kubernetes-api/)
300300
* 如果你想编写自己的控制器,请看 Kubernetes 的

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ allows the clean up of resources like the following:
4646
<!--
4747
## Owners and dependents {#owners-dependents}
4848
49-
Many objects in Kubernetes link to each other through [*owner references*](/docs/concepts/overview/working-with-objects/owners-dependents/).
49+
Many objects in Kubernetes link to each other through [*owner references*](/docs/concepts/overview/working-with-objects/owners-dependents/).
5050
Owner references tell the control plane which objects are dependent on others.
5151
Kubernetes uses owner references to give the control plane, and other API
5252
clients, the opportunity to clean up related resources before deleting an
@@ -98,7 +98,7 @@ it is treated as having an unresolvable owner reference, and is not able to be g
9898

9999
<!--
100100
In v1.20+, if the garbage collector detects an invalid cross-namespace `ownerReference`,
101-
or a cluster-scoped dependent with an `ownerReference` referencing a namespaced kind, a warning Event
101+
or a cluster-scoped dependent with an `ownerReference` referencing a namespaced kind, a warning Event
102102
with a reason of `OwnerRefInvalidNamespace` and an `involvedObject` of the invalid dependent is reported.
103103
You can check for that kind of Event by running
104104
`kubectl get events -A --field-selector=reason=OwnerRefInvalidNamespace`.
@@ -118,7 +118,7 @@ Kubernetes checks for and deletes objects that no longer have owner
118118
references, like the pods left behind when you delete a ReplicaSet. When you
119119
delete an object, you can control whether Kubernetes deletes the object's
120120
dependents automatically, in a process called *cascading deletion*. There are
121-
two types of cascading deletion, as follows:
121+
two types of cascading deletion, as follows:
122122
123123
* Foreground cascading deletion
124124
* Background cascading deletion
@@ -135,7 +135,7 @@ Kubernetes 会检查并删除那些不再拥有属主引用的对象,例如在
135135

136136
<!--
137137
You can also control how and when garbage collection deletes resources that have
138-
owner references using Kubernetes {{<glossary_tooltip text="finalizers" term_id="finalizer">}}.
138+
owner references using Kubernetes {{<glossary_tooltip text="finalizers" term_id="finalizer">}}.
139139
-->
140140
你也可以使用 Kubernetes {{<glossary_tooltip text="Finalizers" term_id="finalizer">}}
141141
来控制垃圾收集机制如何以及何时删除包含属主引用的资源。
@@ -145,7 +145,7 @@ owner references using Kubernetes {{<glossary_tooltip text="finalizers" term_id=
145145
146146
In foreground cascading deletion, the owner object you're deleting first enters
147147
a *deletion in progress* state. In this state, the following happens to the
148-
owner object:
148+
owner object:
149149
-->
150150
### 前台级联删除 {#foreground-deletion}
151151

@@ -169,7 +169,7 @@ owner object:
169169
After the owner object enters the deletion in progress state, the controller
170170
deletes the dependents. After deleting all the dependent objects, the controller
171171
deletes the owner object. At this point, the object is no longer visible in the
172-
Kubernetes API.
172+
Kubernetes API.
173173
174174
During foreground cascading deletion, the only dependents that block owner
175175
deletion are those that have the `ownerReference.blockOwnerDeletion=true` field.
@@ -223,7 +223,7 @@ to override this behaviour, see [Delete owner objects and orphan dependents](/do
223223
The {{<glossary_tooltip text="kubelet" term_id="kubelet">}} performs garbage
224224
collection on unused images every five minutes and on unused containers every
225225
minute. You should avoid using external garbage collection tools, as these can
226-
break the kubelet behavior and remove containers that should exist.
226+
break the kubelet behavior and remove containers that should exist.
227227
-->
228228
## 未使用容器和镜像的垃圾收集 {#containers-images}
229229

@@ -248,7 +248,7 @@ resource type.
248248
### Container image lifecycle
249249
250250
Kubernetes manages the lifecycle of all images through its *image manager*,
251-
which is part of the kubelet, with the cooperation of
251+
which is part of the kubelet, with the cooperation of
252252
{{< glossary_tooltip text="cadvisor" term_id="cadvisor" >}}. The kubelet
253253
considers the following disk usage limits when making garbage collection
254254
decisions:
@@ -277,7 +277,7 @@ kubelet 会持续删除镜像,直到磁盘用量到达 `LowThresholdPercent`
277277
### Container garbage collection {#container-image-garbage-collection}
278278
279279
The kubelet garbage collects unused containers based on the following variables,
280-
which you can define:
280+
which you can define:
281281
-->
282282
### 容器垃圾收集 {#container-image-garbage-collection}
283283

@@ -300,7 +300,7 @@ kubelet 会基于如下变量对所有未使用的容器执行垃圾收集操作
300300

301301
<!--
302302
In addition to these variables, the kubelet garbage collects unidentified and
303-
deleted containers, typically starting with the oldest first.
303+
deleted containers, typically starting with the oldest first.
304304
305305
`MaxPerPodContainer` and `MaxContainers` may potentially conflict with each other
306306
in situations where retaining the maximum number of containers per Pod
@@ -333,8 +333,8 @@ You can tune garbage collection of resources by configuring options specific to
333333
the controllers managing those resources. The following pages show you how to
334334
configure garbage collection:
335335
336-
* [Configuring cascading deletion of Kubernetes objects](/docs/tasks/administer-cluster/use-cascading-deletion/)
337-
* [Configuring cleanup of finished Jobs](/docs/concepts/workloads/controllers/ttlafterfinished/)
336+
* [Configuring cascading deletion of Kubernetes objects](/docs/tasks/administer-cluster/use-cascading-deletion/)
337+
* [Configuring cleanup of finished Jobs](/docs/concepts/workloads/controllers/ttlafterfinished/)
338338
-->
339339
## 配置垃圾收集 {#configuring-gc}
340340

0 commit comments

Comments
 (0)