1KUBERNETES(1)                      Jan 2015                      KUBERNETES(1)
2
3
4

NAME

6       kubectl config set-credentials - Sets a user entry in kubeconfig
7
8
9

SYNOPSIS

11       kubectl config set-credentials [OPTIONS]
12
13
14

DESCRIPTION

16       Sets a user entry in kubeconfig
17
18
19       Specifying  a  name that already exists will merge new fields on top of
20       existing values.
21
22
23       Client-certificate flags:
24         --client-certificate=certfile --client-key=keyfile
25
26
27       Bearer token flags:
28           --token=bearer_token
29
30
31       Basic auth flags:
32           --username=basic_user --password=basic_password
33
34
35       Bearer token and basic auth are mutually exclusive.
36
37
38

OPTIONS

40       --auth-provider=""
41           Auth provider for the user entry in kubeconfig
42
43
44       --auth-provider-arg=[]
45           'key=value' arguments for the auth provider
46
47
48       --embed-certs=false
49           Embed client cert/key for the user entry in kubeconfig
50
51
52       --password=""
53           password for the user entry in kubeconfig
54
55
56       --username=""
57           username for the user entry in kubeconfig
58
59
60

OPTIONS INHERITED FROM PARENT COMMANDS

62       --allow-verification-with-non-compliant-keys=false
63           Allow  a  SignatureVerifier  to  use  keys  which  are  technically
64       non-compliant with RFC6962.
65
66
67       --alsologtostderr=false
68           log to standard error as well as files
69
70
71       --application-metrics-count-limit=100
72           Max number of application metrics to store (per container)
73
74
75       --as=""
76           Username to impersonate for the operation
77
78
79       --as-group=[]
80           Group  to  impersonate for the operation, this flag can be repeated
81       to specify multiple groups.
82
83
84       --azure-container-registry-config=""
85           Path to the file containing Azure container registry  configuration
86       information.
87
88
89       --boot-id-file="/proc/sys/kernel/random/boot_id"
90           Comma-separated  list  of files to check for boot-id. Use the first
91       one that exists.
92
93
94       --cache-dir="/builddir/.kube/http-cache"
95           Default HTTP cache directory
96
97
98       --certificate-authority=""
99           Path to a cert file for the certificate authority
100
101
102       --client-certificate=""
103           Path to a client certificate file for TLS
104
105
106       --client-key=""
107           Path to a client key file for TLS
108
109
110       --cloud-provider-gce-lb-src-cidrs=130.211.0.0/22,209.85.152.0/22,209.85.204.0/22,35.191.0.0/16
111           CIDRs opened in GCE firewall for LB traffic proxy  health checks
112
113
114       --cluster=""
115           The name of the kubeconfig cluster to use
116
117
118       --container-hints="/etc/cadvisor/container_hints.json"
119           location of the container hints file
120
121
122       --containerd="unix:///var/run/containerd.sock"
123           containerd endpoint
124
125
126       --context=""
127           The name of the kubeconfig context to use
128
129
130       --default-not-ready-toleration-seconds=300
131           Indicates    the    tolerationSeconds   of   the   toleration   for
132       notReady:NoExecute that is added by default to every pod that does  not
133       already have such a toleration.
134
135
136       --default-unreachable-toleration-seconds=300
137           Indicates  the  tolerationSeconds  of  the  toleration for unreach‐
138       able:NoExecute that is added by default to  every  pod  that  does  not
139       already have such a toleration.
140
141
142       --docker="unix:///var/run/docker.sock"
143           docker endpoint
144
145
146       --docker-env-metadata-whitelist=""
147           a  comma-separated  list of environment variable keys that needs to
148       be collected for docker containers
149
150
151       --docker-only=false
152           Only report docker containers in addition to root stats
153
154
155       --docker-root="/var/lib/docker"
156           DEPRECATED: docker root is read from docker info (this is  a  fall‐
157       back, default: /var/lib/docker)
158
159
160       --docker-tls=false
161           use TLS to connect to docker
162
163
164       --docker-tls-ca="ca.pem"
165           path to trusted CA
166
167
168       --docker-tls-cert="cert.pem"
169           path to client certificate
170
171
172       --docker-tls-key="key.pem"
173           path to private key
174
175
176       --enable-load-reader=false
177           Whether to enable cpu load reader
178
179
180       --event-storage-age-limit="default=0"
181           Max length of time for which to store events (per type). Value is a
182       comma separated list of key values, where  the  keys  are  event  types
183       (e.g.: creation, oom) or "default" and the value is a duration. Default
184       is applied to all non-specified event types
185
186
187       --event-storage-event-limit="default=0"
188           Max number of events to store (per type). Value is  a  comma  sepa‐
189       rated  list  of  key values, where the keys are event types (e.g.: cre‐
190       ation, oom) or "default" and  the  value  is  an  integer.  Default  is
191       applied to all non-specified event types
192
193
194       --global-housekeeping-interval=1m0s
195           Interval between global housekeepings
196
197
198       --google-json-key=""
199           The  Google  Cloud  Platform  Service  Account  JSON Key to use for
200       authentication.
201
202
203       --housekeeping-interval=10s
204           Interval between container housekeepings
205
206
207       --insecure-skip-tls-verify=false
208           If true, the server's certificate will not be checked for validity.
209       This will make your HTTPS connections insecure
210
211
212       --kubeconfig=""
213           use a particular kubeconfig file
214
215
216       --log-backtrace-at=:0
217           when logging hits line file:N, emit a stack trace
218
219
220       --log-cadvisor-usage=false
221           Whether to log the usage of the cAdvisor container
222
223
224       --log-dir=""
225           If non-empty, write log files in this directory
226
227
228       --log-flush-frequency=5s
229           Maximum number of seconds between log flushes
230
231
232       --logtostderr=true
233           log to standard error instead of files
234
235
236       --machine-id-file="/etc/machine-id,/var/lib/dbus/machine-id"
237           Comma-separated  list  of  files  to  check for machine-id. Use the
238       first one that exists.
239
240
241       --match-server-version=false
242           Require server version to match client version
243
244
245       --mesos-agent="127.0.0.1:5051"
246           Mesos agent address
247
248
249       --mesos-agent-timeout=10s
250           Mesos agent timeout
251
252
253       -n, --namespace=""
254           If present, the namespace scope for this CLI request
255
256
257       --request-timeout="0"
258           The length of time to wait before giving  up  on  a  single  server
259       request. Non-zero values should contain a corresponding time unit (e.g.
260       1s, 2m, 3h). A value of zero means don't timeout requests.
261
262
263       -s, --server=""
264           The address and port of the Kubernetes API server
265
266
267       --stderrthreshold=2
268           logs at or above this threshold go to stderr
269
270
271       --storage-driver-buffer-duration=1m0s
272           Writes in the storage driver will be buffered  for  this  duration,
273       and committed to the non memory backends as a single transaction
274
275
276       --storage-driver-db="cadvisor"
277           database name
278
279
280       --storage-driver-host="localhost:8086"
281           database host:port
282
283
284       --storage-driver-password="root"
285           database password
286
287
288       --storage-driver-secure=false
289           use secure connection with database
290
291
292       --storage-driver-table="stats"
293           table name
294
295
296       --storage-driver-user="root"
297           database username
298
299
300       --token=""
301           Bearer token for authentication to the API server
302
303
304       --user=""
305           The name of the kubeconfig user to use
306
307
308       -v, --v=0
309           log level for V logs
310
311
312       --version=false
313           Print version information and quit
314
315
316       --vmodule=
317           comma-separated  list  of pattern=N settings for file-filtered log‐
318       ging
319
320
321

