kubeadm upgrade plan
# 显示如下
[upgrade/config] Making sure the configuration is correct:
[upgrade/config] Reading configuration from the cluster...
[upgrade/config] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -o yaml'
[preflight] Running pre-flight checks.
[upgrade] Running cluster health checks
[upgrade] Fetching available versions to upgrade to
[upgrade/versions] Cluster version: v1.22.2
[upgrade/versions] kubeadm version: v1.22.16
I1123 19:20:20.171098 38597 version.go:255] remote version is much newer: v1.25.4; falling back to: stable-1.22
[upgrade/versions] Target version: v1.22.16
[upgrade/versions] Latest version in the v1.22 series: v1.22.16
Components that must be upgraded manually after you have upgraded the control plane with 'kubeadm upgrade apply':
COMPONENT CURRENT TARGET
kubelet 11 x v1.22.2 v1.22.16
Upgrade to the latest version in the v1.22 series:
COMPONENT CURRENT TARGET
kube-apiserver v1.22.2 v1.22.16
kube-controller-manager v1.22.2 v1.22.16
kube-scheduler v1.22.2 v1.22.16
kube-proxy v1.22.2 v1.22.16
CoreDNS 1.8.0 v1.8.4
etcd 3.5.0-0 3.5.0-0
You can now apply the upgrade by executing the following command:
kubeadm upgrade apply v1.22.16
_____________________________________________________________________
The table below shows the current state of component configs as understood by this version of kubeadm.
Configs that have a "yes" mark in the "MANUAL UPGRADE REQUIRED" column require manual config upgrade or
resetting to kubeadm defaults before a successful upgrade can be performed. The version to manually
upgrade to is denoted in the "PREFERRED VERSION" column.
API GROUP CURRENT VERSION PREFERRED VERSION MANUAL UPGRADE REQUIRED
kubeproxy.config.k8s.io v1alpha1 v1alpha1 no
kubelet.config.k8s.io v1beta1 v1beta1 no
_____________________________________________________________________
执行升级到 v1.22.16
kubeadm upgrade apply v1.22.16
正常情况下显示如下
[upgrade/successful] SUCCESS! Your cluster was upgraded to "v1.22.16". Enjoy!
[upgrade/kubelet] Now that your control plane is upgraded, please proceed with upgrading your kubelets if you haven't already done so.