CheatSheet - kubectl

CheatSheet - kubectl

Installation

Download latest version:

curl -LO 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/kubectl
kubectl version --client

Autocomplete

echo 'source <(kubectl completion bash)' >>~/.bashrc

Decoding a Secret

kubectl get secret somesecret -o yaml

and then decode value of data:

echo 'secret' | base64 --decode

Link
No links yet.