Skip to content

Commit c43e1dd

Browse files
kinzhitengqm
andauthored
[zh]Update content/zh/docs/concepts/workloads/controllers/daemonset.md (#33120)
* [zh]Update content/zh/docs/concepts/workloads/controllers/daemonset.md * Update content/zh/docs/concepts/workloads/controllers/daemonset.md Co-authored-by: Qiming Teng <[email protected]> * Update content/zh/docs/concepts/workloads/controllers/daemonset.md Co-authored-by: Qiming Teng <[email protected]> Co-authored-by: Qiming Teng <[email protected]>
1 parent b96c88a commit c43e1dd

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

content/zh/docs/concepts/workloads/controllers/daemonset.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,9 @@ A Pod Template in a DaemonSet must have a [`RestartPolicy`](/docs/concepts/workl
136136
The `.spec.selector` field is a pod selector. It works the same as the `.spec.selector` of
137137
a [Job](/docs/concepts/jobs/run-to-completion-finite-workloads/).
138138
139-
As of Kubernetes 1.8, you must specify a pod selector that matches the labels of the
140-
`.spec.template`. The pod selector will no longer be defaulted when left empty. Selector
141-
defaulting was not compatible with `kubectl apply`. Also, once a DaemonSet is created,
139+
You must specify a pod selector that matches the labels of the
140+
`.spec.template`.
141+
Also, once a DaemonSet is created,
142142
its `.spec.selector` can not be mutated. Mutating the pod selector can lead to the
143143
unintentional orphaning of Pods, and it was found to be confusing to users.
144144
-->
@@ -147,9 +147,7 @@ unintentional orphaning of Pods, and it was found to be confusing to users.
147147
`.spec.selector` 字段表示 Pod 选择算符,它与
148148
[Job](/zh/docs/concepts/workloads/controllers/job/)`.spec.selector` 的作用是相同的。
149149

150-
从 Kubernetes 1.8 开始,您必须指定与 `.spec.template` 的标签匹配的 Pod 选择算符。
151-
用户不指定 Pod 选择算符时,该字段不再有默认值。
152-
选择算符的默认值生成结果与 `kubectl apply` 不兼容。
150+
你必须指定与 `.spec.template` 的标签匹配的 Pod 选择算符。
153151
此外,一旦创建了 DaemonSet,它的 `.spec.selector` 就不能修改。
154152
修改 Pod 选择算符可能导致 Pod 意外悬浮,并且这对用户来说是费解的。
155153

@@ -175,11 +173,11 @@ When the two are specified the result is ANDed.
175173
当上述两个字段都指定时,结果会按逻辑与(AND)操作处理。
176174

177175
<!--
178-
If the `.spec.selector` is specified, it must match the `.spec.template.metadata.labels`.
179-
Config with these not matching will be rejected by the API.
176+
The `.spec.selector` must match the `.spec.template.metadata.labels`.
177+
Config with these two not matching will be rejected by the API.
180178
-->
181-
如果指定了 `.spec.selector`必须与 `.spec.template.metadata.labels` 相匹配。
182-
如果与后者不匹配,则 DeamonSet 会被 API 拒绝。
179+
`.spec.selector` 必须与 `.spec.template.metadata.labels` 相匹配。
180+
如果配置中这两个字段不匹配,则会被 API 拒绝。
183181

184182
<!--
185183
### Running Pods on Only Some Nodes

0 commit comments

Comments
 (0)