Skip to content

Commit 0d92c72

Browse files
authored
Merge pull request #39741 from Shubham82/linux_worker_node
Add page about upgrading Linux nodes
2 parents c072681 + 102f56b commit 0d92c72

File tree

3 files changed

+106
-75
lines changed

3 files changed

+106
-75
lines changed

content/en/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade.md

Lines changed: 3 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -217,81 +217,10 @@ Also calling `kubeadm upgrade plan` and upgrading the CNI provider plugin is no
217217
The upgrade procedure on worker nodes should be executed one node at a time or few nodes at a time,
218218
without compromising the minimum required capacity for running your workloads.
219219

220-
### Upgrade kubeadm
220+
The following pages show how to Upgrade Linux and Windows worker nodes:
221221

222-
- Upgrade kubeadm:
223-
224-
{{< tabs name="k8s_install_kubeadm_worker_nodes" >}}
225-
{{% tab name="Ubuntu, Debian or HypriotOS" %}}
226-
```shell
227-
# replace x in {{< skew currentVersion >}}.x-00 with the latest patch version
228-
apt-mark unhold kubeadm && \
229-
apt-get update && apt-get install -y kubeadm={{< skew currentVersion >}}.x-00 && \
230-
apt-mark hold kubeadm
231-
```
232-
{{% /tab %}}
233-
{{% tab name="CentOS, RHEL or Fedora" %}}
234-
```shell
235-
# replace x in {{< skew currentVersion >}}.x-0 with the latest patch version
236-
yum install -y kubeadm-{{< skew currentVersion >}}.x-0 --disableexcludes=kubernetes
237-
```
238-
{{% /tab %}}
239-
{{< /tabs >}}
240-
241-
### Call "kubeadm upgrade"
242-
243-
- For worker nodes this upgrades the local kubelet configuration:
244-
245-
```shell
246-
sudo kubeadm upgrade node
247-
```
248-
249-
### Drain the node
250-
251-
- Prepare the node for maintenance by marking it unschedulable and evicting the workloads:
252-
253-
```shell
254-
# replace <node-to-drain> with the name of your node you are draining
255-
kubectl drain <node-to-drain> --ignore-daemonsets
256-
```
257-
258-
### Upgrade kubelet and kubectl
259-
260-
- Upgrade the kubelet and kubectl:
261-
262-
{{< tabs name="k8s_kubelet_and_kubectl" >}}
263-
{{% tab name="Ubuntu, Debian or HypriotOS" %}}
264-
```shell
265-
# replace x in {{< skew currentVersion >}}.x-00 with the latest patch version
266-
apt-mark unhold kubelet kubectl && \
267-
apt-get update && apt-get install -y kubelet={{< skew currentVersion >}}.x-00 kubectl={{< skew currentVersion >}}.x-00 && \
268-
apt-mark hold kubelet kubectl
269-
```
270-
{{% /tab %}}
271-
{{% tab name="CentOS, RHEL or Fedora" %}}
272-
```shell
273-
# replace x in {{< skew currentVersion >}}.x-0 with the latest patch version
274-
yum install -y kubelet-{{< skew currentVersion >}}.x-0 kubectl-{{< skew currentVersion >}}.x-0 --disableexcludes=kubernetes
275-
```
276-
{{% /tab %}}
277-
{{< /tabs >}}
278-
<br />
279-
280-
- Restart the kubelet:
281-
282-
```shell
283-
sudo systemctl daemon-reload
284-
sudo systemctl restart kubelet
285-
```
286-
287-
### Uncordon the node
288-
289-
- Bring the node back online by marking it schedulable:
290-
291-
```shell
292-
# replace <node-to-uncordon> with the name of your node
293-
kubectl uncordon <node-to-uncordon>
294-
```
222+
* [Upgrade Linux nodes](/docs/tasks/administer-cluster/kubeadm/upgrading-linux-nodes/)
223+
* [Upgrade Windows nodes](/docs/tasks/administer-cluster/kubeadm/upgrading-windows-nodes/)
295224

