Though I know the steps for upgrade and version compatibility thing, but still I . . .

Mayur Sharma:
Though I know the steps for upgrade and version compatibility thing,
but still I am confused in choosing the version during cluster upgrade.
High level steps,

  1. upgrade kubeadm to the version you want(apt-get update && apt-get install -y kubeadm=1.XX.x
  2. apply the plan (kubeadm upgrade apply 1.XX.x)
  3. Drain the node (kubectl drain controlplane --ignore-daemonsets)
  4. upgrade kubectl and kubelet (apt-get update && apt-get install -y kubelet=1.XX.x-00 kubectl=1.XX.x-00)
  5. uncordon the node back to scheduling state. (kubectl uncordon controlplane)
    Please confirm/correct my understanding in below cases

Suppose, the current version in v1.19.0 and we asked to upgrade in following ways

  1. upgrade cluster

  2. upgrade cluster to v1.20.0 version

  3. upgrade the cluster version on only master node

ANSWERS

  1. When we asked to upgrade the cluster from v1.19.0, I checked the next available
    cluster version by running “kubeadm upgrade plan” and, it says v1.19.7

Should I upgrade to v1.19.7 or we should always increase the master version, like in this case upgrade to v1.20.0

  1. If we have asked to upgrade the cluster to v1.20.0-00, I first ran
    apt-get update && apt-get install -y kubeadm=1.20.0-00

Verify the kubeadm version run upgrade plan,
kubeadm upgrade plan – here I noticed and asked to apply 1.20.7 (instead of 1.20.0)

Should I apply the upgrade plan to v1.20.0-00 or v1.20.7 as suggested in upgrade plan?

  1. For cluster version upgrade on master node, should I upgrade only master components or kubectl and kubelet also (if they are deployed)

Madhan Kumar:
following the instructions in the below link from top to bottom is what I would suggest . regarding picking v1.19.7 vs v1.20.0 , you can pick any one according to your requirement , before you start upgrading you should know what version you want to go to , there is no right or wrong here , as long the version you want to upgrade to is not more than one major version . https://v1-20.docs.kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade/

Madhan Kumar:
All controlplane conponents are normlly of same version (kube-apiserver, controller-manager, kube-scheduler, kubectl, kubelet, kube-proxy) Other components in controlplane like(ETCD, CoreDNS) can be of seperate versions. when you upgrade apply v x.x.xx. the control plane components will upgraded to the version you specify stick to the same version for all components to avoid any confusion .

Madhan Kumar:
I believe upgrading everything is the correct think to do . as per the Kuberentes documentation link they have instructions to upgrade everything under the page titled “Upgrading kubeadm clusters” . so we can follow the same … and upgrade kubeadm , all compenents including kubelet and kubectl …

Mayur Sharma:
Hi @Madhan Kumar, I am following the same document as you shared.

Regarding,
#1, You mentioned,

regarding picking v1.19.7 vs v1.20.0 , you can pick any one according to your requirement

There is no requirement and that is my doubt, wanted to know which version should I pick?
From my opinion, when are not given the targeted version, we should choose the next major version. Need your expert advice :slightly_smiling_face:

#2, I upgraded kubeadm to 1.20,0, still upgrade plan shows to apply 1.20.7 for controlplane components. So, had a doubt.
But, I think here I should stick to 1.20.0 and would be good.

Also, this discussion raises another doubt
• regarding ETCD. Should we upgrade ETCD if not mentioned?
(I do not think so as their version can be anything or there is a documentation for compatible ETCD version for corresponding apiserver version)
• CoreDNS gets upgraded as part of kubeadm apply. Please correct me if I am wrong.

Madhan Kumar:
I’m no expert… :slight_smile: … requirement on which version pick should be in the question … if they say upgrade to v 1.20 … then just upgrade to 1.20.0 or 1.20.7 as both are 1.20 … the apply command is just a recommendation… its upto you to decide which version you want to apply …

Mayur Sharma:
@Madhan Kumar Thanks for the quick reply, I got my doubt clear about the version selection.

Can you please share your views on ETCD and CoreDNS installation?