Add 'get-contexts' (#13677)

Added `kubectl config get-contexts` for completeness
pull/13561/head^2
Tennis Smith 2019-04-08 20:01:04 -05:00 committed by Kubernetes Prow Robot
parent f5496b5b5c
commit b809bdcba0
1 changed files with 1 additions and 0 deletions

View File

@ -62,6 +62,7 @@ KUBECONFIG=~/.kube/config:~/.kube/kubconfig2 kubectl config view
kubectl config view -o jsonpath='{.users[?(@.name == "e2e")].user.password}'
kubectl config view -o jsonpath='{.users[].name}' # get a list of users
kubectl config get-contexts # display list of contexts
kubectl config current-context # display the current-context
kubectl config use-context my-cluster-name # set the default context to my-cluster-name