Skip to content

Instantly share code, notes, and snippets.

@colossus06
Created February 13, 2024 10:18
Show Gist options
  • Save colossus06/b832c59e6ee11f5b6853e52f08becbb2 to your computer and use it in GitHub Desktop.
Save colossus06/b832c59e6ee11f5b6853e52f08becbb2 to your computer and use it in GitHub Desktop.
#install kubectl
sudo curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
sudo chmod +x kubectl
mkdir -p ~/.local/bin
sudo mv ./kubectl ~/.local/bin/kubectl
kubectl version --client
#install helm
sudo curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
sudo chmod 700 get_helm.sh
sudo ./get_helm.sh
helm version --short
#Enable kubectl autocompletion
echo 'source <(kubectl completion bash)' >>~/.bashrc
#alias k for kubectl
echo 'alias k=kubectl' >>~/.bashrc
echo 'complete -o default -F __start_kubectl k' >>~/.bashrc
source ~/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment