My source k8s cluster version is v1.11.5 and the dest k8s cluster version is v1.15.2 with in-place upgrade.
K8S Cluster Status.Three master nodes with k8s controll plane:
NAME STATUS ROLES AGE VERSION
a1 Ready master 23h v1.11.5
a2 Ready master 23h v1.11.5
a3 Ready master 22h v1.11.5
I didn't use kubeadm upgrade because the enforced k8s skew policies.I followed the steps below:
[step 0] kubectl drain node a3 and remove all k8s components on a3.
[step 1] use kubeadm init to install v1.15.2 k8s on node a3 and undrain node a3.
[step 2] redo the steps above on node a2 and a1.
After installed v1.15.2 k8s on each node,K8S Cluster Status becomes:
NAME STATUS ROLES AGE VERSION
a1 Ready master 23h v1.15.2
a2 Ready master 23h v1.15.2
a3 Ready master 22h v1.15.2
So my question is is there any problem on this upgrade solution?
Because the k8s version skew policy says k8s does not support upgrading on cross y version.For example,I have to upgrade k8s from v1.11 to v1.12 and then from v1.12 to v1.13.
In your case it is not an upgrade. You have run 'kubeadm init to install v1.15.2' which means it is a fresh install of v1.15.2
Yes, you should generally do each version upgrade. Not only can there be intermediary upgrades that need to happen for things like CNI plugins, running Kubelet with more than one version of skew is not supported. So if you were going to do this, you would instead have to drain and stop every node, then do the upgrade, then start them again :) That would obviously mean a complete downtime, as opposed to doing each hop which allows rolling upgrades, which are usually preferred.