Interview Prep/Kubernetes/Cluster operations: certs, drains, rollouts and quotas

A CronJob runs at the wrong hour after you moved to a new cluster.

BeginnerTroubleshootingCluster operations: certs, drains, rollouts and quotas
Answer

Likely causes → Schedules are interpreted in the kube-controller-manager's time zone (UTC on almost all managed clusters) unless spec.timeZone is set.

Diagnose →

kubectl get cronjob report -o jsonpath='{.spec.schedule} {.spec.timeZone}{"\n"}'

Fix →

spec:
  schedule: "0 9 * * 1-5"
  timeZone: "Asia/Kolkata"

timeZone is GA since 1.27. Do not use CRON_TZ= in the schedule string; it is rejected.

Prevent → Always set timeZone explicitly on business-hours jobs.

All Kubernetes questions Roadmap: Kubernetes networking, storage & scaling

More on Cluster operations: certs, drains, rollouts and quotas