How to upgrade kubectl client version
So, to upgrade kubectl on mac:
brew upgrade kubectl
Then you 'll probably need:
brew link --overwrite kubernetes-cli
I had installed kubectl using google-cloud-sdk. So in my path kubectl was pointing to this location. That is why the version did not update. Kubectl got updated after I removed that from the path.
If you have installed it with brew
, you can just run brew upgrade kubernetes-cli
.
Install specific version of kubectl
curl -LO https://storage.googleapis.com/kubernetes-release/release/<specific-kubectl-version>/bin/darwin/amd64/kubectl
For your case if you want to install version v1.11.3
then replace specific-kubectl-version with v1.11.3
Then make this binary executable
chmod +x ./kubectl
Then move this binary to your PATH
sudo mv ./kubectl $(which kubectl)