Hello, I have very basic question which is related to kubeadm, kubelet & kub . . .

Venkat G:
I have very basic question which is related to kubeadm, kubelet & kubectl components upgrade in a worker node.
My task is to upgrade the worker node to latest kubeadm, kubelet & kubectl components to latest version . Before we do the upgrade on worker node, need to schedule the deployments other nodes as well.
I know, we can follow the kubeadm upgrade document - https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade/ and upgrade the kubeadm, kubelet & kubectl componens .
It is mentioned to do the “kubectl drain <node>” after the kubeadm upgrade only.
Can`t we drain the node before we upgrade the kubeadm component?
What is the difference, If we drain the node before the kubeadm component upgrade and later the kubeadm component upgrade?
Please clarify

Trung Tran:
Hi @Venkat G
drain = evic pod + mark node as unready for schedule new workload.
So if you drain node before upgrade kubeadm, all pod currently running on this worker node will be schedule to others available nodes. After finish upgrade, if you want to mark this node ready for new workload again, you need uncordon it.

It doesn’t make sense to drain node after upgrade, as during upgrade, the application (pod/deploy) already has downtime, it not what we want.

Mouhamadou Moustapha Camara:
Hi @Venkat G,
It’s not a requirements to do it after kubeadm upgrade you can do it before and it’s better (drain on starter -> uncordon at the end).
The aims of drain node is to be sure that during upgrade process :
• Any pod is schedule on node
• all pod is reschedule to another available node
Then any downtime will be happen

Venkat G:
Thank you @Mouhamadou Moustapha Camara :slightly_smiling_face: :slightly_smiling_face:

Aneek Bera:
Drain the node ----------> perform upgarde -------> uncordon node