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

NAME

6       kubectl  config  rename-context - Renames a context from the kubeconfig
7       file.
8
9
10

SYNOPSIS

12       kubectl config rename-context [OPTIONS]
13
14
15

DESCRIPTION

17       Renames a context from the kubeconfig file.
18
19
20       CONTEXT_NAME is the context name that you wish to change.
21
22
23       NEW_NAME is the new name you wish to set.
24
25
26       Note: In case the context being renamed is the 'current-context',  this
27       field will also be updated.
28
29
30

OPTIONS INHERITED FROM PARENT COMMANDS

32       --alsologtostderr=false
33           log to standard error as well as files
34
35
36       --application-metrics-count-limit=100
37           Max number of application metrics to store (per container)
38
39
40       --as=""
41           Username to impersonate for the operation
42
43
44       --as-group=[]
45           Group  to  impersonate for the operation, this flag can be repeated
46       to specify multiple groups.
47
48
49       --azure-container-registry-config=""
50           Path to the file containing Azure container registry  configuration
51       information.
52
53
54       --boot-id-file="/proc/sys/kernel/random/boot_id"
55           Comma-separated  list  of files to check for boot-id. Use the first
56       one that exists.
57
58
59       --cache-dir="/builddir/.kube/http-cache"
60           Default HTTP cache directory
61
62
63       --certificate-authority=""
64           Path to a cert file for the certificate authority
65
66
67       --client-certificate=""
68           Path to a client certificate file for TLS
69
70
71       --client-key=""
72           Path to a client key file for TLS
73
74
75       --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
76           CIDRs opened in GCE firewall for LB traffic proxy  health checks
77
78
79       --cluster=""
80           The name of the kubeconfig cluster to use
81
82
83       --container-hints="/etc/cadvisor/container_hints.json"
84           location of the container hints file
85
86
87       --containerd="/run/containerd/containerd.sock"
88           containerd endpoint
89
90
91       --containerd-namespace="k8s.io"
92           containerd namespace
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       --housekeeping-interval=10s
168           Interval between container housekeepings
169
170
171       --insecure-skip-tls-verify=false
172           If true, the server's certificate will not be checked for validity.
173       This will make your HTTPS connections insecure
174
175
176       --kubeconfig=""
177           use a particular kubeconfig file
178
179
180       --log-backtrace-at=:0
181           when logging hits line file:N, emit a stack trace
182
183
184       --log-cadvisor-usage=false
185           Whether to log the usage of the cAdvisor container
186
187
188       --log-dir=""
189           If non-empty, write log files in this directory
190
191
192       --log-file=""
193           If non-empty, use this log file
194
195
196       --log-file-max-size=1800
197           Defines the maximum size a log file can grow to. Unit is megabytes.
198       If the value is 0, the maximum file size is unlimited.
199
200
201       --log-flush-frequency=5s
202           Maximum number of seconds between log flushes
203
204
205       --logtostderr=true
206           log to standard error instead of files
207
208
209       --machine-id-file="/etc/machine-id,/var/lib/dbus/machine-id"
210           Comma-separated  list  of  files  to  check for machine-id. Use the
211       first one that exists.
212
213
214       --match-server-version=false
215           Require server version to match client version
216
217
218       -n, --namespace=""
219           If present, the namespace scope for this CLI request
220
221
222       --password=""
223           Password for basic authentication to the API server
224
225
226       --profile="none"
227           Name of profile to capture. One of (none|cpu|heap|goroutine|thread‐
228       create|block|mutex)
229
230
231       --profile-output="profile.pprof"
232           Name of the file to write the profile to
233
234
235       --request-timeout="0"
236           The  length  of  time  to  wait before giving up on a single server
237       request. Non-zero values should contain a corresponding time unit (e.g.
238       1s, 2m, 3h). A value of zero means don't timeout requests.
239
240
241       -s, --server=""
242           The address and port of the Kubernetes API server
243
244
245       --skip-headers=false
246           If true, avoid header prefixes in the log messages
247
248
249       --skip-log-headers=false
250           If true, avoid headers when opening log files
251
252
253       --stderrthreshold=2
254           logs at or above this threshold go to stderr
255
256
257       --storage-driver-buffer-duration=1m0s
258           Writes  in  the  storage driver will be buffered for this duration,
259       and committed to the non memory backends as a single transaction
260
261
262       --storage-driver-db="cadvisor"
263           database name
264
265
266       --storage-driver-host="localhost:8086"
267           database host:port
268
269
270       --storage-driver-password="root"
271           database password
272
273
274       --storage-driver-secure=false
275           use secure connection with database
276
277
278       --storage-driver-table="stats"
279           table name
280
281
282       --storage-driver-user="root"
283           database username
284
285
286       --token=""
287           Bearer token for authentication to the API server
288
289
290       --update-machine-info-interval=5m0s
291           Interval between machine info updates.
292
293
294       --user=""
295           The name of the kubeconfig user to use
296
297
298       --username=""
299           Username for basic authentication to the API server
300
301
302       -v, --v=0
303           number for the log level verbosity
304
305
306       --version=false
307           Print version information and quit
308
309
310       --vmodule=
311           comma-separated list of pattern=N settings for  file-filtered  log‐
312       ging
313
314
315

EXAMPLE

317                # Rename the context 'old-name' to 'new-name' in your kubeconfig file
318                kubectl config rename-context old-name new-name
319
320
321
322

SEE ALSO

324       kubectl-config(1),
325
326
327

HISTORY

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