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

OPTIONS INHERITED FROM PARENT COMMANDS

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

EXAMPLE

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

SEE ALSO

353       kubectl-config(1),
354
355
356

HISTORY

358       January  2015,  Originally compiled by Eric Paris (eparis at redhat dot
359       com) based on the kubernetes source material, but hopefully  they  have
360       been automatically generated since!
361
362
363
364Eric Paris                  kubernetes User Manuals              KUBERNETES(1)
Impressum