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

NAME

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

SYNOPSIS

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

DESCRIPTION

16       Sets a context entry in kubeconfig
17
18
19       Specifying  a  name that already exists will merge new fields on top of
20       existing values for those fields.
21
22
23

OPTIONS

25       --current=false
26           Modify the current context
27
28
29

OPTIONS INHERITED FROM PARENT COMMANDS

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

EXAMPLE

316                # Set the user field on the gce context entry without touching other values
317                kubectl config set-context gce --user=cluster-admin
318
319
320
321

SEE ALSO

323       kubectl-config(1),
324
325
326

HISTORY

328       January 2015, Originally compiled by Eric Paris (eparis at  redhat  dot
329       com)  based  on the kubernetes source material, but hopefully they have
330       been automatically generated since!
331
332
333
334Eric Paris                  kubernetes User Manuals              KUBERNETES(1)
Impressum