Files
kubernetes-essentials/03-other-specs/jobs/01-cronjob.yaml
Pamir Erdem 2645df26ff renamed
2018-08-01 11:46:57 +03:00

21 lines
417 B
YAML

apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: hello
spec:
schedule: "*/1 * * * *" # syntax is a same as in system cron jobs
jobTemplate:
spec:
template:
spec:
containers:
- name: hello
image: nginx
args:
- /bin/sh
- -c
- date; echo Hello from the Kubernetes cluster
restartPolicy: OnFailure