Last modified January 2, 2017

Installing and Updating kubectl

kubectl comes as a self-contained binary for Mac, Linux, and Windows. Below you find installation instructions for different platforms.

Always, make sure that your local kubectl version is as close as possible to the version of your Kubernetes cluster.

Please select your platform:

Homebrew provides the most convenient way to install kubectl and keep it up to date. To install, use this command:

brew install kubectl

For updating:

brew upgrade kubectl

Execute the commands below to install a specific released version. The same commands work for upgrading from a previously installed version.

curl -O https://storage.googleapis.com/kubernetes-release/release/v1.5.2
/bin/darwin/amd64/kubectl
chmod +x kubectl
sudo cp kubectl /usr/local/bin/kubectl

Execute the commands below to install a specific released version. The same commands work for upgrading from a previously installed version.

curl -O https://storage.googleapis.com/kubernetes-release/release/v1.5.2
/bin/linux/amd64/kubectl
chmod +x kubectl
sudo cp kubectl /usr/local/bin/kubectl

Download Kubernetes client of your desired version after following the CHANGELOG link of the respective Kubernetes GitHub release, extract it to a folder of your choice, and make the kubectl.exe available in your environment PATH variable.

Next steps

  • You can use gsctl to set up kubectl for use with a Giant Swarm cluster.
  • For an overview over the functionality of kubectl please refer to the official kubectl reference