1KUBERNETES(1)(kubernetes) KUBERNETES(1)(kubernetes)
2
3
4
5Eric Paris Jan 2015
6
7
9 kubectl auth whoami - Experimental: Check self subject attributes
10
11
12
14 kubectl auth whoami [OPTIONS]
15
16
17
19 Experimental: Check who you are and your attributes (groups, extra).
20
21
22 This command is helpful to get yourself aware of the current user at‐
23 tributes,
24 especially when dynamic authentication, e.g., token webhook, auth
25 proxy, or OIDC provider,
26 is enabled in the Kubernetes cluster.
27
28
29
31 --allow-missing-template-keys=true If true, ignore any errors in
32 templates when a field or map key is missing in the template. Only ap‐
33 plies to golang and jsonpath output formats.
34
35
36 -o, --output="" Output format. One of: (json, yaml, name, go-tem‐
37 plate, go-template-file, template, templatefile, jsonpath, jsonpath-as-
38 json, jsonpath-file).
39
40
41 --show-managed-fields=false If true, keep the managedFields when
42 printing objects in JSON or YAML format.
43
44
45 --template="" Template string or path to template file to use when
46 -o=go-template, -o=go-template-file. The template format is golang tem‐
47 plates [http://golang.org/pkg/text/template/#pkg-overview].
48
49
50
52 --as="" Username to impersonate for the operation. User could be a
53 regular user or a service account in a namespace.
54
55
56 --as-group=[] Group to impersonate for the operation, this flag
57 can be repeated to specify multiple groups.
58
59
60 --as-uid="" UID to impersonate for the operation.
61
62
63 --azure-container-registry-config="" Path to the file containing
64 Azure container registry configuration information.
65
66
67 --cache-dir="/builddir/.kube/cache" Default cache directory
68
69
70 --certificate-authority="" Path to a cert file for the certificate
71 authority
72
73
74 --client-certificate="" Path to a client certificate file for TLS
75
76
77 --client-key="" Path to a client key file for TLS
78
79
80 --cluster="" The name of the kubeconfig cluster to use
81
82
83 --context="" The name of the kubeconfig context to use
84
85
86 --disable-compression=false If true, opt-out of response compres‐
87 sion for all requests to the server
88
89
90 --insecure-skip-tls-verify=false If true, the server's certificate
91 will not be checked for validity. This will make your HTTPS connections
92 insecure
93
94
95 --kubeconfig="" Path to the kubeconfig file to use for CLI re‐
96 quests.
97
98
99 --match-server-version=false Require server version to match
100 client version
101
102
103 -n, --namespace="" If present, the namespace scope for this CLI
104 request
105
106
107 --password="" Password for basic authentication to the API server
108
109
110 --profile="none" Name of profile to capture. One of
111 (none|cpu|heap|goroutine|threadcreate|block|mutex)
112
113
114 --profile-output="profile.pprof" Name of the file to write the
115 profile to
116
117
118 --request-timeout="0" The length of time to wait before giving up
119 on a single server request. Non-zero values should contain a corre‐
120 sponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't time‐
121 out requests.
122
123
124 -s, --server="" The address and port of the Kubernetes API server
125
126
127 --tls-server-name="" Server name to use for server certificate
128 validation. If it is not provided, the hostname used to contact the
129 server is used
130
131
132 --token="" Bearer token for authentication to the API server
133
134
135 --user="" The name of the kubeconfig user to use
136
137
138 --username="" Username for basic authentication to the API server
139
140
141 --version=false Print version information and quit
142
143
144 --warnings-as-errors=false Treat warnings received from the server
145 as errors and exit with a non-zero exit code
146
147
148
150 # Get your subject attributes.
151 kubectl auth whoami
152
153 # Get your subject attributes in JSON format.
154 kubectl auth whoami -o json
155
156
157
158
160 kubectl-auth(1),
161
162
163
165 January 2015, Originally compiled by Eric Paris (eparis at redhat dot
166 com) based on the kubernetes source material, but hopefully they have
167 been automatically generated since!
168
169
170
171Manuals User KUBERNETES(1)(kubernetes)