@@ -136,9 +136,9 @@ A Pod Template in a DaemonSet must have a [`RestartPolicy`](/docs/concepts/workl
136
136
The `.spec.selector` field is a pod selector. It works the same as the `.spec.selector` of
137
137
a [Job](/docs/concepts/jobs/run-to-completion-finite-workloads/).
138
138
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,
142
142
its `.spec.selector` can not be mutated. Mutating the pod selector can lead to the
143
143
unintentional orphaning of Pods, and it was found to be confusing to users.
144
144
-->
@@ -147,9 +147,7 @@ unintentional orphaning of Pods, and it was found to be confusing to users.
147
147
` .spec.selector ` 字段表示 Pod 选择算符,它与
148
148
[ Job] ( /zh/docs/concepts/workloads/controllers/job/ ) 的 ` .spec.selector ` 的作用是相同的。
149
149
150
- 从 Kubernetes 1.8 开始,您必须指定与 ` .spec.template ` 的标签匹配的 Pod 选择算符。
151
- 用户不指定 Pod 选择算符时,该字段不再有默认值。
152
- 选择算符的默认值生成结果与 ` kubectl apply ` 不兼容。
150
+ 你必须指定与 ` .spec.template ` 的标签匹配的 Pod 选择算符。
153
151
此外,一旦创建了 DaemonSet,它的 ` .spec.selector ` 就不能修改。
154
152
修改 Pod 选择算符可能导致 Pod 意外悬浮,并且这对用户来说是费解的。
155
153
@@ -175,11 +173,11 @@ When the two are specified the result is ANDed.
175
173
当上述两个字段都指定时,结果会按逻辑与(AND)操作处理。
176
174
177
175
<!--
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.
180
178
-->
181
- 如果指定了 ` .spec.selector ` , 必须与 ` .spec.template.metadata.labels ` 相匹配。
182
- 如果与后者不匹配,则 DeamonSet 会被 API 拒绝。
179
+ ` .spec.selector ` 必须与 ` .spec.template.metadata.labels ` 相匹配。
180
+ 如果配置中这两个字段不匹配,则会被 API 拒绝。
183
181
184
182
<!--
185
183
### Running Pods on Only Some Nodes
0 commit comments