Cordon Node: Mark a node unschedulable
kubectl cordon <nodename
Drain Nodes:
kubectl drain node <nodename>
: drain and uncordon
deployable kubenernetes package contains all components at same version
All internal deployed components may not have same version.
allows us to upgrade each component independently.
Kubernetes supports only current and current-2 version
Upgrade plan 1st upgrade master nodes 2nd upgrade worker nodes:
during update master goes down, but pods keep running and services are available. cluster management is not available. pods, if dead, will not be replaced
Upgrade for on-premise
Upgrade Master
kubeadm upgrade plan
shows current version and next upgrade target- upgrade kubeadm
apt upgrade -y kubeadm=1.19.0-00
- Apply upgrade
kubeadm upgrade apply v1.19.0
- upgrade update kubelet
apt upgrade -y kubelet=1.19.0-00
on all nodes. - service restart kubelet
Upgrade worker Nodes. for each node:
1. Drain node-1
2. upgrade kubeadm and ubelet
3. kubeadm upgrade node config --kubelet-version v1.19.0
4. service restart kubelet
5. kubectl uncordon node-1