apiVersion: batch/v1
kind: Job
metadata:
  name: jobs-demo
spec:
  parallelism: 5
  completions: 15
  template:
    metadata:
      name: jobs-demo
      labels:
        demo: jobs
    spec:
      containers:
      - name: sleep
        image: busybox
        command: ["sh", "-c", "sleep 5; if [ $((RANDOM % 4)) -eq 0 ]; then exit 1; fi"]
      restartPolicy: Never

