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

NAME

6       kubectl config set - Sets an individual value in a kubeconfig file
7
8
9

SYNOPSIS

11       kubectl config set [OPTIONS]
12
13
14

DESCRIPTION

16       Sets an individual value in a kubeconfig file
17
18
19       PROPERTY_NAME is a dot delimited name where each token represents
20       either an attribute name or a map key.  Map keys may not contain dots.
21
22
23       PROPERTY_VALUE is the new value you wish to set. Binary fields such as
24       'certificate-authority-data' expect a base64 encoded string unless the
25       --set-raw-bytes flag is used.
26
27
28       Specifying a attribute name that already exists will merge new fields
29       on top of existing values.
30
31
32

OPTIONS

34       --set-raw-bytes=false
35           When writing a []byte PROPERTY_VALUE, write the given string
36       directly without base64 decoding.
37
38
39

OPTIONS INHERITED FROM PARENT COMMANDS

41       --add-dir-header=false
42           If true, adds the file directory to the header
43
44
45       --alsologtostderr=false
46           log to standard error as well as files
47
48
49       --application-metrics-count-limit=100
50           Max number of application metrics to store (per container)
51
52
53       --as=""
54           Username to impersonate for the operation
55
56
57       --as-group=[]
58           Group to impersonate for the operation, this flag can be repeated
59       to specify multiple groups.
60
61
62       --azure-container-registry-config=""
63           Path to the file containing Azure container registry configuration
64       information.
65
66
67       --boot-id-file="/proc/sys/kernel/random/boot_id"
68           Comma-separated list of files to check for boot-id. Use the first
69       one that exists.
70
71
72       --cache-dir="/builddir/.kube/http-cache"
73           Default HTTP cache directory
74
75
76       --certificate-authority=""
77           Path to a cert file for the certificate authority
78
79
80       --client-certificate=""
81           Path to a client certificate file for TLS
82
83
84       --client-key=""
85           Path to a client key file for TLS
86
87
88       --cloud-provider-gce-l7lb-src-cidrs=130.211.0.0/22,35.191.0.0/16
89           CIDRs opened in GCE firewall for L7 LB traffic proxy  health checks
90
91
92       --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
93           CIDRs opened in GCE firewall for L4 LB traffic proxy  health checks
94
95
96       --cluster=""
97           The name of the kubeconfig cluster to use
98
99
100       --container-hints="/etc/cadvisor/container_hints.json"
101           location of the container hints file
102
103
104       --containerd="/run/containerd/containerd.sock"
105           containerd endpoint
106
107
108       --containerd-namespace="k8s.io"
109           containerd namespace
110
111
112       --context=""
113           The name of the kubeconfig context to use
114
115
116       --default-not-ready-toleration-seconds=300
117           Indicates the tolerationSeconds of the toleration for
118       notReady:NoExecute that is added by default to every pod that does not
119       already have such a toleration.
120
121
122       --default-unreachable-toleration-seconds=300
123           Indicates the tolerationSeconds of the toleration for
124       unreachable:NoExecute that is added by default to every pod that does
125       not already have such a toleration.
126
127
128       --disable-root-cgroup-stats=false
129           Disable collecting root Cgroup stats
130
131
132       --docker="unix:///var/run/docker.sock"
133           docker endpoint
134
135
136       --docker-env-metadata-whitelist=""
137           a comma-separated list of environment variable keys that needs to
138       be collected for docker containers
139
140
141       --docker-only=false
142           Only report docker containers in addition to root stats
143
144
145       --docker-root="/var/lib/docker"
146           DEPRECATED: docker root is read from docker info (this is a
147       fallback, default: /var/lib/docker)
148
149
150       --docker-tls=false
151           use TLS to connect to docker
152
153
154       --docker-tls-ca="ca.pem"
155           path to trusted CA
156
157
158       --docker-tls-cert="cert.pem"
159           path to client certificate
160
161
162       --docker-tls-key="key.pem"
163           path to private key
164
165
166       --enable-load-reader=false
167           Whether to enable cpu load reader
168
169
170       --event-storage-age-limit="default=0"
171           Max length of time for which to store events (per type). Value is a
172       comma separated list of key values, where the keys are event types
173       (e.g.: creation, oom) or "default" and the value is a duration. Default
174       is applied to all non-specified event types
175
176
177       --event-storage-event-limit="default=0"
178           Max number of events to store (per type). Value is a comma
179       separated list of key values, where the keys are event types (e.g.:
180       creation, oom) or "default" and the value is an integer. Default is
181       applied to all non-specified event types
182
183
184       --global-housekeeping-interval=1m0s
185           Interval between global housekeepings
186
187
188       --housekeeping-interval=10s
189           Interval between container housekeepings
190
191
192       --insecure-skip-tls-verify=false
193           If true, the server's certificate will not be checked for validity.
194       This will make your HTTPS connections insecure
195
196
197       --kubeconfig=""
198           use a particular kubeconfig file
199
200
201       --log-backtrace-at=:0
202           when logging hits line file:N, emit a stack trace
203
204
205       --log-cadvisor-usage=false
206           Whether to log the usage of the cAdvisor container
207
208
209       --log-dir=""
210           If non-empty, write log files in this directory
211
212
213       --log-file=""
214           If non-empty, use this log file
215
216
217       --log-file-max-size=1800
218           Defines the maximum size a log file can grow to. Unit is megabytes.
219       If the value is 0, the maximum file size is unlimited.
220
221
222       --log-flush-frequency=5s
223           Maximum number of seconds between log flushes
224
225
226       --logtostderr=true
227           log to standard error instead of files
228
229
230       --machine-id-file="/etc/machine-id,/var/lib/dbus/machine-id"
231           Comma-separated list of files to check for machine-id. Use the
232       first one that exists.
233
234
235       --match-server-version=false
236           Require server version to match client version
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
249       (none|cpu|heap|goroutine|threadcreate|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       --skip-log-headers=false
271           If true, avoid headers when opening log files
272
273
274       --stderrthreshold=2
275           logs at or above this threshold go to stderr
276
277
278       --storage-driver-buffer-duration=1m0s
279           Writes in the storage driver will be buffered for this duration,
280       and committed to the non memory backends as a single transaction
281
282
283       --storage-driver-db="cadvisor"
284           database name
285
286
287       --storage-driver-host="localhost:8086"
288           database host:port
289
290
291       --storage-driver-password="root"
292           database password
293
294
295       --storage-driver-secure=false
296           use secure connection with database
297
298
299       --storage-driver-table="stats"
300           table name
301
302
303       --storage-driver-user="root"
304           database username
305
306
307       --tls-server-name=""
308           Server name to use for server certificate validation. If it is not
309       provided, the hostname used to contact the server is used
310
311
312       --token=""
313           Bearer token for authentication to the API server
314
315
316       --update-machine-info-interval=5m0s
317           Interval between machine info updates.
318
319
320       --user=""
321           The name of the kubeconfig user to use
322
323
324       --username=""
325           Username for basic authentication to the API server
326
327
328       -v, --v=0
329           number for the log level verbosity
330
331
332       --version=false
333           Print version information and quit
334
335
336       --vmodule=
337           comma-separated list of pattern=N settings for file-filtered
338       logging
339
340
341

EXAMPLE

343                # Set server field on the my-cluster cluster to https://1.2.3.4
344                kubectl config set clusters.my-cluster.server https://1.2.3.4
345
346                # Set certificate-authority-data field on the my-cluster cluster.
347                kubectl config set clusters.my-cluster.certificate-authority-data $(echo "cert_data_here" | base64 -i -)
348
349                # Set cluster field in the my-context context to my-cluster.
350                kubectl config set contexts.my-context.cluster my-cluster
351
352                # Set client-key-data field in the cluster-admin user using --set-raw-bytes option.
353                kubectl config set users.cluster-admin.client-key-data cert_data_here --set-raw-bytes=true
354
355
356
357

SEE ALSO

359       kubectl-config(1),
360
361
362

HISTORY

364       January 2015, Originally compiled by Eric Paris (eparis at redhat dot
365       com) based on the kubernetes source material, but hopefully they have
366       been automatically generated since!
367
368
369
370Eric Paris                  kubernetes User Manuals              KUBERNETES(1)
Impressum