Skip to content

Instantly share code, notes, and snippets.

@erkolson
Last active May 27, 2020 03:09
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 erkolson/ca411be2e6418ae1f9cd117e630b06ed to your computer and use it in GitHub Desktop.
Save erkolson/ca411be2e6418ae1f9cd117e630b06ed to your computer and use it in GitHub Desktop.
Kubernetes shell shortcuts
alias k=kubectl
alias kks='kubectl -n kube-system'
alias wp='watch kubectl get pods'
ctx() {
context=$1
if [ -z "$context" ] ; then
echo "USAGE: ctx <context-name>"
echo "Available contexts:"
kubectl config get-contexts
else
kubectl config use-context $context
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment