Published on

Installing or Upgrading Kubectl


Today while interacting with a new Kubernetes cluster (version 1.11 of Kubernetes) I tried to delete a statefulset but received a cryptic error:

no kind "GetOptions" is registered for version "apps/v1"

After doing a quick search online I found that the cause of this is due to the Kubernetes statefulset API having changed in version 1.11. My kubectl client needed to be updated to the newest version in order to interact with this new cluster.

The official docs for installing kubectl refer you to a Github page with tars of the latests versions but they do not seem to be precompiled. Instead it seems that the easiest is to get the binary from

The difficulty is working out what OS value to use as well as what architecture as there is no list of possible options. The storage api for kubectl uses the following form:`versionYouWant`/bin/`os`/`cpuArchitecture`/kubectl

There is no complete list of this online but after a bit of Googling I came across this Gist and modified it to get specifically kubectl. To use gsutil from this gist you can install it using pip as outlines here * sudo pip install gsutil

My modified script to see possible OSs and architectures for a specific version can be found below:

> gsutil ls -R gs://kubernetes-release/release/v1.9.10 | grep -i kubectl