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       --insecure-skip-tls-verify=false      If true, the server's certificate
78       will not be checked for validity. This will make your HTTPS connections
79       insecure
80
81
82       --kubeconfig=""      use a particular kubeconfig file
83
84
85       --match-server-version=false       Require  server  version  to   match
86       client version
87
88
89       -n,  --namespace=""       If  present, the namespace scope for this CLI
90       request
91
92
93       --password=""      Password for basic authentication to the API server
94
95
96       --profile="none"        Name   of   profile   to   capture.   One    of
97       (none|cpu|heap|goroutine|threadcreate|block|mutex)
98
99
100       --profile-output="profile.pprof"       Name  of  the  file to write the
101       profile to
102
103
104       --request-timeout="0"      The length of time to wait before giving  up
105       on  a  single  server  request. Non-zero values should contain a corre‐
106       sponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't time‐
107       out requests.
108
109
110       -s, --server=""      The address and port of the Kubernetes API server
111
112
113       --tls-server-name=""       Server  name  to  use for server certificate
114       validation. If it is not provided, the hostname  used  to  contact  the
115       server is used
116
117
118       --token=""      Bearer token for authentication to the API server
119
120
121       --user=""      The name of the kubeconfig user to use
122
123
124       --username=""      Username for basic authentication to the API server
125
126
127       --version=false      Print version information and quit
128
129
130       --warnings-as-errors=false      Treat warnings received from the server
131       as errors and exit with a non-zero exit code
132
133
134

EXAMPLE

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

SEE ALSO

152       kubectl-config(1),
153
154
155

HISTORY

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