Kubernetes CLI on Debian

Getting the kubectl command

# curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg |
  apt-key add -
# echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" |
  tee -a /etc/apt/sources.list.d/kubernetes.list
# apt-get update
# apt-get install kubectl

kubectl auto completion for ZSH

I don't use oh-my-zsh, so I do this manually.

First, create the auto completion file:

$ kubectl completion zsh > ~/.zsh/kubectl-completion.zsh

Then load it from .zshrc:

source ~/.zsh/kubectl-completion.zsh

That's it, enjoy using kubectl!

Licensed under CC BY Creative Commons License ~ ✉ torstein.k.johansen @ gmail ~ 🐦 @torsteinkrause ~