File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
content/en/docs/reference/kubectl Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -71,12 +71,19 @@ KUBECONFIG=~/.kube/config:~/.kube/kubconfig2
71
71
72
72
kubectl config view
73
73
74
+ # Show merged kubeconfig settings and raw certificate data and exposed secrets
75
+ kubectl config view --raw
76
+
74
77
# get the password for the e2e user
75
78
kubectl config view -o jsonpath=' {.users[?(@.name == "e2e")].user.password}'
76
79
80
+ # get the certificate for the e2e user
81
+ kubectl config view --raw -o jsonpath=' {.users[?(.name == ' e2e' )].user.client-certificate-data}' | base64 -d
82
+
77
83
kubectl config view -o jsonpath=' {.users[].name}' # display the first user
78
84
kubectl config view -o jsonpath=' {.users[*].name}' # get a list of users
79
85
kubectl config get-contexts # display list of contexts
86
+ kubectl config get-contexts -o name # get all context names
80
87
kubectl config current-context # display the current-context
81
88
kubectl config use-context my-cluster-name # set the default context to my-cluster-name
82
89
You can’t perform that action at this time.
0 commit comments