How to install multiple version of Kubectl on Ubuntu?

11/5/2018

I currently have kubectl v1.10.6 which I need to access my cluster, however I'm also trying to connect to a different cluster thats running on v1.5.

How and whats the best practice in having multiple version of a package on my computer? I could downgrade my package to v1.5, but that would require me to upgrade my kubectl back to v1.10 every time I need to access my other cluster. I'm currently running Ubuntu 16.04 (if that helps)

-- AlphaCR
kubectl
kubernetes
ubuntu

1 Answer

11/5/2018

They're statically linked, and have no dependencies, so there's no need to use a dependency manager for them:

$ curl -sSfo /usr/local/bin/kubectl-1.9 \
   https://storage.googleapis.com/kubernetes-release/release/v1.9.11/bin/linux/amd64/kubectl
$ chmod 755 /usr/local/bin/kubectl-1.9
-- mdaniel
Source: StackOverflow