Last active
January 24, 2019 01:46
-
-
Save NorikDavtian/28bcf85db45daa9e01a3e0ae2689edf5 to your computer and use it in GitHub Desktop.
from: https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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". |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
K8s Config docs
https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#config