Go to kubernetes.io -> Tasks -> Run Jobs -> Running Automated Tasks with a CronJob
kubectl run sleepy --image=busybox --restart=OnFailure --dry-run=true -o yaml -- /bin/sleep 3
# Or
kubectl create job sleepy --image=busybox --dry-run=true -o yaml -- /bin/sleep 3
Edit the job manifest to include job.spec.completion
, job.spec.parallelism
and job.spec.activeDeadlineSeconds
. Example:
spec:
completions: 5
parallelism: 2
activeDeadlineSeconds: 15
template:
spec:
kubectl run sleepy --image=busybox --schedule="*/2 * * * *" --restart=OnFailure --dry-run=true -o yaml -- /bin/sleep 3
- Ambassador is an "open source, Kubernetes-native API gateway for microservices built on Enjoy"