According to documentation (https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/) I can create cron job in k8s with specify timezone like: "CRON_TZ=UTC 0 23 * * *"
My deployment file is:
apiVersion: batch/v1
kind: CronJob
metadata:
name: scheduler
spec:
schedule: "CRON_TZ=UTC 0 23 * * *"
...
During the deploy I am getting an error:
The CronJob "scheduler" is invalid: spec.schedule: Invalid value: "CRON_TZ=UTC 0 23 * * *": Expected exactly 5 fields, found 6: CRON_TZ=UTC 0 23 * * *
Cron is working without perfectly timezone (schedule: "0 23 * * *"
)
Cluster version is: Kubernetes 1.21.2-do.2
- digitalocean.
What is wrong?