1KUBERNETES(1)(kubernetes)                            KUBERNETES(1)(kubernetes)
2
3
4
5Eric Paris Jan 2015
6
7

NAME

9       kubectl config set - Set an individual value in a kubeconfig file
10
11
12

SYNOPSIS

14       kubectl config set [OPTIONS]
15
16
17

DESCRIPTION

19       Set an individual value in a kubeconfig file.
20
21
22       PROPERTY_NAME  is  a dot delimited name where each token represents ei‐
23       ther an attribute name or a map key.  Map keys may not contain dots.
24
25
26       PROPERTY_VALUE is the new value you want to set. Binary fields such  as
27       'certificate-authority-data'  expect a base64 encoded string unless the
28       --set-raw-bytes flag is used.
29
30
31       Specifying an attribute name that already exists will merge new  fields
32       on top of existing values.
33
34
35

OPTIONS

37       --set-raw-bytes=false       When writing a []byte PROPERTY_VALUE, write
38       the given string directly without base64 decoding.
39
40
41

OPTIONS INHERITED FROM PARENT COMMANDS

43       --as=""      Username to impersonate for the operation. User could be a
44       regular user or a service account in a namespace.
45
46
47       --as-group=[]       Group  to  impersonate for the operation, this flag
48       can be repeated to specify multiple groups.
49
50
51       --as-uid=""      UID to impersonate for the operation.
52
53
54       --azure-container-registry-config=""      Path to the  file  containing
55       Azure container registry configuration information.
56
57
58       --cache-dir="/builddir/.kube/cache"      Default cache directory
59
60
61       --certificate-authority=""      Path to a cert file for the certificate
62       authority
63
64
65       --client-certificate=""      Path to a client certificate file for TLS
66
67
68       --client-key=""      Path to a client key file for TLS
69
70
71       --cluster=""      The name of the kubeconfig cluster to use
72
73
74       --context=""      The name of the kubeconfig context to use
75
76
77       --disable-compression=false      If true, opt-out of response  compres‐
78       sion for all requests to the server
79
80
81       --insecure-skip-tls-verify=false      If true, the server's certificate
82       will not be checked for validity. This will make your HTTPS connections
83       insecure
84
85
86       --kubeconfig=""      use a particular kubeconfig file
87
88
89       --match-server-version=false        Require  server  version  to  match
90       client version
91
92
93       -n, --namespace=""      If present, the namespace scope  for  this  CLI
94       request
95
96
97       --password=""      Password for basic authentication to the API server
98
99
100       --profile="none"         Name   of   profile   to   capture.   One   of
101       (none|cpu|heap|goroutine|threadcreate|block|mutex)
102
103
104       --profile-output="profile.pprof"      Name of the  file  to  write  the
105       profile to
106
107
108       --request-timeout="0"       The length of time to wait before giving up
109       on a single server request. Non-zero values  should  contain  a  corre‐
110       sponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't time‐
111       out requests.
112
113
114       -s, --server=""      The address and port of the Kubernetes API server
115
116
117       --tls-server-name=""      Server name to  use  for  server  certificate
118       validation.  If  it  is  not provided, the hostname used to contact the
119       server is used
120
121
122       --token=""      Bearer token for authentication to the API server
123
124
125       --user=""      The name of the kubeconfig user to use
126
127
128       --username=""      Username for basic authentication to the API server
129
130
131       --version=false      Print version information and quit
132
133
134       --warnings-as-errors=false      Treat warnings received from the server
135       as errors and exit with a non-zero exit code
136
137
138

EXAMPLE

140                # Set the server field on the my-cluster cluster to https://1.2.3.4
141                kubectl config set clusters.my-cluster.server https://1.2.3.4
142
143                # Set the certificate-authority-data field on the my-cluster cluster
144                kubectl config set clusters.my-cluster.certificate-authority-data $(echo "cert_data_here" | base64 -i -)
145
146                # Set the cluster field in the my-context context to my-cluster
147                kubectl config set contexts.my-context.cluster my-cluster
148
149                # Set the client-key-data field in the cluster-admin user using --set-raw-bytes option
150                kubectl config set users.cluster-admin.client-key-data cert_data_here --set-raw-bytes=true
151
152
153
154

SEE ALSO

156       kubectl-config(1),
157
158
159

HISTORY

161       January  2015,  Originally compiled by Eric Paris (eparis at redhat dot
162       com) based on the kubernetes source material, but hopefully  they  have
163       been automatically generated since!
164
165
166
167Manuals                              User            KUBERNETES(1)(kubernetes)
Impressum