upgrade_cluster
Upgrade Cluster
If the cluster was built using kubeadm
, kubeadm upgrade
can be used to upgrade a cluster.
To compare the installed version with the latest and if it's posssible to upgrade:
sudo kubeadm upgrade plan
To upgrade first control plane to specified version:
sudo kubeadm apply
To show the differences applied during the upgrade (similar to kubectl apply --dry-run
:
sudo kubeadm diff
This allows for updating the local kubelet
configuration on worker nodes, or the control planes of other master nodes if there is more than one. Also, it will access a phase command to step through the upgrade process:
sudo kubeadm node
General upgrade process:
- Update the software
- Check the software version
- Drain the control plane
- View the planned upgrade
- Apply the upgrade
- Uncordon the control plane to allow pods to be scheduled.