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="unix:///var/run/containerd.sock"
167           containerd endpoint
168
169
170       --context=""
171           The name of the kubeconfig context to use
172
173
174       --default-not-ready-toleration-seconds=300
175           Indicates   the   tolerationSeconds   of   the    toleration    for
176       notReady:NoExecute  that is added by default to every pod that does not
177       already have such a toleration.
178
179
180       --default-unreachable-toleration-seconds=300
181           Indicates the tolerationSeconds  of  the  toleration  for  unreach‐
182       able:NoExecute  that  is  added  by  default to every pod that does not
183       already have such a toleration.
184
185
186       --docker="unix:///var/run/docker.sock"
187           docker endpoint
188
189
190       --docker-env-metadata-whitelist=""
191           a comma-separated list of environment variable keys that  needs  to
192       be collected for docker containers
193
194
195       --docker-only=false
196           Only report docker containers in addition to root stats
197
198
199       --docker-root="/var/lib/docker"
200           DEPRECATED:  docker  root is read from docker info (this is a fall‐
201       back, default: /var/lib/docker)
202
203
204       --docker-tls=false
205           use TLS to connect to docker
206
207
208       --docker-tls-ca="ca.pem"
209           path to trusted CA
210
211
212       --docker-tls-cert="cert.pem"
213           path to client certificate
214
215
216       --docker-tls-key="key.pem"
217           path to private key
218
219
220       --enable-load-reader=false
221           Whether to enable cpu load reader
222
223
224       --event-storage-age-limit="default=0"
225           Max length of time for which to store events (per type). Value is a
226       comma  separated  list  of  key  values, where the keys are event types
227       (e.g.: creation, oom) or "default" and the value is a duration. Default
228       is applied to all non-specified event types
229
230
231       --event-storage-event-limit="default=0"
232           Max  number  of  events to store (per type). Value is a comma sepa‐
233       rated list of key values, where the keys are event  types  (e.g.:  cre‐
234       ation,  oom)  or  "default"  and  the  value  is an integer. Default is
235       applied to all non-specified event types
236
237
238       --global-housekeeping-interval=1m0s
239           Interval between global housekeepings
240
241
242       --housekeeping-interval=10s
243           Interval between container housekeepings
244
245
246       --insecure-skip-tls-verify=false
247           If true, the server's certificate will not be checked for validity.
248       This will make your HTTPS connections insecure
249
250
251       --kubeconfig=""
252           Path to the kubeconfig file to use for CLI requests.
253
254
255       --log-backtrace-at=:0
256           when logging hits line file:N, emit a stack trace
257
258
259       --log-cadvisor-usage=false
260           Whether to log the usage of the cAdvisor container
261
262
263       --log-dir=""
264           If non-empty, write log files in this directory
265
266
267       --log-file=""
268           If non-empty, use this log file
269
270
271       --log-flush-frequency=5s
272           Maximum number of seconds between log flushes
273
274
275       --logtostderr=true
276           log to standard error instead of files
277
278
279       --machine-id-file="/etc/machine-id,/var/lib/dbus/machine-id"
280           Comma-separated  list  of  files  to  check for machine-id. Use the
281       first one that exists.
282
283
284       --match-server-version=false
285           Require server version to match client version
286
287
288       --mesos-agent="127.0.0.1:5051"
289           Mesos agent address
290
291
292       --mesos-agent-timeout=10s
293           Mesos agent timeout
294
295
296       -n, --namespace=""
297           If present, the namespace scope for this CLI request
298
299
300       --password=""
301           Password for basic authentication to the API server
302
303
304       --profile="none"
305           Name of profile to capture. One of (none|cpu|heap|goroutine|thread‐
306       create|block|mutex)
307
308
309       --profile-output="profile.pprof"
310           Name of the file to write the profile to
311
312
313       --request-timeout="0"
314           The  length  of  time  to  wait before giving up on a single server
315       request. Non-zero values should contain a corresponding time unit (e.g.
316       1s, 2m, 3h). A value of zero means don't timeout requests.
317
318
319       -s, --server=""
320           The address and port of the Kubernetes API server
321
322
323       --skip-headers=false
324           If true, avoid header prefixes in the log messages
325
326
327       --stderrthreshold=2
328           logs at or above this threshold go to stderr
329
330
331       --storage-driver-buffer-duration=1m0s
332           Writes  in  the  storage driver will be buffered for this duration,
333       and committed to the non memory backends as a single transaction
334
335
336       --storage-driver-db="cadvisor"
337           database name
338
339
340       --storage-driver-host="localhost:8086"
341           database host:port
342
343
344       --storage-driver-password="root"
345           database password
346
347
348       --storage-driver-secure=false
349           use secure connection with database
350
351
352       --storage-driver-table="stats"
353           table name
354
355
356       --storage-driver-user="root"
357           database username
358
359
360       --token=""
361           Bearer token for authentication to the API server
362
363
364       --user=""
365           The name of the kubeconfig user to use
366
367
368       --username=""
369           Username for basic authentication to the API server
370
371
372       -v, --v=0
373           log level for V logs
374
375
376       --version=false
377           Print version information and quit
378
379
380       --vmodule=
381           comma-separated list of pattern=N settings for  file-filtered  log‐
382       ging
383
384
385

EXAMPLE

387                # If you don't already have a .dockercfg file, you can create a dockercfg secret directly by using:
388                kubectl create secret docker-registry my-secret --docker-server=DOCKER_REGISTRY_SERVER --docker-username=DOCKER_USER --docker-password=DOCKER_PASSWORD --docker-email=DOCKER_EMAIL
389
390
391
392

SEE ALSO

394       kubectl-create-secret(1),
395
396
397

HISTORY

399       January  2015,  Originally compiled by Eric Paris (eparis at redhat dot
400       com) based on the kubernetes source material, but hopefully  they  have
401       been automatically generated since!
402
403
404
405Eric Paris                  kubernetes User Manuals              KUBERNETES(1)
Impressum