Increase your productivity with Kubernetes CLI, using zsh, oh-my-zsh and the kubectl plugin. Here is a full list of aliases for common commands.

For example:

AliasCommandDescription
kkubectlThe kubectl command
kcakubectl --all-namespacesThe kubectl command targeting all namespaces
kgpkubectl get podsList all pods in ps output format

Install zsh

MacOS

Install the following packages using homebrew:

brew install zsh zsh-completions

Change your default shell using the command:

chsh -s /usr/local/bin/zsh

Ubuntu

Using apt:

apt install zsh

CentOS/RHEL

Using yum:

sudo yum update && sudo yum -y install zsh

Install oh-my-zsh

Using curl:

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Using wget:

sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"

Add the Kubernetes plugin

Add kubectl to the list of plugins in ~/.zshrc,

...
plugins=(
  ...
  kubectl
  ...
)
...

Then run source ~/.zshrc to reload the configuration.

💥 Instead of kubectl get pods you can simply run kgp.