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