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

EXAMPLE

292                # Set the user field on the gce context entry without touching other values
293                kubectl config set-context gce --user=cluster-admin
294
295
296
297

SEE ALSO

299       kubectl-config(1),
300
301
302

HISTORY

304       January 2015, Originally compiled by Eric Paris (eparis at  redhat  dot
305       com)  based  on the kubernetes source material, but hopefully they have
306       been automatically generated since!
307
308
309
310Eric Paris                  kubernetes User Manuals              KUBERNETES(1)
Impressum