I was trying to execute a yaml file as cron job and got the following error:
container_linux.go:247: starting container process caused "exec: \"/home/ubuntu/exam.sh\": stat /home/ubuntu/exam.sh: no such file or directory"
This is my yaml file:
job2.yaml file
apiVersion: batch/v1beta1
kind: CronJob metadata:
name: ghost
labels:
role: blog
spec: schedule: "*/1 * * * *" jobTemplate:
spec:
template:
spec:
containers:
- name: ghost
image: ghost:0.11-alpine
command: ["/home/ubuntu/exam.sh"]
restartPolicy: OnFailure