EXAMPLE

323                # Set only the "client-key" field on the "cluster-admin"
324                # entry, without touching other values:
325                kubectl config set-credentials cluster-admin --client-key= /.kube/admin.key
326
327                # Set basic auth for the "cluster-admin" entry
328                kubectl config set-credentials cluster-admin --username=admin --password=uXFGweU9l35qcif
329
330                # Embed client certificate data in the "cluster-admin" entry
331                kubectl config set-credentials cluster-admin --client-certificate= /.kube/admin.crt --embed-certs=true
332
333                # Enable the Google Compute Platform auth provider for the "cluster-admin" entry
334                kubectl config set-credentials cluster-admin --auth-provider=gcp
335
336                # Enable the OpenID Connect auth provider for the "cluster-admin" entry with additional args
337                kubectl config set-credentials cluster-admin --auth-provider=oidc --auth-provider-arg=client-id=foo --auth-provider-arg=client-secret=bar
338
339                # Remove the "client-secret" config value for the OpenID Connect auth provider for the "cluster-admin" entry
340                kubectl config set-credentials cluster-admin --auth-provider=oidc --auth-provider-arg=client-secret-
341
342
343
344

SEE ALSO

346       kubectl-config(1),
347
348
349

HISTORY

351       January 2015, Originally compiled by Eric Paris (eparis at  redhat  dot
352       com)  based  on the kubernetes source material, but hopefully they have
353       been automatically generated since!
354
355
356
357Eric Paris                  kubernetes User Manuals              KUBERNETES(1)
Impressum