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

NAME

6       kubectl create secret docker-registry - Create a secret for use with a
7       Docker registry
8
9
10

SYNOPSIS

12       kubectl create secret docker-registry [OPTIONS]
13
14
15

DESCRIPTION

17       Create a new secret for use with Docker registries.
18
19
20       Dockercfg secrets are used to authenticate against Docker registries.
21
22
23       When using the Docker command line to push images, you can authenticate
24       to a given registry by running:
25             '$ docker login DOCKER_REGISTRY_SERVER --username=DOCKER_USER
26       --password=DOCKER_PASSWORD --email=DOCKER_EMAIL'.
27
28
29       That produces a  /.dockercfg file that is used by subsequent 'docker
30       push' and 'docker pull' commands to authenticate to the registry. The
31       email address is optional.
32
33
34       When creating applications, you may have a Docker registry that
35       requires authentication.  In order for the
36         nodes to pull images on your behalf, they have to have the
37       credentials.  You can provide this information
38         by creating a dockercfg secret and attaching it to your service
39       account.
40
41
42

OPTIONS

44       --allow-missing-template-keys=true
45           If true, ignore any errors in templates when a field or map key is
46       missing in the template. Only applies to golang and jsonpath output
47       formats.
48
49
50       --append-hash=false
51           Append a hash of the secret to its name.
52
53
54       --docker-email=""
55           Email for Docker registry
56
57
58       --docker-password=""
59           Password for Docker registry authentication
60
61
62       --docker-server=" ⟨https://index.docker.io/v1/"⟩
63           Server location for Docker registry
64
65
66       --docker-username=""
67           Username for Docker registry authentication
68
69
70       --dry-run="none"
71           Must be "none", "server", or "client". If client strategy, only
72       print the object that would be sent, without sending it. If server
73       strategy, submit server-side request without persisting the resource.
74
75
76       --from-file=[]
77           Key files can be specified using their file path, in which case a
78       default name will be given to them, or optionally with a name and file
79       path, in which case the given name will be used.  Specifying a
80       directory will iterate each named file in the directory that is a valid
81       secret key.
82
83
84       --generator="secret-for-docker-registry/v1"
85           The name of the API generator to use.
86
87
88       -o, --output=""
89           Output format. One of:
90       json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.
91
92
93       --save-config=false
94           If true, the configuration of current object will be saved in its
95       annotation. Otherwise, the annotation will be unchanged. This flag is
96       useful when you want to perform kubectl apply on this object in the
97       future.
98
99
100       --template=""
101           Template string or path to template file to use when
102       -o=go-template, -o=go-template-file. The template format is golang
103       templates [ ⟨http://golang.org/pkg/text/template/#pkg-overview⟩].
104
105
106       --validate=true
107           If true, use a schema to validate the input before sending it
108
109
110

OPTIONS INHERITED FROM PARENT COMMANDS

112       --add-dir-header=false
113           If true, adds the file directory to the header
114
115
116       --alsologtostderr=false
117           log to standard error as well as files
118
119
120       --application-metrics-count-limit=100
121           Max number of application metrics to store (per container)
122
123
124       --as=""
125           Username to impersonate for the operation
126
127
128       --as-group=[]
129           Group to impersonate for the operation, this flag can be repeated
130       to specify multiple groups.
131
132
133       --azure-container-registry-config=""
134           Path to the file containing Azure container registry configuration
135       information.
136
137
138       --boot-id-file="/proc/sys/kernel/random/boot_id"
139           Comma-separated list of files to check for boot-id. Use the first
140       one that exists.
141
142
143       --cache-dir="/builddir/.kube/http-cache"
144           Default HTTP cache directory
145
146
147       --certificate-authority=""
148           Path to a cert file for the certificate authority
149
150
151       --client-certificate=""
152           Path to a client certificate file for TLS
153
154
155       --client-key=""
156           Path to a client key file for TLS
157
158
159       --cloud-provider-gce-l7lb-src-cidrs=130.211.0.0/22,35.191.0.0/16
160           CIDRs opened in GCE firewall for L7 LB traffic proxy  health checks
161
162
163       --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
164           CIDRs opened in GCE firewall for L4 LB traffic proxy  health checks
165
166
167       --cluster=""
168           The name of the kubeconfig cluster to use
169
170
171       --container-hints="/etc/cadvisor/container_hints.json"
172           location of the container hints file
173
174
175       --containerd="/run/containerd/containerd.sock"
176           containerd endpoint
177
178
179       --containerd-namespace="k8s.io"
180           containerd namespace
181
182
183       --context=""
184           The name of the kubeconfig context to use
185
186
187       --default-not-ready-toleration-seconds=300
188           Indicates the tolerationSeconds of the toleration for
189       notReady:NoExecute that is added by default to every pod that does not
190       already have such a toleration.
191
192
193       --default-unreachable-toleration-seconds=300
194           Indicates the tolerationSeconds of the toleration for
195       unreachable:NoExecute that is added by default to every pod that does
196       not already have such a toleration.
197
198
199       --disable-root-cgroup-stats=false
200           Disable collecting root Cgroup stats
201
202
203       --docker="unix:///var/run/docker.sock"
204           docker endpoint
205
206
207       --docker-env-metadata-whitelist=""
208           a comma-separated list of environment variable keys that needs to
209       be collected for docker containers
210
211
212       --docker-only=false
213           Only report docker containers in addition to root stats
214
215
216       --docker-root="/var/lib/docker"
217           DEPRECATED: docker root is read from docker info (this is a
218       fallback, default: /var/lib/docker)
219
220
221       --docker-tls=false
222           use TLS to connect to docker
223
224
225       --docker-tls-ca="ca.pem"
226           path to trusted CA
227
228
229       --docker-tls-cert="cert.pem"
230           path to client certificate
231
232
233       --docker-tls-key="key.pem"
234           path to private key
235
236
237       --enable-load-reader=false
238           Whether to enable cpu load reader
239
240
241       --event-storage-age-limit="default=0"
242           Max length of time for which to store events (per type). Value is a
243       comma separated list of key values, where the keys are event types
244       (e.g.: creation, oom) or "default" and the value is a duration. Default
245       is applied to all non-specified event types
246
247
248       --event-storage-event-limit="default=0"
249           Max number of events to store (per type). Value is a comma
250       separated list of key values, where the keys are event types (e.g.:
251       creation, oom) or "default" and the value is an integer. Default is
252       applied to all non-specified event types
253
254
255       --global-housekeeping-interval=1m0s
256           Interval between global housekeepings
257
258
259       --housekeeping-interval=10s
260           Interval between container housekeepings
261
262
263       --insecure-skip-tls-verify=false
264           If true, the server's certificate will not be checked for validity.
265       This will make your HTTPS connections insecure
266
267
268       --kubeconfig=""
269           Path to the kubeconfig file to use for CLI requests.
270
271
272       --log-backtrace-at=:0
273           when logging hits line file:N, emit a stack trace
274
275
276       --log-cadvisor-usage=false
277           Whether to log the usage of the cAdvisor container
278
279
280       --log-dir=""
281           If non-empty, write log files in this directory
282
283
284       --log-file=""
285           If non-empty, use this log file
286
287
288       --log-file-max-size=1800
289           Defines the maximum size a log file can grow to. Unit is megabytes.
290       If the value is 0, the maximum file size is unlimited.
291
292
293       --log-flush-frequency=5s
294           Maximum number of seconds between log flushes
295
296
297       --logtostderr=true
298           log to standard error instead of files
299
300
301       --machine-id-file="/etc/machine-id,/var/lib/dbus/machine-id"
302           Comma-separated list of files to check for machine-id. Use the
303       first one that exists.
304
305
306       --match-server-version=false
307           Require server version to match client version
308
309
310       -n, --namespace=""
311           If present, the namespace scope for this CLI request
312
313
314       --password=""
315           Password for basic authentication to the API server
316
317
318       --profile="none"
319           Name of profile to capture. One of
320       (none|cpu|heap|goroutine|threadcreate|block|mutex)
321
322
323       --profile-output="profile.pprof"
324           Name of the file to write the profile to
325
326
327       --request-timeout="0"
328           The length of time to wait before giving up on a single server
329       request. Non-zero values should contain a corresponding time unit (e.g.
330       1s, 2m, 3h). A value of zero means don't timeout requests.
331
332
333       -s, --server=""
334           The address and port of the Kubernetes API server
335
336
337       --skip-headers=false
338           If true, avoid header prefixes in the log messages
339
340
341       --skip-log-headers=false
342           If true, avoid headers when opening log files
343
344
345       --stderrthreshold=2
346           logs at or above this threshold go to stderr
347
348
349       --storage-driver-buffer-duration=1m0s
350           Writes in the storage driver will be buffered for this duration,
351       and committed to the non memory backends as a single transaction
352
353
354       --storage-driver-db="cadvisor"
355           database name
356
357
358       --storage-driver-host="localhost:8086"
359           database host:port
360
361
362       --storage-driver-password="root"
363           database password
364
365
366       --storage-driver-secure=false
367           use secure connection with database
368
369
370       --storage-driver-table="stats"
371           table name
372
373
374       --storage-driver-user="root"
375           database username
376
377
378       --tls-server-name=""
379           Server name to use for server certificate validation. If it is not
380       provided, the hostname used to contact the server is used
381
382
383       --token=""
384           Bearer token for authentication to the API server
385
386
387       --update-machine-info-interval=5m0s
388           Interval between machine info updates.
389
390
391       --user=""
392           The name of the kubeconfig user to use
393
394
395       --username=""
396           Username for basic authentication to the API server
397
398
399       -v, --v=0
400           number for the log level verbosity
401
402
403       --version=false
404           Print version information and quit
405
406
407       --vmodule=
408           comma-separated list of pattern=N settings for file-filtered
409       logging
410
411
412

EXAMPLE

414                # If you don't already have a .dockercfg file, you can create a dockercfg secret directly by using:
415                kubectl create secret docker-registry my-secret --docker-server=DOCKER_REGISTRY_SERVER --docker-username=DOCKER_USER --docker-password=DOCKER_PASSWORD --docker-email=DOCKER_EMAIL
416
417
418
419

SEE ALSO

421       kubectl-create-secret(1),
422
423
424

HISTORY

426       January 2015, Originally compiled by Eric Paris (eparis at redhat dot
427       com) based on the kubernetes source material, but hopefully they have
428       been automatically generated since!
429
430
431
432Eric Paris                  kubernetes User Manuals              KUBERNETES(1)
Impressum