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

NAME

6       kubectl create cronjob - Create a cronjob with the specified name.
7
8
9

SYNOPSIS

11       kubectl create cronjob [OPTIONS]
12
13
14

DESCRIPTION

16       Create a cronjob with the specified name.
17
18
19

OPTIONS

21       --allow-missing-template-keys=true
22           If true, ignore any errors in templates when a field or map key is
23       missing in the template. Only applies to golang and jsonpath output
24       formats.
25
26
27       --dry-run="none"
28           Must be "none", "server", or "client". If client strategy, only
29       print the object that would be sent, without sending it. If server
30       strategy, submit server-side request without persisting the resource.
31
32
33       --image=""
34           Image name to run.
35
36
37       -o, --output=""
38           Output format. One of:
39       json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.
40
41
42       --restart=""
43           job's restart policy. supported values: OnFailure, Never
44
45
46       --save-config=false
47           If true, the configuration of current object will be saved in its
48       annotation. Otherwise, the annotation will be unchanged. This flag is
49       useful when you want to perform kubectl apply on this object in the
50       future.
51
52
53       --schedule=""
54           A schedule in the Cron format the job should be run with.
55
56
57       --template=""
58           Template string or path to template file to use when
59       -o=go-template, -o=go-template-file. The template format is golang
60       templates [ ⟨http://golang.org/pkg/text/template/#pkg-overview⟩].
61
62
63       --validate=true
64           If true, use a schema to validate the input before sending it
65
66
67

OPTIONS INHERITED FROM PARENT COMMANDS

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

EXAMPLE

371                # Create a cronjob
372                kubectl create cronjob my-job --image=busybox
373
374                # Create a cronjob with command
375                kubectl create cronjob my-job --image=busybox -- date
376
377                # Create a cronjob with schedule
378                kubectl create cronjob test-job --image=busybox --schedule="*/1 * * * *"
379
380
381
382

SEE ALSO

384       kubectl-create(1),
385
386
387

HISTORY

389       January 2015, Originally compiled by Eric Paris (eparis at redhat dot
390       com) based on the kubernetes source material, but hopefully they have
391       been automatically generated since!
392
393
394
395Eric Paris                  kubernetes User Manuals              KUBERNETES(1)
Impressum