From 4dc2167a1ef134175a7af201837ac251a3cc5c69 Mon Sep 17 00:00:00 2001 From: Sam Culley Date: Thu, 31 Dec 2020 07:51:50 +0000 Subject: [PATCH] re-positioned drain/uncorden steps in kubeadm upgrade docs --- .../kubeadm/kubeadm-upgrade.md | 49 ++++++++++--------- 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/content/en/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade.md b/content/en/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade.md index ce898371fb..0369ae7cb3 100644 --- a/content/en/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade.md +++ b/content/en/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade.md @@ -92,13 +92,6 @@ The upgrade workflow at high level is the following: kubeadm version ``` -1. Drain the control plane node: - - ```shell - # replace with the name of your control plane node - kubectl drain --ignore-daemonsets - ``` - 1. On the control plane node, run: ```shell @@ -242,13 +235,6 @@ The upgrade workflow at high level is the following: This step is not required on additional control plane nodes if the CNI provider runs as a DaemonSet. -1. Uncordon the control plane node: - - ```shell - # replace with the name of your control plane node - kubectl uncordon - ``` - ### Upgrade additional control plane nodes 1. Same as the first control plane node but use: @@ -265,6 +251,15 @@ sudo kubeadm upgrade apply Also `sudo kubeadm upgrade plan` is not needed. +### Drain the control plane node + +- Prepare the node for maintenance by marking it unschedulable and evicting the workloads: + + ```shell + # replace with the name of your control plane node + kubectl drain --ignore-daemonsets + ``` + ### Upgrade kubelet and kubectl 1. Upgrade the kubelet and kubectl on all control plane nodes: @@ -292,6 +287,16 @@ Also `sudo kubeadm upgrade plan` is not needed. sudo systemctl restart kubelet ``` +### Uncordon the control plane node + +- Bring the node back online by marking it schedulable + + ```shell + # replace with the name of your control plane node + kubectl uncordon + ``` + + ## Upgrade worker nodes The upgrade procedure on worker nodes should be executed one node at a time or few nodes at a time, @@ -318,6 +323,14 @@ without compromising the minimum required capacity for running your workloads. {{% /tab %}} {{< /tabs >}} +### Upgrade the kubelet configuration + +1. Call the following command: + + ```shell + sudo kubeadm upgrade node + ``` + ### Drain the node 1. Prepare the node for maintenance by marking it unschedulable and evicting the workloads: @@ -335,14 +348,6 @@ without compromising the minimum required capacity for running your workloads. node/ip-172-31-85-18 drained ``` -### Upgrade the kubelet configuration - -1. Call the following command: - - ```shell - sudo kubeadm upgrade node - ``` - ### Upgrade kubelet and kubectl 1. Upgrade the kubelet and kubectl on all worker nodes: