Skip to content

Instantly share code, notes, and snippets.

@tdlmatias
Created December 20, 2019 10:42
Show Gist options
  • Save tdlmatias/51ac6a950deb538479c971268a604bb5 to your computer and use it in GitHub Desktop.
Save tdlmatias/51ac6a950deb538479c971268a604bb5 to your computer and use it in GitHub Desktop.
#!/bin/bash
############################
## Edited by TdlMatias #####
############################
# Script to install Kubectl
############################
KUBECTL_BIN=kubectl
function install_kubectl {
if [ -z $(which $KUBECTL_BIN) ]
then
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/$KUBECTL_BIN
chmod +x ${KUBECTL_BIN}
sudo mv ${KUBECTL_BIN} /usr/local/bin/${KUBECTL_BIN}
else
echo "Kubectl is most likely installed"
fi
}
@tdlmatias
Copy link
Author

Please test it before use it ... :-) All feed backs are welcome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment