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:
parent
3a2a59c3e3
commit
54af88fad2
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue