1
1
---
2
2
title : 重新配置 kubeadm 集群
3
3
content_type : task
4
- weight : 10
4
+ weight : 30
5
5
---
6
6
<!--
7
7
reviewers:
8
8
- sig-cluster-lifecycle
9
9
title: Reconfiguring a kubeadm cluster
10
10
content_type: task
11
- weight: 10
11
+ weight: 30
12
12
-->
13
13
14
14
<!-- overview -->
@@ -107,7 +107,6 @@ in a ConfigMap called `kubeadm-config` in the `kube-system` namespace.
107
107
108
108
To change a particular option in the `ClusterConfiguration` you can edit the ConfigMap with this command:
109
109
110
- The configuration is located under the `data.ClusterConfiguration` key.
111
110
-->
112
111
### 应用集群配置更改
113
112
@@ -123,6 +122,9 @@ The configuration is located under the `data.ClusterConfiguration` key.
123
122
kubectl edit cm -n kube-system kubeadm-config
124
123
```
125
124
125
+ <!--
126
+ The configuration is located under the `data.ClusterConfiguration` key.
127
+ -->
126
128
配置位于 ` data.ClusterConfiguration ` 键下。
127
129
128
130
{{< note >}}
@@ -170,7 +172,6 @@ Before proceeding with these changes, make sure you have backed up the directory
170
172
<!--
171
173
To write new certificates you can use:
172
174
173
- To write new manifest files in `/etc/kubernetes/manifests` you can use:
174
175
-->
175
176
176
177
要编写新证书,你可以使用:
@@ -179,6 +180,9 @@ To write new manifest files in `/etc/kubernetes/manifests` you can use:
179
180
kubeadm init phase certs < component-name> --config < config-file>
180
181
```
181
182
183
+ <!--
184
+ To write new manifest files in `/etc/kubernetes/manifests` you can use:
185
+ -->
182
186
要在 ` /etc/kubernetes/manifests ` 中编写新的清单文件,你可以使用:
183
187
184
188
``` shell
@@ -212,7 +216,6 @@ in a ConfigMap called `kubelet-config` in the `kube-system` namespace.
212
216
213
217
You can edit the ConfigMap with this command:
214
218
215
- The configuration is located under the `data.kubelet` key.
216
219
-->
217
220
### 应用 kubelet 配置更改
218
221
@@ -227,6 +230,9 @@ The configuration is located under the `data.kubelet` key.
227
230
kubectl edit cm -n kube-system kubelet-config
228
231
```
229
232
233
+ <!--
234
+ The configuration is located under the `data.kubelet` key.
235
+ -->
230
236
配置位于 ` data.kubelet ` 键下。
231
237
232
238
<!--
@@ -284,7 +290,6 @@ This ConfigMap is used by the `kube-proxy` DaemonSet in the `kube-system` namesp
284
290
285
291
To change a particular option in the `KubeProxyConfiguration`, you can edit the ConfigMap with this command:
286
292
287
- The configuration is located under the `data.config.conf` key.
288
293
-->
289
294
### 应用 kube-proxy 配置更改
290
295
@@ -302,6 +307,9 @@ The configuration is located under the `data.config.conf` key.
302
307
kubectl edit cm -n kube-system kube-proxy
303
308
```
304
309
310
+ <!--
311
+ The configuration is located under the `data.config.conf` key.
312
+ -->
305
313
配置位于 ` data.config.conf ` 键下。
306
314
307
315
<!--
@@ -311,9 +319,6 @@ Once the `kube-proxy` ConfigMap is updated, you can restart all kube-proxy Pods:
311
319
312
320
Obtain the Pod names:
313
321
314
- Delete a Pod with:
315
-
316
- New Pods that use the updated ConfigMap will be created.
317
322
-->
318
323
#### 反映 kube-proxy 的更改
319
324
@@ -325,12 +330,18 @@ New Pods that use the updated ConfigMap will be created.
325
330
kubectl get po -n kube-system | grep kube-proxy
326
331
```
327
332
333
+ <!--
334
+ Delete a Pod with:
335
+ -->
328
336
使用以下命令删除 Pod:
329
337
330
338
``` shell
331
339
kubectl delete po -n kube-system < pod-name>
332
340
```
333
341
342
+ <!--
343
+ New Pods that use the updated ConfigMap will be created.
344
+ -->
334
345
将创建使用更新的 ConfigMap 的新 Pod。
335
346
336
347
{{< note >}}
@@ -373,7 +384,6 @@ Once the CoreDNS changes are applied you can delete the CoreDNS Pods:
373
384
374
385
Obtain the Pod names:
375
386
376
- Delete a Pod with:
377
387
-->
378
388
#### 反映 CoreDNS 的更改
379
389
@@ -385,6 +395,9 @@ Delete a Pod with:
385
395
kubectl get po -n kube-system | grep coredns
386
396
```
387
397
398
+ <!--
399
+ Delete a Pod with:
400
+ -->
388
401
使用以下命令删除 Pod:
389
402
390
403
``` shell
@@ -400,6 +413,7 @@ New Pods with the updated CoreDNS configuration will be created.
400
413
<!--
401
414
kubeadm does not allow CoreDNS configuration during cluster creation and upgrade.
402
415
This means that if you execute `kubeadm upgrade apply`, your changes to the CoreDNS
416
+ objects will be lost and must be reapplied.
403
417
-->
404
418
kubeadm 不允许在集群创建和升级期间配置 CoreDNS。
405
419
这意味着如果执行了 ` kubeadm upgrade apply ` ,你对
0 commit comments