How update kubernetes 1.10.4 to 1.11

10/20/2018

I am using a Kubernetes cluster version 1.10.4. I want to update it to 1.12 but first, I need to update it to 1.11 how it is possible?

I read this FAQ: https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade-1-11/

But it did not work. Steps try to update immediately to 1.12 and that ending with an error. :(

Help!

-- jaja
kubernetes
upgrade

1 Answer

10/22/2018

Reproduced your issue by installing v.1.10.4 version and trying to upgrade it to v.1.11.0 using https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade-1-11/ FAQ.

The same error and attempt to upgrade to 1.12.1 instead of 1.11.0

[upgrade/config] FATAL: invalid configuration: kind and apiVersion is mandatory information that needs to be specified in all YAML documents

This is happening because you pass v1.12.1 to $VERSION while using below command:

export VERSION=$(curl -sSL https://dl.k8s.io/release/stable.txt)

root@kube-update-11:~# echo $VERSION

v1.12.1

What you should do is manually set proper version:

export VERSION=v1.11.0
export ARCH=amd64
curl -sSL https://dl.k8s.io/release/${VERSION}/bin/linux/${ARCH}/kubeadm > /usr/bin/kubeadm
chmod a+rx /usr/bin/kubeadm

And try again

root@kube-update-11:~# kubeadm upgrade plan

[preflight] Running pre-flight checks.

[upgrade] Making sure the cluster is healthy:

[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 -oyaml'

I1022 12:07:11.188895 20089 feature_gate.go:230] feature gates: &{map[]}

[upgrade] Fetching available versions to upgrade to

[upgrade/versions] Cluster version: v1.10.4

[upgrade/versions] kubeadm version: v1.11.0

[upgrade/versions] Latest stable version: v1.12.1

[upgrade/versions] Latest version in the v1.10 series: v1.10.9

root@kube-update-11:~# kubeadm upgrade apply v1.11.0

[preflight] Running pre-flight checks.

[upgrade] Making sure the cluster is healthy:

[upgrade/config] Making sure the configuration is correct:

...

[upgrade/version] You have chosen to change the cluster version to "v1.11.0"

[upgrade/versions] Cluster version: v1.10.4

[upgrade/versions] kubeadm version: v1.11.0

...

[upgrade/successful] SUCCESS! Your cluster was upgraded to "v1.11.0". Enjoy!

[upgrade/kubelet] Now that your control plane is upgraded, please proceed with upgrading your kubelets if you haven't already done so.

-- VKR
Source: StackOverflow