May 2018
Intermediate to advanced
554 pages
13h 51m
English
If your batch Job doesn't have a state or dependency between Jobs, you may consider submitting Jobs in parallel. Similar to the spec.completions parameter, the Job template has a spec.parallelism parameter to specify how many Jobs you want to run in parallel:
1. Re-use a repeatable Job but change it to specify spec.parallelism: 3 as follows:
$ cat job-dpkg-parallel.yaml apiVersion: batch/v1kind: Jobmetadata: name: package-checkspec: parallelism: 3 template: spec: containers: - name: package-check image: ubuntu command: ["dpkg-query", "-l"] restartPolicy: Never
$ kubectl get pods --show-allNAME READY STATUS RESTARTS AGEpackage-check-5jhr8 ...