How Do You Install kubectl on Any Type of Linux?

Problem scenario
You want a quick, generic way to install kubectl on any type of Linux.  What should you do?

Solution
Run these commands:

cd /tmp

curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && chmod +x kubectl

sudo mv kubectl /usr/local/bin/

Test it by running this command: kubectl version

Leave a comment

Your email address will not be published. Required fields are marked *