@@ -46,9 +46,9 @@ DaemonSet 有两种更新策略:
46
46
-->
47
47
48
48
* ` OnDelete ` : 使用 ` OnDelete ` 更新策略时,在更新 DaemonSet 模板后,只有当你手动删除老的
49
- DaemonSet pods 之后,新的 DaemonSet Pod * 才会 * 被自动创建。跟 Kubernetes 1.6 以前的版本类似。
49
+ DaemonSet pods 之后,新的 DaemonSet Pod ** 才会 * * 被自动创建。跟 Kubernetes 1.6 以前的版本类似。
50
50
* ` RollingUpdate ` : 这是默认的更新策略。使用 ` RollingUpdate ` 更新策略时,在更新 DaemonSet 模板后,
51
- 老的 DaemonSet pods 将被终止,并且将以受控方式自动创建新的 DaemonSet pods 。
51
+ 老的 DaemonSet Pod 将被终止,并且将以受控方式自动创建新的 DaemonSet Pod 。
52
52
更新期间,最多只能有 DaemonSet 的一个 Pod 运行于每个节点上。
53
53
54
54
<!--
@@ -68,14 +68,13 @@ You may want to set
68
68
[`.spec.minReadySeconds`](/docs/reference/kubernetes-api/workload-resources/daemon-set-v1/#DaemonSetSpec)
69
69
(default to 0) and
70
70
[`.spec.updateStrategy.rollingUpdate.maxSurge`](/docs/reference/kubernetes-api/workload-resources/daemon-set-v1/#DaemonSetSpec)
71
- (a beta feature and defaults to 0) as well.
72
-
71
+ (defaults to 0) as well.
73
72
-->
74
73
你可能想设置
75
74
[ ` .spec.updateStrategy.rollingUpdate.maxUnavailable ` ] ( /zh-cn/docs/reference/kubernetes-api/workload-resources/daemon-set-v1/#DaemonSetSpec ) (默认为 1),
76
75
[ ` .spec.minReadySeconds ` ] ( /zh-cn/docs/reference/kubernetes-api/workload-resources/daemon-set-v1/#DaemonSetSpec ) (默认为 0) 和
77
76
[ ` .spec.updateStrategy.rollingUpdate.maxSurge ` ] ( /zh-cn/docs/reference/kubernetes-api/workload-resources/daemon-set-v1/#DaemonSetSpec )
78
- (一种 Beta 阶段的特性, 默认为 0)。
77
+ (默认为 0)。
79
78
80
79
<!--
81
80
### Creating a DaemonSet with `RollingUpdate` update strategy
@@ -101,8 +100,8 @@ kubectl create -f https://k8s.io/examples/controllers/fluentd-daemonset.yaml
101
100
Alternatively, use `kubectl apply` to create the same DaemonSet if you plan to
102
101
update the DaemonSet with `kubectl apply`.
103
102
-->
104
- 另一种方式是如果你希望使用 ` kubectl apply ` 来更新 DaemonSet 的话,也可以
105
- 使用 ` kubectl apply ` 来创建 DaemonSet:
103
+ 另一种方式是如果你希望使用 ` kubectl apply ` 来更新 DaemonSet 的话,
104
+ 也可以使用 ` kubectl apply ` 来创建 DaemonSet:
106
105
107
106
``` shell
108
107
kubectl apply -f https://k8s.io/examples/controllers/fluentd-daemonset.yaml
@@ -169,9 +168,8 @@ use `kubectl apply`:
169
168
-->
170
169
#### 声明式命令 {#declarative-commands}
171
170
172
- 如果你使用
173
- [ 配置文件] ( /zh-cn/docs/tasks/manage-kubernetes-objects/declarative-config/ )
174
- 来更新 DaemonSet,请使用 ` kubectl apply ` :
171
+ 如果你使用[ 配置文件] ( /zh-cn/docs/tasks/manage-kubernetes-objects/declarative-config/ ) 来更新
172
+ DaemonSet,请使用 ` kubectl apply ` :
175
173
176
174
``` shell
177
175
kubectl apply -f https://k8s.io/examples/controllers/fluentd-daemonset-update.yaml
@@ -186,9 +184,8 @@ use `kubectl edit`:
186
184
-->
187
185
#### 指令式命令 {#imperative-commands}
188
186
189
- 如果你使用
190
- [ 指令式命令] ( /zh-cn/docs/tasks/manage-kubernetes-objects/imperative-command/ )
191
- 来更新 DaemonSets,请使用 ` kubectl edit ` :
187
+ 如果你使用[ 指令式命令] ( /zh-cn/docs/tasks/manage-kubernetes-objects/imperative-command/ ) 来更新
188
+ DaemonSets,请使用 ` kubectl edit ` :
192
189
193
190
``` shell
194
191
kubectl edit ds/fluentd-elasticsearch -n kube-system
@@ -227,7 +224,7 @@ When the rollout is complete, the output is similar to this:
227
224
-->
228
225
当滚动更新完成时,输出结果如下:
229
226
230
- ```
227
+ ``` shell
231
228
daemonset " fluentd-elasticsearch" successfully rolled out
232
229
```
233
230
@@ -248,7 +245,6 @@ causes:
248
245
-->
249
246
有时,DaemonSet 滚动更新可能卡住,以下是一些可能的原因:
250
247
251
-
252
248
#### 一些节点可用资源耗尽 {#some-nodes-run-out-of-resources}
253
249
254
250
<!--
@@ -264,7 +260,7 @@ DaemonSet 滚动更新可能会卡住,其 Pod 至少在某个节点上无法
264
260
这是可能的。
265
261
266
262
发生这种情况时,通过对 ` kubectl get nodes ` 和下面命令行的输出作比较,
267
- 找出没有调度部署 DaemonSet Pods 的节点:
263
+ 找出没有调度 DaemonSet Pod 的节点:
268
264
269
265
``` shell
270
266
kubectl get pods -l name=fluentd-elasticsearch -o wide -n kube-system
0 commit comments