1KUBERNETES(1)(kubernetes) KUBERNETES(1)(kubernetes)
2
3
4
5Eric Paris Jan 2015
6
7
9 kubectl config rename-context - Rename a context from the kubeconfig
10 file
11
12
13
15 kubectl config rename-context [OPTIONS]
16
17
18
20 Renames a context from the kubeconfig file.
21
22
23 CONTEXT_NAME is the context name that you want to change.
24
25
26 NEW_NAME is the new name you want to set.
27
28
29 Note: If the context being renamed is the 'current-context', this field
30 will also be updated.
31
32
33
35 --as="" Username to impersonate for the operation. User could be a
36 regular user or a service account in a namespace.
37
38
39 --as-group=[] Group to impersonate for the operation, this flag
40 can be repeated to specify multiple groups.
41
42
43 --as-uid="" UID to impersonate for the operation.
44
45
46 --azure-container-registry-config="" Path to the file containing
47 Azure container registry configuration information.
48
49
50 --cache-dir="/builddir/.kube/cache" Default cache directory
51
52
53 --certificate-authority="" Path to a cert file for the certificate
54 authority
55
56
57 --client-certificate="" Path to a client certificate file for TLS
58
59
60 --client-key="" Path to a client key file for TLS
61
62
63 --cluster="" The name of the kubeconfig cluster to use
64
65
66 --context="" The name of the kubeconfig context to use
67
68
69 --insecure-skip-tls-verify=false If true, the server's certificate
70 will not be checked for validity. This will make your HTTPS connections
71 insecure
72
73
74 --kubeconfig="" use a particular kubeconfig file
75
76
77 --match-server-version=false Require server version to match
78 client version
79
80
81 -n, --namespace="" If present, the namespace scope for this CLI
82 request
83
84
85 --password="" Password for basic authentication to the API server
86
87
88 --profile="none" Name of profile to capture. One of
89 (none|cpu|heap|goroutine|threadcreate|block|mutex)
90
91
92 --profile-output="profile.pprof" Name of the file to write the
93 profile to
94
95
96 --request-timeout="0" The length of time to wait before giving up
97 on a single server request. Non-zero values should contain a corre‐
98 sponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't time‐
99 out requests.
100
101
102 -s, --server="" The address and port of the Kubernetes API server
103
104
105 --tls-server-name="" Server name to use for server certificate
106 validation. If it is not provided, the hostname used to contact the
107 server is used
108
109
110 --token="" Bearer token for authentication to the API server
111
112
113 --user="" The name of the kubeconfig user to use
114
115
116 --username="" Username for basic authentication to the API server
117
118
119 --version=false Print version information and quit
120
121
122 --warnings-as-errors=false Treat warnings received from the server
123 as errors and exit with a non-zero exit code
124
125
126
128 # Rename the context 'old-name' to 'new-name' in your kubeconfig file
129 kubectl config rename-context old-name new-name
130
131
132
133
135 kubectl-config(1),
136
137
138
140 January 2015, Originally compiled by Eric Paris (eparis at redhat dot
141 com) based on the kubernetes source material, but hopefully they have
142 been automatically generated since!
143
144
145
146Manuals User KUBERNETES(1)(kubernetes)