apiVersion: batch/v1
kind: Job
metadata:
  name: sometask-job
spec:
  completions: 10
  parallelism: 5
  template:
    spec:
      containers:
      - name: sometask
        image: bash
        command: ["bash"]
        args: ["-c",  "if [ $(( $RANDOM % 2)) == 1 ]; then exit 1; fi; echo working ...; sleep 10; echo done;"]
      restartPolicy: Never