Install kubectl
Before you begin
You must use a kubectl version that is within one minor version difference of your cluster. For example, a v1.2 client should work with v1.1, v1.2, and v1.3 master. Using the latest version of kubectl helps avoid unforeseen issues.
Install kubectl on Linux
Install kubectl binary with curl on Linux
Download the latest release with the command:
To download a specific version, replace the
$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)
portion of the command with the specific version.For example, to download version v1.14.0 on Linux, type:
Make the kubectl binary executable.
Move the binary in to your PATH.
Test to ensure the version you installed is up-to-date:
Install using native package management
Install with snap
Switch to the snap user and run the installation command:
Test to ensure the version you installed is up-to-date:
Last updated
Was this helpful?