Last active
April 22, 2024 02:30
-
-
Save febri4n/980a20fc592be69f85b08ea96b624a1f to your computer and use it in GitHub Desktop.
install kubectl
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/bash | |
# Step 1 | |
curl -LO https://dl.k8s.io/release/`curl -LS https://dl.k8s.io/release/stable.txt`/bin/linux/amd64/kubectl | |
# Step 2 | |
chmod +x ./kubectl | |
# Step 3 | |
sudo mv ./kubectl /usr/local/bin/kubectl | |
# Step 4 | |
mkdir .kube | |
# Step 5 | |
touch .kube/config | |
# Step 6 | |
sudo apt-get install bash-completion -y && source <(kubectl completion bash) && echo "source <(kubectl completion bash)" >> $HOME/.bashrc | |
# export KUBECONFIG=~/.kube/config | |
# chmod 600 ~/.kube/config |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment