Update the kubectl config command in cheatsheet.md (#16556)

`kubectl config view -o jsonpath='{.users[].name}' ` in the doc doesn't get the list of users as described in the comment actually.
To get the list of users, the json path should be `'{.users[].name}' `
This commit is contained in:
Pengcheng Chen 2019-09-26 04:25:06 +02:00 committed by Kubernetes Prow Robot
parent 3a2a59c3e3
commit 54af88fad2
1 changed files with 1 additions and 1 deletions

View File

@ -62,7 +62,7 @@ kubectl config view
# get the password for the e2e user
kubectl config view -o jsonpath='{.users[?(@.name == "e2e")].user.password}'
kubectl config view -o jsonpath='{.users[].name}' # get a list of users
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