Skip to content

Commit c418f9e

Browse files
authored
Merge pull request #35703 from yanrongshi/zh-cn]update-controller.md
[zh-cn]Update controller.md
2 parents 0229531 + 3309cc3 commit c418f9e

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

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

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ closer to the desired state, by turning equipment on or off.
2020

2121
这是一个控制环的例子:房间里的温度自动调节器。
2222

23-
当你设置了温度,告诉了温度自动调节器你的*期望状态(Desired State)*
24-
房间的实际温度是*当前状态(Current State)*
23+
当你设置了温度,告诉了温度自动调节器你的**期望状态(Desired State)**
24+
房间的实际温度是**当前状态(Current State)**
2525
通过对设备的开关控制,温度自动调节器让其当前状态接近期望状态。
2626

2727
{{< glossary_definition term_id="controller" length="short">}}
@@ -31,7 +31,7 @@ closer to the desired state, by turning equipment on or off.
3131
## Controller pattern
3232
3333
A controller tracks at least one Kubernetes resource type.
34-
These [objects](/docs/concepts/overview/working-with-objects/kubernetes-objects/)
34+
These [objects](/docs/concepts/overview/working-with-objects/kubernetes-objects/#kubernetes-objects)
3535
have a spec field that represents the desired state. The
3636
controller(s) for that resource are responsible for making the current
3737
state come closer to that desired state.
@@ -50,7 +50,7 @@ detail.
5050
## 控制器模式 {#controller-pattern}
5151

5252
一个控制器至少追踪一种类型的 Kubernetes 资源。这些
53-
[对象](/zh-cn/docs/concepts/overview/working-with-objects/kubernetes-objects/)
53+
[对象](/zh-cn/docs/concepts/overview/working-with-objects/kubernetes-objects/#kubernetes-objects)
5454
有一个代表期望状态的 `spec` 字段。
5555
该资源的控制器负责确保其当前状态接近期望状态。
5656

@@ -74,7 +74,7 @@ Job is a Kubernetes resource that runs a
7474
{{< glossary_tooltip term_id="pod" >}}, or perhaps several Pods, to carry out
7575
a task and then stop.
7676
77-
(Once [scheduled](/docs/concepts/scheduling/), Pod objects become part of the
77+
(Once [scheduled](/docs/concepts/scheduling-eviction/), Pod objects become part of the
7878
desired state for a kubelet).
7979
8080
When the Job controller sees a new task it makes sure that, somewhere
@@ -206,7 +206,10 @@ Kubernetes 采用了系统的云原生视图,并且可以处理持续的变化
206206
As a tenet of its design, Kubernetes uses lots of controllers that each manage
207207
a particular aspect of cluster state. Most commonly, a particular control loop
208208
(controller) uses one kind of resource as its desired state, and has a different
209-
kind of resource that it manages to make that desired state happen.
209+
kind of resource that it manages to make that desired state happen. For example,
210+
a controller for Jobs tracks Job objects (to discover new work) and Pod objects
211+
(to run the Jobs, and then to see when the work is finished). In this case
212+
something else creates the Jobs, whereas the Job controller creates Pods.
210213
211214
It's useful to have simple controllers rather than one, monolithic set of control
212215
loops that are interlinked. Controllers can fail, so Kubernetes is designed to
@@ -218,6 +221,8 @@ allow for that.
218221
作为设计原则之一,Kubernetes 使用了很多控制器,每个控制器管理集群状态的一个特定方面。
219222
最常见的一个特定的控制器使用一种类型的资源作为它的期望状态,
220223
控制器管理控制另外一种类型的资源向它的期望状态演化。
224+
例如,Job 的控制器跟踪 Job 对象(以发现新的任务)和 Pod 对象(以运行 Job,然后查看任务何时完成)。
225+
在这种情况下,新任务会创建 Job,而 Job 控制器会创建 Pod。
221226

222227
使用简单的控制器而不是一组相互连接的单体控制回路是很有用的。
223228
控制器会失败,所以 Kubernetes 的设计正是考虑到了这一点。
@@ -249,7 +254,7 @@ the {{< glossary_tooltip term_id="kube-controller-manager" >}}. These
249254
built-in controllers provide important core behaviors.
250255
251256
The Deployment controller and Job controller are examples of controllers that
252-
come as part of Kubernetes itself (built-in controllers).
257+
come as part of Kubernetes itself ("built-in" controllers).
253258
Kubernetes lets you run a resilient control plane, so that if any of the built-in
254259
controllers were to fail, another part of the control plane will take over the work.
255260
@@ -278,7 +283,9 @@ Kubernetes 允许你运行一个稳定的控制平面,这样即使某些内置
278283
* Read about the [Kubernetes control plane](/docs/concepts/overview/components/#control-plane-components)
279284
* Discover some of the basic [Kubernetes objects](/docs/concepts/overview/working-with-objects/kubernetes-objects/)
280285
* Learn more about the [Kubernetes API](/docs/concepts/overview/kubernetes-api/)
281-
* If you want to write your own controller, see [Extension Patterns](/docs/concepts/extend-kubernetes/extend-cluster/#extension-patterns) in Extending Kubernetes.
286+
* If you want to write your own controller, see
287+
[Extension Patterns](/docs/concepts/extend-kubernetes/#extension-patterns)
288+
in Extending Kubernetes.
282289
-->
283290
* 阅读 [Kubernetes 控制平面组件](/zh-cn/docs/concepts/overview/components/#control-plane-components)
284291
* 了解 [Kubernetes 对象](/zh-cn/docs/concepts/overview/working-with-objects/kubernetes-objects/)

0 commit comments

Comments
 (0)