@@ -50,59 +50,59 @@ The upgrade workflow at high level is the following:
50
50
51
51
## Determine which version to upgrade to
52
52
53
- 1 . Find the latest stable 1.18 version:
53
+ Find the latest stable 1.18 version:
54
54
55
- {{< tabs name="k8s_install_versions" >}}
56
- {{% tab name="Ubuntu, Debian or HypriotOS" %}}
55
+ {{< tabs name="k8s_install_versions" >}}
56
+ {{% tab name="Ubuntu, Debian or HypriotOS" %}}
57
57
apt update
58
58
apt-cache madison kubeadm
59
59
# find the latest 1.18 version in the list
60
60
# it should look like 1.18.x-00, where x is the latest patch
61
- {{% /tab %}}
62
- {{% tab name="CentOS, RHEL or Fedora" %}}
61
+ {{% /tab %}}
62
+ {{% tab name="CentOS, RHEL or Fedora" %}}
63
63
yum list --showduplicates kubeadm --disableexcludes=kubernetes
64
64
# find the latest 1.18 version in the list
65
65
# it should look like 1.18.x-0, where x is the latest patch
66
- {{% /tab %}}
67
- {{< /tabs >}}
66
+ {{% /tab %}}
67
+ {{< /tabs >}}
68
68
69
69
## Upgrading control plane nodes
70
70
71
71
### Upgrade the first control plane node
72
72
73
- 1 . On your first control plane node, upgrade kubeadm:
73
+ - On your first control plane node, upgrade kubeadm:
74
74
75
- {{< tabs name="k8s_install_kubeadm_first_cp" >}}
76
- {{% tab name="Ubuntu, Debian or HypriotOS" %}}
75
+ {{< tabs name="k8s_install_kubeadm_first_cp" >}}
76
+ {{% tab name="Ubuntu, Debian or HypriotOS" %}}
77
77
# replace x in 1.18.x-00 with the latest patch version
78
78
apt-mark unhold kubeadm && \
79
79
apt-get update && apt-get install -y kubeadm=1.18.x-00 && \
80
80
apt-mark hold kubeadm
81
-
81
+ -
82
82
# since apt-get version 1.1 you can also use the following method
83
83
apt-get update && \
84
84
apt-get install -y --allow-change-held-packages kubeadm=1.18.x-00
85
- {{% /tab %}}
86
- {{% tab name="CentOS, RHEL or Fedora" %}}
85
+ {{% /tab %}}
86
+ {{% tab name="CentOS, RHEL or Fedora" %}}
87
87
# replace x in 1.18.x-0 with the latest patch version
88
88
yum install -y kubeadm-1.18.x-0 --disableexcludes=kubernetes
89
- {{% /tab %}}
90
- {{< /tabs >}}
89
+ {{% /tab %}}
90
+ {{< /tabs >}}
91
91
92
- 1 . Verify that the download works and has the expected version:
92
+ - Verify that the download works and has the expected version:
93
93
94
94
``` shell
95
95
kubeadm version
96
96
```
97
97
98
- 1. Drain the control plane node:
98
+ - Drain the control plane node:
99
99
100
100
` ` ` shell
101
101
# replace <cp-node-name> with the name of your control plane node
102
102
kubectl drain < cp-node-name> --ignore-daemonsets
103
103
` ` `
104
104
105
- 1. On the control plane node, run:
105
+ - On the control plane node, run:
106
106
107
107
` ` ` shell
108
108
sudo kubeadm upgrade plan
@@ -145,13 +145,13 @@ The upgrade workflow at high level is the following:
145
145
146
146
This command checks that your cluster can be upgraded, and fetches the versions you can upgrade to.
147
147
148
- {{< note > }}
149
- ` kubeadm upgrade` also automatically renews the certificates that it manages on this node.
150
- To opt-out of certificate renewal the flag ` --certificate-renewal=false` can be used.
151
- For more information see the [certificate management guide](/docs/tasks/administer-cluster/kubeadm/kubeadm -certs).
152
- {{< / note > }}
148
+ {{< note > }}
149
+ ` kubeadm upgrade` also automatically renews the certificates that it manages on this node.
150
+ To opt-out of certificate renewal the flag ` --certificate-renewal=false` can be used.
151
+ For more information see the [certificate management guide](/docs/tasks/administer-cluster/kubeadmkubeadm -certs).
152
+ {{< / note > }}
153
153
154
- 1. Choose a version to upgrade to, and run the appropriate command. For example:
154
+ - Choose a version to upgrade to, and run the appropriate command. For example:
155
155
156
156
` ` ` shell
157
157
# replace x with the patch version you picked for this upgrade
@@ -240,15 +240,15 @@ The upgrade workflow at high level is the following:
240
240
[upgrade/kubelet] Now that your control plane is upgraded, please proceed with upgrading your kubelets if you haven' t already done so.
241
241
```
242
242
243
- 1. Manually upgrade your CNI provider plugin.
243
+ - Manually upgrade your CNI provider plugin.
244
244
245
245
Your Container Network Interface (CNI) provider may have its own upgrade instructions to follow.
246
246
Check the [addons](/docs/concepts/cluster-administration/addons/) page to
247
247
find your CNI provider and see whether additional upgrade steps are required.
248
248
249
249
This step is not required on additional control plane nodes if the CNI provider runs as a DaemonSet.
250
250
251
- 1. Uncordon the control plane node:
251
+ - Uncordon the control plane node:
252
252
253
253
` ` ` shell
254
254
# replace <cp-node-name> with the name of your control plane node
@@ -257,46 +257,46 @@ The upgrade workflow at high level is the following:
257
257
258
258
# ## Upgrade additional control plane nodes
259
259
260
- 1. Same as the first control plane node but use:
260
+ Same as the first control plane node but use:
261
261
262
- ` ` `
263
- sudo kubeadm upgrade node
264
- ` ` `
262
+ ` ` `
263
+ sudo kubeadm upgrade node
264
+ ` ` `
265
265
266
- instead of:
266
+ instead of:
267
267
268
- ` ` `
269
- sudo kubeadm upgrade apply
270
- ` ` `
268
+ ` ` `
269
+ sudo kubeadm upgrade apply
270
+ ` ` `
271
271
272
- Also ` sudo kubeadm upgrade plan` is not needed.
272
+ Also ` sudo kubeadm upgrade plan` is not needed.
273
273
274
274
# ## Upgrade kubelet and kubectl
275
275
276
- 1. Upgrade the kubelet and kubectl on all control plane nodes:
276
+ Upgrade the kubelet and kubectl on all control plane nodes:
277
277
278
- {{< tabs name=" k8s_install_kubelet" > }}
279
- {{% tab name=" Ubuntu, Debian or HypriotOS" %}}
278
+ {{< tabs name=" k8s_install_kubelet" > }}
279
+ {{% tab name=" Ubuntu, Debian or HypriotOS" %}}
280
280
# replace x in 1.18.x-00 with the latest patch version
281
281
apt-mark unhold kubelet kubectl && \
282
282
apt-get update && apt-get install -y kubelet=1.18.x-00 kubectl=1.18.x-00 && \
283
283
apt-mark hold kubelet kubectl
284
-
284
+ -
285
285
# since apt-get version 1.1 you can also use the following method
286
286
apt-get update && \
287
287
apt-get install -y --allow-change-held-packages kubelet=1.18.x-00 kubectl=1.18.x-00
288
- {{% /tab %}}
289
- {{% tab name=" CentOS, RHEL or Fedora" %}}
288
+ {{% /tab %}}
289
+ {{% tab name=" CentOS, RHEL or Fedora" %}}
290
290
# replace x in 1.18.x-0 with the latest patch version
291
291
yum install -y kubelet-1.18.x-0 kubectl-1.18.x-0 --disableexcludes=kubernetes
292
- {{% /tab %}}
293
- {{< /tabs > }}
292
+ {{% /tab %}}
293
+ {{< /tabs > }}
294
294
295
- 1. Restart the kubelet
295
+ Restart the kubelet
296
296
297
- ` ` ` shell
298
- sudo systemctl restart kubelet
299
- ` ` `
297
+ ` ` ` shell
298
+ sudo systemctl restart kubelet
299
+ ` ` `
300
300
301
301
# # Upgrade worker nodes
302
302
@@ -305,28 +305,28 @@ without compromising the minimum required capacity for running your workloads.
305
305
306
306
# ## Upgrade kubeadm
307
307
308
- 1. Upgrade kubeadm on all worker nodes:
308
+ - Upgrade kubeadm on all worker nodes:
309
309
310
- {{< tabs name=" k8s_install_kubeadm_worker_nodes" > }}
311
- {{% tab name=" Ubuntu, Debian or HypriotOS" %}}
310
+ {{< tabs name=" k8s_install_kubeadm_worker_nodes" > }}
311
+ {{% tab name=" Ubuntu, Debian or HypriotOS" %}}
312
312
# replace x in 1.18.x-00 with the latest patch version
313
313
apt-mark unhold kubeadm && \
314
314
apt-get update && apt-get install -y kubeadm=1.18.x-00 && \
315
315
apt-mark hold kubeadm
316
-
316
+ -
317
317
# since apt-get version 1.1 you can also use the following method
318
318
apt-get update && \
319
319
apt-get install -y --allow-change-held-packages kubeadm=1.18.x-00
320
- {{% /tab %}}
321
- {{% tab name=" CentOS, RHEL or Fedora" %}}
320
+ {{% /tab %}}
321
+ {{% tab name=" CentOS, RHEL or Fedora" %}}
322
322
# replace x in 1.18.x-0 with the latest patch version
323
323
yum install -y kubeadm-1.18.x-0 --disableexcludes=kubernetes
324
- {{% /tab %}}
325
- {{< /tabs > }}
324
+ {{% /tab %}}
325
+ {{< /tabs > }}
326
326
327
327
# ## Drain the node
328
328
329
- 1. Prepare the node for maintenance by marking it unschedulable and evicting the workloads:
329
+ - Prepare the node for maintenance by marking it unschedulable and evicting the workloads:
330
330
331
331
` ` ` shell
332
332
# replace <node-to-drain> with the name of your node you are draining
@@ -343,42 +343,42 @@ without compromising the minimum required capacity for running your workloads.
343
343
344
344
# ## Upgrade the kubelet configuration
345
345
346
- 1. Call the following command:
346
+ - Call the following command:
347
347
348
348
` ` ` shell
349
349
sudo kubeadm upgrade node
350
350
` ` `
351
351
352
352
# ## Upgrade kubelet and kubectl
353
353
354
- 1. Upgrade the kubelet and kubectl on all worker nodes:
354
+ - Upgrade the kubelet and kubectl on all worker nodes:
355
355
356
- {{< tabs name=" k8s_kubelet_and_kubectl" > }}
357
- {{% tab name=" Ubuntu, Debian or HypriotOS" %}}
356
+ {{< tabs name=" k8s_kubelet_and_kubectl" > }}
357
+ {{% tab name=" Ubuntu, Debian or HypriotOS" %}}
358
358
# replace x in 1.18.x-00 with the latest patch version
359
359
apt-mark unhold kubelet kubectl && \
360
360
apt-get update && apt-get install -y kubelet=1.18.x-00 kubectl=1.18.x-00 && \
361
361
apt-mark hold kubelet kubectl
362
-
362
+ -
363
363
# since apt-get version 1.1 you can also use the following method
364
364
apt-get update && \
365
365
apt-get install -y --allow-change-held-packages kubelet=1.18.x-00 kubectl=1.18.x-00
366
- {{% /tab %}}
367
- {{% tab name=" CentOS, RHEL or Fedora" %}}
366
+ {{% /tab %}}
367
+ {{% tab name=" CentOS, RHEL or Fedora" %}}
368
368
# replace x in 1.18.x-0 with the latest patch version
369
369
yum install -y kubelet-1.18.x-0 kubectl-1.18.x-0 --disableexcludes=kubernetes
370
- {{% /tab %}}
371
- {{< /tabs > }}
370
+ {{% /tab %}}
371
+ {{< /tabs > }}
372
372
373
- 1. Restart the kubelet
373
+ - Restart the kubelet
374
374
375
375
` ` ` shell
376
376
sudo systemctl restart kubelet
377
377
` ` `
378
378
379
379
# ## Uncordon the node
380
380
381
- 1. Bring the node back online by marking it schedulable:
381
+ - Bring the node back online by marking it schedulable:
382
382
383
383
` ` ` shell
384
384
# replace <node-to-drain> with the name of your node
@@ -441,4 +441,4 @@ and post-upgrade manifest file for a certain component, a backup file for it wil
441
441
`kubeadm upgrade node` does the following on worker nodes:
442
442
443
443
- Fetches the kubeadm `ClusterConfiguration` from the cluster.
444
- - Upgrades the kubelet configuration for this node.
444
+ - Upgrades the kubelet configuration for this node.
0 commit comments