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

EXAMPLE

326                # Set server field on the my-cluster cluster to https://1.2.3.4
327                kubectl config set clusters.my-cluster.server https://1.2.3.4
328
329                # Set certificate-authority-data field on the my-cluster cluster.
330                kubectl config set clusters.my-cluster.certificate-authority-data $(echo "cert_data_here" | base64 -i -)
331
332                # Set cluster field in the my-context context to my-cluster.
333                kubectl config set contexts.my-context.cluster my-cluster
334
335                # Set client-key-data field in the cluster-admin user using --set-raw-bytes option.
336                kubectl config set users.cluster-admin.client-key-data cert_data_here --set-raw-bytes=true
337
338
339
340

SEE ALSO

342       kubectl-config(1),
343
344
345

HISTORY

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