upgrade docker version in GKE worker node

3/12/2019

I'm facing docker version conflicts in my cluster. The master is having the version 18.03 but the worker nodes are having 17.03.2-ce. I'm using Jenkins multi pipeline to build the docker images where the latest docker container will be pulled in the slave and it is failing as the node base version is lesser than we expected. PFB

Client: Docker Engine - Community Version: 18.09.3 API version: 1.27 (downgraded from 1.39) Go version: go1.10.8

Server: Engine: Version: 17.03.2-ce API version: 1.27 (minimum version 1.12)

Our build will work for versions higher than 17.05. So I though of updating my cluster by following the link (https://cloud.google.com/kubernetes-engine/docs/how-to/upgrading-a-cluster), but I couldn't find anything specific to docker upgrade in the work nodes.

Could you please help me to upgrade the docker version in the work nodes ?

Note: Upgrade is required only in the worker nodes and not in the master (as it is having the latest- 18.03)

-- Prakash K
docker
google-kubernetes-engine
jenkins-pipeline
kubernetes

1 Answer

3/12/2019

On GKE the version of docker is tightly coupled with the node image version, which is in turn based on the Kubernetes version of the nodes in your cluster. If you look at the GKE Release Notes you can see which Docker versions come installed on which node image versions, and then figure out which node version you need to install to get the desired version of Docker.

For example, looking at the release note for March 5th, 2019, cos-69-10895-138-0-c124 comes with Docker v18.09.0 and is used for Kubernetes nodes running 1.12+. So if you upgrade your nodes to Kubernetes 1.12.x and make sure you are using the cos_containerd node image then you will get a Docker version higher that 18.03.

-- Robert Bailey
Source: StackOverflow