296225
## Verify the status of the cluster
297226

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
---
2+
title: Upgrading Linux nodes
3+
content_type: task
4+
weight: 100
5+
---
6+
7+
<!-- overview -->
8+
9+
This page explains how to upgrade a Linux Worker Nodes created with kubeadm.
10+
11+
## {{% heading "prerequisites" %}}
12+
13+
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
14+
* Familiarize yourself with [the process for upgrading the rest of your kubeadm
15+
cluster](/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade). You will want to
16+
upgrade the control plane nodes before upgrading your Linux Worker nodes.
17+
18+
<!-- steps -->
19+
20+
## Upgrading worker nodes
21+
22+
### Upgrade kubeadm
23+
24+
Upgrade kubeadm:
25+
26+
{{< tabs name="k8s_install_kubeadm_worker_nodes" >}}
27+
{{% tab name="Ubuntu, Debian or HypriotOS" %}}
28+
```shell
29+
# replace x in {{< skew currentVersion >}}.x-00 with the latest patch version
30+
apt-mark unhold kubeadm && \
31+
apt-get update && apt-get install -y kubeadm={{< skew currentVersion >}}.x-00 && \
32+
apt-mark hold kubeadm
33+
```
34+
{{% /tab %}}
35+
{{% tab name="CentOS, RHEL or Fedora" %}}
36+
```shell
37+
# replace x in {{< skew currentVersion >}}.x-0 with the latest patch version
38+
yum install -y kubeadm-{{< skew currentVersion >}}.x-0 --disableexcludes=kubernetes
39+
```
40+
{{% /tab %}}
41+
{{< /tabs >}}
42+
43+
### Call "kubeadm upgrade"
44+
45+
- For worker nodes this upgrades the local kubelet configuration:
46+
47+
```shell
48+
sudo kubeadm upgrade node
49+
```
50+
51+
### Drain the node
52+
53+
- Prepare the node for maintenance by marking it unschedulable and evicting the workloads:
54+
55+
```shell
56+
# replace <node-to-drain> with the name of your node you are draining
57+
kubectl drain <node-to-drain> --ignore-daemonsets
58+
```
59+
60+
### Upgrade kubelet and kubectl
61+
62+
- Upgrade the kubelet and kubectl:
63+
64+
{{< tabs name="k8s_kubelet_and_kubectl" >}}
65+
{{% tab name="Ubuntu, Debian or HypriotOS" %}}
66+
```shell
67+
# replace x in {{< skew currentVersion >}}.x-00 with the latest patch version
68+
apt-mark unhold kubelet kubectl && \
69+
apt-get update && apt-get install -y kubelet={{< skew currentVersion >}}.x-00 kubectl={{< skew currentVersion >}}.x-00 && \
70+
apt-mark hold kubelet kubectl
71+
```
72+
{{% /tab %}}
73+
{{% tab name="CentOS, RHEL or Fedora" %}}
74+
```shell
75+
# replace x in {{< skew currentVersion >}}.x-0 with the latest patch version
76+
yum install -y kubelet-{{< skew currentVersion >}}.x-0 kubectl-{{< skew currentVersion >}}.x-0 --disableexcludes=kubernetes
77+
```
78+
{{% /tab %}}
79+
{{< /tabs >}}
80+
<br />
81+
82+
- Restart the kubelet:
83+
84+
```shell
85+
sudo systemctl daemon-reload
86+
sudo systemctl restart kubelet
87+
```
88+
89+
### Uncordon the node
90+
91+
- Bring the node back online by marking it schedulable:
92+
93+
```shell
94+
# replace <node-to-uncordon> with the name of your node
95+
kubectl uncordon <node-to-uncordon>
96+
```
97+
98+
## {{% heading "whatsnext" %}}
99+
100+
* See how to [Upgrade Windows nodes](/docs/tasks/administer-cluster/kubeadm/upgrading-windows-nodes/).

content/en/docs/tasks/administer-cluster/kubeadm/upgrading-windows-nodes.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Upgrading Windows nodes
33
min-kubernetes-server-version: 1.17
44
content_type: task
5-
weight: 50
5+
weight: 110
66
---
77

88
<!-- overview -->
@@ -88,4 +88,6 @@ bring the node back online by marking it schedulable:
8888
# replace <node-to-drain> with the name of your node
8989
kubectl uncordon <node-to-drain>
9090
```
91+
## {{% heading "whatsnext" %}}
9192
93+
* See how to [Upgrade Linux nodes](/docs/tasks/administer-cluster/kubeadm/upgrading-linux-nodes/).

0 commit comments

Comments
 (0)