I'm learning Openshift Online, I tried to create a cron job from either UI or CLI, both resulted in the below error:
Error from server: admission webhook "validate.cron.create" denied the request: Prohibited resource for this cluster.
I checked permissions for the account, and it had admin rights with CRUD on cronjobs..
I use the same example as documentation: https://docs.openshift.com/container-platform/3.5/dev_guide/cron_jobs.html
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: pi
spec:
schedule: "*/1 * * * *"
jobTemplate:
spec:
template:
metadata:
labels:
parent: "cronjobpi"
spec:
containers:
- name: pi
image: perl
command: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"]
restartPolicy: OnFailure
So as @Daein Park mentioned : Unfortunately, CronJob can be available on OpenShift Online Pro. So if you use the cluster as Starter plan, you can not create CronJob.
https://docs.openshift.com/online/dev_guide/cron_jobs.html#overview