1KUBERNETES(1) Jan 2015 KUBERNETES(1)
2
3
4
6 kubectl create secret tls - Create a TLS secret
7
8
9
11 kubectl create secret tls [OPTIONS]
12
13
14
16 Create a TLS secret from the given public/private key pair.
17
18
19 The public/private key pair must exist before hand. The public key cer‐
20 tificate must be .PEM encoded and match the given private key.
21
22
23
25 --allow-missing-template-keys=true
26 If true, ignore any errors in templates when a field or map key is
27 missing in the template. Only applies to golang and jsonpath output
28 formats.
29
30
31 --append-hash=false
32 Append a hash of the secret to its name.
33
34
35 --cert=""
36 Path to PEM encoded public key certificate.
37
38
39 --dry-run=false
40 If true, only print the object that would be sent, without sending
41 it.
42
43
44 --generator="secret-for-tls/v1"
45 The name of the API generator to use.
46
47
48 --key=""
49 Path to private key associated with given certificate.
50
51
52 -o, --output=""
53 Output format. One of: json|yaml|name|go-template|go-tem‐
54 plate-file|template|templatefile|jsonpath|jsonpath-file.
55
56
57 --save-config=false
58 If true, the configuration of current object will be saved in its
59 annotation. Otherwise, the annotation will be unchanged. This flag is
60 useful when you want to perform kubectl apply on this object in the
61 future.
62
63
64 --template=""
65 Template string or path to template file to use when -o=go-tem‐
66 plate, -o=go-template-file. The template format is golang templates [
67 ⟨http://golang.org/pkg/text/template/#pkg-overview⟩].
68
69
70 --validate=true
71 If true, use a schema to validate the input before sending it
72
73
74
76 --alsologtostderr=false
77 log to standard error as well as files
78
79
80 --application-metrics-count-limit=100
81 Max number of application metrics to store (per container)
82
83
84 --as=""
85 Username to impersonate for the operation
86
87
88 --as-group=[]
89 Group to impersonate for the operation, this flag can be repeated
90 to specify multiple groups.
91
92
93 --azure-container-registry-config=""
94 Path to the file containing Azure container registry configuration
95 information.
96
97
98 --boot-id-file="/proc/sys/kernel/random/boot_id"
99 Comma-separated list of files to check for boot-id. Use the first
100 one that exists.
101
102
103 --cache-dir="/builddir/.kube/http-cache"
104 Default HTTP cache directory
105
106
107 --certificate-authority=""
108 Path to a cert file for the certificate authority
109
110
111 --client-certificate=""
112 Path to a client certificate file for TLS
113
114
115 --client-key=""
116 Path to a client key file for TLS
117
118
119 --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
120 CIDRs opened in GCE firewall for LB traffic proxy health checks
121
122
123 --cluster=""
124 The name of the kubeconfig cluster to use
125
126
127 --container-hints="/etc/cadvisor/container_hints.json"
128 location of the container hints file
129
130
131 --containerd="/run/containerd/containerd.sock"
132 containerd endpoint
133
134
135 --containerd-namespace="k8s.io"
136 containerd namespace
137
138
139 --context=""
140 The name of the kubeconfig context to use
141
142
143 --default-not-ready-toleration-seconds=300
144 Indicates the tolerationSeconds of the toleration for
145 notReady:NoExecute that is added by default to every pod that does not
146 already have such a toleration.
147
148
149 --default-unreachable-toleration-seconds=300
150 Indicates the tolerationSeconds of the toleration for unreach‐
151 able:NoExecute that is added by default to every pod that does not
152 already have such a toleration.
153
154
155 --docker="unix:///var/run/docker.sock"
156 docker endpoint
157
158
159 --docker-env-metadata-whitelist=""
160 a comma-separated list of environment variable keys that needs to
161 be collected for docker containers
162
163
164 --docker-only=false
165 Only report docker containers in addition to root stats
166
167
168 --docker-root="/var/lib/docker"
169 DEPRECATED: docker root is read from docker info (this is a fall‐
170 back, default: /var/lib/docker)
171
172
173 --docker-tls=false
174 use TLS to connect to docker
175
176
177 --docker-tls-ca="ca.pem"
178 path to trusted CA
179
180
181 --docker-tls-cert="cert.pem"
182 path to client certificate
183
184
185 --docker-tls-key="key.pem"
186 path to private key
187
188
189 --enable-load-reader=false
190 Whether to enable cpu load reader
191
192
193 --event-storage-age-limit="default=0"
194 Max length of time for which to store events (per type). Value is a
195 comma separated list of key values, where the keys are event types
196 (e.g.: creation, oom) or "default" and the value is a duration. Default
197 is applied to all non-specified event types
198
199
200 --event-storage-event-limit="default=0"
201 Max number of events to store (per type). Value is a comma sepa‐
202 rated list of key values, where the keys are event types (e.g.: cre‐
203 ation, oom) or "default" and the value is an integer. Default is
204 applied to all non-specified event types
205
206
207 --global-housekeeping-interval=1m0s
208 Interval between global housekeepings
209
210
211 --housekeeping-interval=10s
212 Interval between container housekeepings
213
214
215 --insecure-skip-tls-verify=false
216 If true, the server's certificate will not be checked for validity.
217 This will make your HTTPS connections insecure
218
219
220 --kubeconfig=""
221 Path to the kubeconfig file to use for CLI requests.
222
223
224 --log-backtrace-at=:0
225 when logging hits line file:N, emit a stack trace
226
227
228 --log-cadvisor-usage=false
229 Whether to log the usage of the cAdvisor container
230
231
232 --log-dir=""
233 If non-empty, write log files in this directory
234
235
236 --log-file=""
237 If non-empty, use this log file
238
239
240 --log-file-max-size=1800
241 Defines the maximum size a log file can grow to. Unit is megabytes.
242 If the value is 0, the maximum file size is unlimited.
243
244
245 --log-flush-frequency=5s
246 Maximum number of seconds between log flushes
247
248
249 --logtostderr=true
250 log to standard error instead of files
251
252
253 --machine-id-file="/etc/machine-id,/var/lib/dbus/machine-id"
254 Comma-separated list of files to check for machine-id. Use the
255 first one that exists.
256
257
258 --match-server-version=false
259 Require server version to match client version
260
261
262 -n, --namespace=""
263 If present, the namespace scope for this CLI request
264
265
266 --password=""
267 Password for basic authentication to the API server
268
269
270 --profile="none"
271 Name of profile to capture. One of (none|cpu|heap|goroutine|thread‐
272 create|block|mutex)
273
274
275 --profile-output="profile.pprof"
276 Name of the file to write the profile to
277
278
279 --request-timeout="0"
280 The length of time to wait before giving up on a single server
281 request. Non-zero values should contain a corresponding time unit (e.g.
282 1s, 2m, 3h). A value of zero means don't timeout requests.
283
284
285 -s, --server=""
286 The address and port of the Kubernetes API server
287
288
289 --skip-headers=false
290 If true, avoid header prefixes in the log messages
291
292
293 --skip-log-headers=false
294 If true, avoid headers when opening log files
295
296
297 --stderrthreshold=2
298 logs at or above this threshold go to stderr
299
300
301 --storage-driver-buffer-duration=1m0s
302 Writes in the storage driver will be buffered for this duration,
303 and committed to the non memory backends as a single transaction
304
305
306 --storage-driver-db="cadvisor"
307 database name
308
309
310 --storage-driver-host="localhost:8086"
311 database host:port
312
313
314 --storage-driver-password="root"
315 database password
316
317
318 --storage-driver-secure=false
319 use secure connection with database
320
321
322 --storage-driver-table="stats"
323 table name
324
325
326 --storage-driver-user="root"
327 database username
328
329
330 --token=""
331 Bearer token for authentication to the API server
332
333
334 --update-machine-info-interval=5m0s
335 Interval between machine info updates.
336
337
338 --user=""
339 The name of the kubeconfig user to use
340
341
342 --username=""
343 Username for basic authentication to the API server
344
345
346 -v, --v=0
347 number for the log level verbosity
348
349
350 --version=false
351 Print version information and quit
352
353
354 --vmodule=
355 comma-separated list of pattern=N settings for file-filtered log‐
356 ging
357
358
359
361 # Create a new TLS secret named tls-secret with the given key pair:
362 kubectl create secret tls tls-secret --cert=path/to/tls.cert --key=path/to/tls.key
363
364
365
366
368 kubectl-create-secret(1),
369
370
371
373 January 2015, Originally compiled by Eric Paris (eparis at redhat dot
374 com) based on the kubernetes source material, but hopefully they have
375 been automatically generated since!
376
377
378
379Eric Paris kubernetes User Manuals KUBERNETES(1)