Skip to content

Instantly share code, notes, and snippets.

@NorikDavtian
Last active January 24, 2019 01: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 NorikDavtian/28bcf85db45daa9e01a3e0ae2689edf5 to your computer and use it in GitHub Desktop.
Save NorikDavtian/28bcf85db45daa9e01a3e0ae2689edf5 to your computer and use it in GitHub Desktop.
# https://kubernetes.io/docs/reference/kubectl/cheatsheet/#zsh
source <(kubectl completion zsh) # setup autocomplete in zsh into the current shell
echo "if [ $commands[kubectl] ]; then source <(kubectl completion zsh); fi" >> ~/.zshrc # add autocomplete permanently to your zsh shell
kubectl config --kubeconfig=config-demo view
# apiVersion: v1
# clusters: []
# contexts: []
# current-context: ""
# kind: Config
# preferences: {}
# users: []
kubectl config --kubeconfig=config-demo set-context dev-backend --cluster=development --namespace=backend --user=developer
# Context "dev-backend" created.
kubectl config --kubeconfig=config-demo use-context dev-backend
# Switched to context "dev-backend".
@NorikDavtian
Copy link
Author

NorikDavtian commented Jan 24, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment