A short shell script to get the latest kubectl
and install it locally on ~/opt/bin
- assuming you have that in your PATH.
Last active
May 9, 2022 19:16
-
-
Save nicc777/1475f894261f17dcd5c71b24e3f2f81d to your computer and use it in GitHub Desktop.
Get latest kubectl (Linux)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl" | |
mkdir -p ~/opt/bin | |
chmod 700 kubectl | |
mv kubectl ~/opt/bin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment