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 creden‐
37       tials.  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=false
71           If  true, only print the object that would be sent, without sending
72       it.
73
74
75       --from-file=[]
76           Key files can be specified using their file path, in which  case  a
77       default  name will be given to them, or optionally with a name and file
78       path, in which case the given name will be used.  Specifying  a  direc‐
79       tory  will  iterate  each  named  file in the directory that is a valid
80       secret key.
81
82
83       --generator="secret-for-docker-registry/v1"
84           The name of the API generator to use.
85
86
87       -o, --output=""
88           Output   format.   One    of:    json|yaml|name|go-template|go-tem‐
89       plate-file|template|templatefile|jsonpath|jsonpath-file.
90
91
92       --save-config=false
93           If  true,  the configuration of current object will be saved in its
94       annotation. Otherwise, the annotation will be unchanged. This  flag  is
95       useful  when  you  want  to perform kubectl apply on this object in the
96       future.
97
98
99       --template=""
100           Template string or path to template file  to  use  when  -o=go-tem‐
101       plate,  -o=go-template-file.  The template format is golang templates [
102http://golang.org/pkg/text/template/#pkg-overview⟩].
103
104
105       --validate=true
106           If true, use a schema to validate the input before sending it
107
108
109

OPTIONS INHERITED FROM PARENT COMMANDS

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

EXAMPLE

396                # If you don't already have a .dockercfg file, you can create a dockercfg secret directly by using:
397                kubectl create secret docker-registry my-secret --docker-server=DOCKER_REGISTRY_SERVER --docker-username=DOCKER_USER --docker-password=DOCKER_PASSWORD --docker-email=DOCKER_EMAIL
398
399
400
401

SEE ALSO

403       kubectl-create-secret(1),
404
405
406

HISTORY

408       January 2015, Originally compiled by Eric Paris (eparis at  redhat  dot
409       com)  based  on the kubernetes source material, but hopefully they have
410       been automatically generated since!
411
412
413
414Eric Paris                  kubernetes User Manuals              KUBERNETES(1)
Impressum