apiVersion: batch/v1
kind: Job
metadata:
  name: pi
spec:
  template:
    spec:
      containers:
      - name: pi
        image: perl
        command: ["perl",  "-Mbignum=bpi", "-wle", "print bpi(2000)"]
      restartPolicy: Never # Other possibility: OnFailure
  backoffLimit: 4
#  Parallel Jobs - Fixed Completion Count job
#  You can set "parallelism" if you want parallel execution of jobs
  completions: 5
#  Parallel Jobs - Work Queue Job job
#  Do not set "completions"
  parallelism: 2