apiVersion: batch/v1
kind: Job
metadata:
  name: pie-counter
spec:
  completions: 4 # require 4 Pods to complete for a succesful job
  parallelism: 2 # allow up to 2 Pods to run in parallel
  activeDeadlineSeconds: 240 # how long can the job be active before it's terminated?
  template:
    metadata:
      name: pie-counter
    spec:
      restartPolicy: Never # OnFailure or Never
      containers:
      - name: pie-counter
        image: alpine
        command:
         - "sh"
         - "-c"
         - "echo 'scale=1000; 4*a(1)' | bc -l;sleep 2;"