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

EXAMPLE

307                # Set the user field on the gce context entry without touching other values
308                kubectl config set-context gce --user=cluster-admin
309
310
311
312

SEE ALSO

314       kubectl-config(1),
315
316
317

HISTORY

319       January  2015,  Originally compiled by Eric Paris (eparis at redhat dot
320       com) based on the kubernetes source material, but hopefully  they  have
321       been automatically generated since!
322
323
324
325Eric Paris                  kubernetes User Manuals              KUBERNETES(1)
Impressum