Welcome to the Linux Foundation Forum!
Lab 6.3 - Error when trying to create cron job
I'm working on "Exercise 6.3: Working with Cron Jobs". I have created the YAML file cron-job.yaml as shown below:
apiVersion: batch/v1beta1 kind: CronJob metadata: name: date spec: schedule: "*/1 * * * *" jobTemplate: spec: template: spec: containers: - name: dateperminute image: busybox args: - /bin/sh - -c - date; sleep 30 restartPolicy: OnFailure
When I attempt step 2. Create the cron job. I receive the error below.
~$ kubectl create -f cron-job.yaml error: error converting YAML to JSON: yaml: line 17: did not find expected key
Please advise what key I should be providing.