@@ -9,17 +9,17 @@ weight: 20
9
9
<!-- overview -->
10
10
11
11
This page explains how to upgrade a Kubernetes cluster created with kubeadm from version
12
- {{< skew latestVersionAddMinor -1 >}}.x to version {{< skew latestVersion >}}.x, and from version
13
- {{< skew latestVersion >}}.x to {{< skew latestVersion >}}.y (where ` y > x ` ). Skipping MINOR versions
12
+ {{< skew currentVersionAddMinor -1 >}}.x to version {{< skew currentVersion >}}.x, and from version
13
+ {{< skew currentVersion >}}.x to {{< skew currentVersion >}}.y (where ` y > x ` ). Skipping MINOR versions
14
14
when upgrading is unsupported.
15
15
16
16
To see information about upgrading clusters created using older versions of kubeadm,
17
17
please refer to following pages instead:
18
18
19
- - [ Upgrading a kubeadm cluster from {{< skew latestVersionAddMinor -2 >}} to {{< skew latestVersionAddMinor -1 >}}] (https://v{{ < skew latestVersionAddMinor -1 "-" >}}.docs.kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade/)
20
- - [ Upgrading a kubeadm cluster from {{< skew latestVersionAddMinor -3 >}} to {{< skew latestVersionAddMinor -2 >}}] (https://v{{ < skew latestVersionAddMinor -2 "-" >}}.docs.kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade/)
21
- - [ Upgrading a kubeadm cluster from {{< skew latestVersionAddMinor -4 >}} to {{< skew latestVersionAddMinor -3 >}}] (https://v{{ < skew latestVersionAddMinor -3 "-" >}}.docs.kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade/)
22
- - [ Upgrading a kubeadm cluster from {{< skew latestVersionAddMinor -5 >}} to {{< skew latestVersionAddMinor -4 >}}] (https://v{{ < skew latestVersionAddMinor -4 "-" >}}.docs.kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade/)
19
+ - [ Upgrading a kubeadm cluster from {{< skew currentVersionAddMinor -2 >}} to {{< skew currentVersionAddMinor -1 >}}] (https://v{{ < skew currentVersionAddMinor -1 "-" >}}.docs.kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade/)
20
+ - [ Upgrading a kubeadm cluster from {{< skew currentVersionAddMinor -3 >}} to {{< skew currentVersionAddMinor -2 >}}] (https://v{{ < skew currentVersionAddMinor -2 "-" >}}.docs.kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade/)
21
+ - [ Upgrading a kubeadm cluster from {{< skew currentVersionAddMinor -4 >}} to {{< skew currentVersionAddMinor -3 >}}] (https://v{{ < skew currentVersionAddMinor -3 "-" >}}.docs.kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade/)
22
+ - [ Upgrading a kubeadm cluster from {{< skew currentVersionAddMinor -5 >}} to {{< skew currentVersionAddMinor -4 >}}] (https://v{{ < skew currentVersionAddMinor -4 "-" >}}.docs.kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade/)
23
23
24
24
The upgrade workflow at high level is the following:
25
25
@@ -45,19 +45,19 @@ The upgrade workflow at high level is the following:
45
45
46
46
## Determine which version to upgrade to
47
47
48
- Find the latest stable {{< skew latestVersion >}} version using the OS package manager:
48
+ Find the latest stable {{< skew currentVersion >}} version using the OS package manager:
49
49
50
50
{{< tabs name="k8s_install_versions" >}}
51
51
{{% tab name="Ubuntu, Debian or HypriotOS" %}}
52
52
apt update
53
53
apt-cache madison kubeadm
54
- # find the latest {{< skew latestVersion >}} version in the list
55
- # it should look like {{< skew latestVersion >}}.x-00, where x is the latest patch
54
+ # find the latest {{< skew currentVersion >}} version in the list
55
+ # it should look like {{< skew currentVersion >}}.x-00, where x is the latest patch
56
56
{{% /tab %}}
57
57
{{% tab name="CentOS, RHEL or Fedora" %}}
58
58
yum list --showduplicates kubeadm --disableexcludes=kubernetes
59
- # find the latest {{< skew latestVersion >}} version in the list
60
- # it should look like {{< skew latestVersion >}}.x-0, where x is the latest patch
59
+ # find the latest {{< skew currentVersion >}} version in the list
60
+ # it should look like {{< skew currentVersion >}}.x-0, where x is the latest patch
61
61
{{% /tab %}}
62
62
{{< /tabs >}}
63
63
@@ -74,18 +74,18 @@ Pick a control plane node that you wish to upgrade first. It must have the `/etc
74
74
75
75
{{< tabs name="k8s_install_kubeadm_first_cp" >}}
76
76
{{% tab name="Ubuntu, Debian or HypriotOS" %}}
77
- # replace x in {{< skew latestVersion >}}.x-00 with the latest patch version
77
+ # replace x in {{< skew currentVersion >}}.x-00 with the latest patch version
78
78
apt-mark unhold kubeadm && \
79
- apt-get update && apt-get install -y kubeadm={{< skew latestVersion >}}.x-00 && \
79
+ apt-get update && apt-get install -y kubeadm={{< skew currentVersion >}}.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
- apt-get install -y --allow-change-held-packages kubeadm={{< skew latestVersion >}}.x-00
84
+ apt-get install -y --allow-change-held-packages kubeadm={{< skew currentVersion >}}.x-00
85
85
{{% /tab %}}
86
86
{{% tab name="CentOS, RHEL or Fedora" %}}
87
- # replace x in {{< skew latestVersion >}}.x-0 with the latest patch version
88
- yum install -y kubeadm-{{< skew latestVersion >}}.x-0 --disableexcludes=kubernetes
87
+ # replace x in {{< skew currentVersion >}}.x-0 with the latest patch version
88
+ yum install -y kubeadm-{{< skew currentVersion >}}.x-0 --disableexcludes=kubernetes
89
89
{{% /tab %}}
90
90
{{< /tabs >}}
91
91
@@ -120,13 +120,13 @@ Failing to do so will cause `kubeadm upgrade apply` to exit with an error and no
120
120
121
121
` ` ` shell
122
122
# replace x with the patch version you picked for this upgrade
123
- sudo kubeadm upgrade apply v{{< skew latestVersion > }}.x
123
+ sudo kubeadm upgrade apply v{{< skew currentVersion > }}.x
124
124
` ` `
125
125
126
126
Once the command finishes you should see:
127
127
128
128
```
129
- [upgrade/successful] SUCCESS! Your cluster was upgraded to " v{{< skew latestVersion >}}.x" . Enjoy!
129
+ [upgrade/successful] SUCCESS! Your cluster was upgraded to " v{{< skew currentVersion >}}.x" . Enjoy!
130
130
131
131
[upgrade/kubelet] Now that your control plane is upgraded, please proceed with upgrading your kubelets if you haven' t already done so.
132
132
```
@@ -170,18 +170,18 @@ Also calling `kubeadm upgrade plan` and upgrading the CNI provider plugin is no
170
170
171
171
{{< tabs name="k8s_install_kubelet" >}}
172
172
{{% tab name="Ubuntu, Debian or HypriotOS" %}}
173
- # replace x in {{< skew latestVersion >}}.x-00 with the latest patch version
173
+ # replace x in {{< skew currentVersion >}}.x-00 with the latest patch version
174
174
apt-mark unhold kubelet kubectl && \
175
- apt-get update && apt-get install -y kubelet={{< skew latestVersion >}}.x-00 kubectl={{< skew latestVersion >}}.x-00 && \
175
+ apt-get update && apt-get install -y kubelet={{< skew currentVersion >}}.x-00 kubectl={{< skew currentVersion >}}.x-00 && \
176
176
apt-mark hold kubelet kubectl
177
177
-
178
178
# since apt-get version 1.1 you can also use the following method
179
179
apt-get update && \
180
- apt-get install -y --allow-change-held-packages kubelet={{< skew latestVersion >}}.x-00 kubectl={{< skew latestVersion >}}.x-00
180
+ apt-get install -y --allow-change-held-packages kubelet={{< skew currentVersion >}}.x-00 kubectl={{< skew currentVersion >}}.x-00
181
181
{{% /tab %}}
182
182
{{% tab name="CentOS, RHEL or Fedora" %}}
183
- # replace x in {{< skew latestVersion >}}.x-0 with the latest patch version
184
- yum install -y kubelet-{{< skew latestVersion >}}.x-0 kubectl-{{< skew latestVersion >}}.x-0 --disableexcludes=kubernetes
183
+ # replace x in {{< skew currentVersion >}}.x-0 with the latest patch version
184
+ yum install -y kubelet-{{< skew currentVersion >}}.x-0 kubectl-{{< skew currentVersion >}}.x-0 --disableexcludes=kubernetes
185
185
{{% /tab %}}
186
186
{{< /tabs >}}
187
187
@@ -212,18 +212,18 @@ without compromising the minimum required capacity for running your workloads.
212
212
213
213
{{< tabs name="k8s_install_kubeadm_worker_nodes" >}}
214
214
{{% tab name="Ubuntu, Debian or HypriotOS" %}}
215
- # replace x in {{< skew latestVersion >}}.x-00 with the latest patch version
215
+ # replace x in {{< skew currentVersion >}}.x-00 with the latest patch version
216
216
apt-mark unhold kubeadm && \
217
- apt-get update && apt-get install -y kubeadm={{< skew latestVersion >}}.x-00 && \
217
+ apt-get update && apt-get install -y kubeadm={{< skew currentVersion >}}.x-00 && \
218
218
apt-mark hold kubeadm
219
219
-
220
220
# since apt-get version 1.1 you can also use the following method
221
221
apt-get update && \
222
- apt-get install -y --allow-change-held-packages kubeadm={{< skew latestVersion >}}.x-00
222
+ apt-get install -y --allow-change-held-packages kubeadm={{< skew currentVersion >}}.x-00
223
223
{{% /tab %}}
224
224
{{% tab name="CentOS, RHEL or Fedora" %}}
225
- # replace x in {{< skew latestVersion >}}.x-0 with the latest patch version
226
- yum install -y kubeadm-{{< skew latestVersion >}}.x-0 --disableexcludes=kubernetes
225
+ # replace x in {{< skew currentVersion >}}.x-0 with the latest patch version
226
+ yum install -y kubeadm-{{< skew currentVersion >}}.x-0 --disableexcludes=kubernetes
227
227
{{% /tab %}}
228
228
{{< /tabs >}}
229
229
@@ -250,18 +250,18 @@ without compromising the minimum required capacity for running your workloads.
250
250
251
251
{{< tabs name="k8s_kubelet_and_kubectl" >}}
252
252
{{% tab name="Ubuntu, Debian or HypriotOS" %}}
253
- # replace x in {{< skew latestVersion >}}.x-00 with the latest patch version
253
+ # replace x in {{< skew currentVersion >}}.x-00 with the latest patch version
254
254
apt-mark unhold kubelet kubectl && \
255
- apt-get update && apt-get install -y kubelet={{< skew latestVersion >}}.x-00 kubectl={{< skew latestVersion >}}.x-00 && \
255
+ apt-get update && apt-get install -y kubelet={{< skew currentVersion >}}.x-00 kubectl={{< skew currentVersion >}}.x-00 && \
256
256
apt-mark hold kubelet kubectl
257
257
-
258
258
# since apt-get version 1.1 you can also use the following method
259
259
apt-get update && \
260
- apt-get install -y --allow-change-held-packages kubelet={{< skew latestVersion >}}.x-00 kubectl={{< skew latestVersion >}}.x-00
260
+ apt-get install -y --allow-change-held-packages kubelet={{< skew currentVersion >}}.x-00 kubectl={{< skew currentVersion >}}.x-00
261
261
{{% /tab %}}
262
262
{{% tab name="CentOS, RHEL or Fedora" %}}
263
- # replace x in {{< skew latestVersion >}}.x-0 with the latest patch version
264
- yum install -y kubelet-{{< skew latestVersion >}}.x-0 kubectl-{{< skew latestVersion >}}.x-0 --disableexcludes=kubernetes
263
+ # replace x in {{< skew currentVersion >}}.x-0 with the latest patch version
264
+ yum install -y kubelet-{{< skew currentVersion >}}.x-0 kubectl-{{< skew currentVersion >}}.x-0 --disableexcludes=kubernetes
265
265
{{% /tab %}}
266
266
{{< /tabs >}}
267
267
0 commit comments