Kubernetes – Useful Shorthands for Kubectl

Useful aliases for kubectl that I use

kd='k describe pod'
ke='k explain'
kf='k create -f'
kg='k get pods --show-labels'
kga='k get pod -A --sort-by=.metadata.namespace'
kgaa='k get all --show-labels'
kgi='k get ingress'
ks='k get namespaces'

Add these to ~/.zshrc (ZShell) or ~/.bashrc (Bash)

alias k='kubectl'
alias kd='k describe pod'
alias ke='k explain'
alias kf='k create -f'
alias kg='k get pods --show-labels'
alias ks='k get namespaces'
alias kga='k get pod -A --sort-by=.metadata.namespace'
alias kgi='k get ingress'
alias kgaa='k get all --show-labels'

One response to “Kubernetes – Useful Shorthands for Kubectl”

Leave a Reply

Your email address will not be published. Required fields are marked *