Skip to content

Instantly share code, notes, and snippets.

@mikerodionov
Last active September 1, 2022 07:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikerodionov/0955ac808ed12138e359fc395853e13e to your computer and use it in GitHub Desktop.
Save mikerodionov/0955ac808ed12138e359fc395853e13e to your computer and use it in GitHub Desktop.
Aliases for kubectl & kubectx
cat <<EOF > ~/.bash_aliases
# To set permanent bash aliases create/change ~/.bash_aliases
# And refer to .bash_aliases in .bashrc
alias k='kubectl'
alias kc='k config view --minify | grep name'
alias kdp='k describe pod'
alias kd='k describe pod'
alias ke='k explain'
alias kf='k create -f'
alias kg='k get pods --show-labels'
alias kr='k replace -f'
alias ks='k get namespaces'
alias l='ls -lrt'
alias kga='k get pod --all-namespaces'
alias kgal='k get all --show-labels'
# kubectx
alias kx='kubectx'
# Miscelanious
alias c='clear'
EOF
# Reload ~/.bashrc
. ~/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment