apiVersion: batch/v1
kind: Job
metadata:
  name: job-test
spec:
  template:
    metadata:
      labels:
        np.class: job-test
        np.runDuration: 5s
        np.terminalPhase: Succeeded
    spec:
      # Need this as the controller manager marks a node unreachable
      tolerations:
      - key: node.kubernetes.io/unreachable
        effect: NoSchedule
      containers:
      - name: pi
        image: ubuntu:16.04
        command: ["perl",  "-Mbignum=bpi", "-wle", "print bpi(2000)"]
        resources:
          requests:
            cpu: 2
            memory: 128Mi
      restartPolicy: Never
  parallelism: 4
  completions: 4
