<p>I want to define replicas in my cron job</p>
<pre><code>spec:
schedule: &quot;5 15 * * 1-5&quot;
  jobTemplate:
    spec:
      parallelism: 1
      template:
        metadata:
          annotations:
            rollme: {{ randAlphaNum 5 | quote }}
        spec:
          replicas: 1
          containers:
          - name: daily-automation
</code></pre>
<p>but getting error</p>

deagleshot
<p>job.spec.template.spec must be valid Kubernetes <a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#jobspec-v1-batch" rel="nofollow noreferrer">Pod specification</a>. A Pod is a single set of containers and does not possess any concept of <code>replicas</code> in its specification.</p>
<p>Replica counts are exposed by some higher level abstractions which create Pods like Deployments &amp; ReplicaSets.</p>
<p>If you are trying to make the job trigger multiple Pods simultaneously, you will want to set <code>parallelism</code> and <code>completions</code> in accordance with your desired behavior: <a href="https://kubernetes.io/docs/concepts/workloads/controllers/job/#parallel-jobs" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/workloads/controllers/job/#parallel-jobs</a> .</p>
