job
apiVersion: batch/v1
kind: Job
metadata:
creationTimestamp: null
name: pi
spec:
template:
metadata:
creationTimestamp: null
spec:
containers:
- image: perl
name: pi
command: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"]
restartPolicy: Never
backoffLimit: 4
cronjob
apiVersion: batch/v1beta1
kind: CronJob
metadata:
creationTimestamp: null
name: hello
spec:
jobTemplate:
metadata:
creationTimestamp: null
name: hello
spec:
template:
metadata:
creationTimestamp: null
spec:
containers:
- command:
- /bin/sh
- -c
- date; echo Hello from the kubernets cluster
image: busybox
name: hello
resources: {}
restartPolicy: OnFailure
schedule: '*/1 * * * *'
status: {}