How to upgrade kubectl server version

7/11/2019

On Windows 10 Pro, I installed docker and the Kubernetes cli. I upgraded the kubectl.exe to version 1.15 by replacing the old one in the docker folder. When I run “kubectl version”, it shows the client version as 1.15, but the server version still shows as 1.10. How can I upgrade the server version to 1.15?

-- Dsan
docker
kubernetes

2 Answers

7/11/2019

You need to upgrade kubernetes control plane.

you can use below commands to upgrade k8s cluster if the cluster is setup using kubeadm

export VERSION="1.15"
export ARCH=amd64
wget https://storage.googleapis.com/kubernetes-release/release/v${VERSION}/bin/linux/amd64/kubeadm > /usr/bin/kubeadm
chmod a+rx /usr/bin/kubeadm

kubeadm upgrade apply ${VERSION}
-- P Ekambaram
Source: StackOverflow

7/11/2019

Welcome to SO !, I assume you are using Kubernetes cluster, that is available as an installation option of Docker Desktop for Windows. In that case you cannot easily upgrade your Kubernetes cluster (server side), as its particular version is bundled with Docker Desktop installer (e.g. Docker Community Edition 2.0.0.2 2019-01-16 comes with Kubernetes 1.10.11 version).

If you want to have a full control over Kubernetes version (server side/control plane) please check minikube tool, which lets you specify it by adding '--kubernetes-version' argument (minikube start --kubernetes-version v1.15.0). With minikube there is still an option to re-use the Docker daemon inside the VM (started with 'minikube start command' in the background).

-- Nepomucen
Source: StackOverflow