How to upgrade the GKE node cos image

google-cloud-platformgoogle-kubernetes-engine

Is there any way I can upgrade the cos image for my GKE nodes? I run cos-stable-59-9460-73-0 now, but I can see that there is a new stable image available:

$ gcloud compute images list --project cos-cloud --no-standard-images
NAME                     PROJECT    FAMILY      DEPRECATED  STATUS
...
cos-stable-59-9460-73-0  cos-cloud  cos-stable              READY
cos-stable-60-9592-84-0  cos-cloud  cos-stable              READY

It seems that the image I'm running for my nodes is specified in the instance template, but the template is managed by GKE and it seems as I can't modify it.

I have tried running sudo update_engine_client --update on the nodes but with no luck.

Is it possible to upgrade manually or do I simply have to wait for the auto-upgrade?

Best Answer

The cos image used in Google Container Engine is currently tied to the version of Kubernetes being used. This is because each cos version (and in particular the version of docker it includes) is carefully qualified with a Kubernetes version and the pair are released together. Auto-upgrades of cos are disabled in Google Container Engine to avoid a situation where the base image updates itself to a version that is incompatible with the Kubelet running in the cluster.

To upgrade to a new cos version you will need to upgrade to a newer Kubernetes version. You can look for new versions on the container engine release notes page.

Related Topic