Skip to content

Instantly share code, notes, and snippets.

@danackerson
Last active February 9, 2021 08:47
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 danackerson/62c242ee858e56a78957d524923ac07c to your computer and use it in GitHub Desktop.
Save danackerson/62c242ee858e56a78957d524923ac07c to your computer and use it in GitHub Desktop.
handy aliases
### GIT ###
alias gs='git status'
alias gd='git diff'
alias gc='git commit -am'
alias gp='git push'
### K8S ###
alias k='sudo kubectl'
alias kp='k get po'
alias kap='k get pods --all-namespaces -o wide'
alias kas='k get services --all-namespaces -o wide'
kl() {
k logs $(k get po | grep $1 | awk '{print $1; exit}' | tr -d \\n)
}
kx() {
k exec -it $(k get po | grep $1 | awk '{print $1; exit}' | tr -d \\n) -- $2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment