1KUBERNETES(1) Jan 2015 KUBERNETES(1)
2
3
4
6 kubectl create secret docker-registry - Create a secret for use with a
7 Docker registry
8
9
10
12 kubectl create secret docker-registry [OPTIONS]
13
14
15
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
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|template|go-template|go-tem‐
89 plate-file|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 [
102 ⟨http://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
111 --allow-verification-with-non-compliant-keys=false
112 Allow a SignatureVerifier to use keys which are technically
113 non-compliant with RFC6962.
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-lb-src-cidrs=130.211.0.0/22,209.85.152.0/22,209.85.204.0/22,35.191.0.0/16
160 CIDRs opened in GCE firewall for LB traffic proxy health checks
161
162
163 --cluster=""
164 The name of the kubeconfig cluster to use
165
166
167 --container-hints="/etc/cadvisor/container_hints.json"
168 location of the container hints file
169
170
171 --containerd="unix:///var/run/containerd.sock"
172 containerd endpoint
173
174
175 --context=""
176 The name of the kubeconfig context to use
177
178
179 --default-not-ready-toleration-seconds=300
180 Indicates the tolerationSeconds of the toleration for
181 notReady:NoExecute that is added by default to every pod that does not
182 already have such a toleration.
183
184
185 --default-unreachable-toleration-seconds=300
186 Indicates the tolerationSeconds of the toleration for unreach‐
187 able:NoExecute that is added by default to every pod that does not
188 already have such a toleration.
189
190
191 --docker="unix:///var/run/docker.sock"
192 docker endpoint
193
194
195 --docker-env-metadata-whitelist=""
196 a comma-separated list of environment variable keys that needs to
197 be collected for docker containers
198
199
200 --docker-only=false
201 Only report docker containers in addition to root stats
202
203
204 --docker-root="/var/lib/docker"
205 DEPRECATED: docker root is read from docker info (this is a fall‐
206 back, default: /var/lib/docker)
207
208
209 --docker-tls=false
210 use TLS to connect to docker
211
212
213 --docker-tls-ca="ca.pem"
214 path to trusted CA
215
216
217 --docker-tls-cert="cert.pem"
218 path to client certificate
219
220
221 --docker-tls-key="key.pem"
222 path to private key
223
224
225 --enable-load-reader=false
226 Whether to enable cpu load reader
227
228
229 --event-storage-age-limit="default=0"
230 Max length of time for which to store events (per type). Value is a
231 comma separated list of key values, where the keys are event types
232 (e.g.: creation, oom) or "default" and the value is a duration. Default
233 is applied to all non-specified event types
234
235
236 --event-storage-event-limit="default=0"
237 Max number of events to store (per type). Value is a comma sepa‐
238 rated list of key values, where the keys are event types (e.g.: cre‐
239 ation, oom) or "default" and the value is an integer. Default is
240 applied to all non-specified event types
241
242
243 --global-housekeeping-interval=1m0s
244 Interval between global housekeepings
245
246
247 --google-json-key=""
248 The Google Cloud Platform Service Account JSON Key to use for
249 authentication.
250
251
252 --housekeeping-interval=10s
253 Interval between container housekeepings
254
255
256 --insecure-skip-tls-verify=false
257 If true, the server's certificate will not be checked for validity.
258 This will make your HTTPS connections insecure
259
260
261 --kubeconfig=""
262 Path to the kubeconfig file to use for CLI requests.
263
264
265 --log-backtrace-at=:0
266 when logging hits line file:N, emit a stack trace
267
268
269 --log-cadvisor-usage=false
270 Whether to log the usage of the cAdvisor container
271
272
273 --log-dir=""
274 If non-empty, write log files in this directory
275
276
277 --log-flush-frequency=5s
278 Maximum number of seconds between log flushes
279
280
281 --logtostderr=true
282 log to standard error instead of files
283
284
285 --machine-id-file="/etc/machine-id,/var/lib/dbus/machine-id"
286 Comma-separated list of files to check for machine-id. Use the
287 first one that exists.
288
289
290 --match-server-version=false
291 Require server version to match client version
292
293
294 --mesos-agent="127.0.0.1:5051"
295 Mesos agent address
296
297
298 --mesos-agent-timeout=10s
299 Mesos agent timeout
300
301
302 -n, --namespace=""
303 If present, the namespace scope for this CLI request
304
305
306 --request-timeout="0"
307 The length of time to wait before giving up on a single server
308 request. Non-zero values should contain a corresponding time unit (e.g.
309 1s, 2m, 3h). A value of zero means don't timeout requests.
310
311
312 -s, --server=""
313 The address and port of the Kubernetes API server
314
315
316 --stderrthreshold=2
317 logs at or above this threshold go to stderr
318
319
320 --storage-driver-buffer-duration=1m0s
321 Writes in the storage driver will be buffered for this duration,
322 and committed to the non memory backends as a single transaction
323
324
325 --storage-driver-db="cadvisor"
326 database name
327
328
329 --storage-driver-host="localhost:8086"
330 database host:port
331
332
333 --storage-driver-password="root"
334 database password
335
336
337 --storage-driver-secure=false
338 use secure connection with database
339
340
341 --storage-driver-table="stats"
342 table name
343
344
345 --storage-driver-user="root"
346 database username
347
348
349 --token=""
350 Bearer token for authentication to the API server
351
352
353 --user=""
354 The name of the kubeconfig user to use
355
356
357 -v, --v=0
358 log level for V logs
359
360
361 --version=false
362 Print version information and quit
363
364
365 --vmodule=
366 comma-separated list of pattern=N settings for file-filtered log‐
367 ging
368
369
370
372 # If you don't already have a .dockercfg file, you can create a dockercfg secret directly by using:
373 kubectl create secret docker-registry my-secret --docker-server=DOCKER_REGISTRY_SERVER --docker-username=DOCKER_USER --docker-password=DOCKER_PASSWORD --docker-email=DOCKER_EMAIL
374
375
376
377
379 kubectl-create-secret(1),
380
381
382
384 January 2015, Originally compiled by Eric Paris (eparis at redhat dot
385 com) based on the kubernetes source material, but hopefully they have
386 been automatically generated since!
387
388
389
390Eric Paris kubernetes User Manuals KUBERNETES(1)