<p>This is my yaml file that i am trying to use for cronJob creation. I am getting error like unknown field &quot;container&quot; in io.k8s.api.core.v1.PodSpec,</p>
<pre><code>apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: abc-service-cron-job
spec:
  schedule: &quot;* * * * *&quot;
  jobTemplate:
    spec:
      template:
        spec:
          container:
          - name: abc-service-cron-job
            image: docker.repo1.xyz.com/hui-services/abc-application/REPLACE_ME
            imagePullPolicy: Always
            command:
            - /bin/sh
            - -c
            - date; echo Hello from the Kubernetes cluster
          restartPolicy: OnFailure  
</code></pre>

lucky
<pre><code>apiVersion: batch/v1beta1
kind: CronJob
metadata:
  ...
spec:
  ...
  jobTemplate:
    spec:
      template:
        spec:
          containers:  # &lt;-- you have spelling error here, should be &quot;containers&quot;
          ...
</code></pre>
