Interview Prep/SRE & Reliability/Backups, DR & Runbook Automation

The backup CronJob silently stopped running. Events show `Cannot determine if job needs to be started: too many missed start time (> 100). Set or decrease .spec.startingDeadlineSeconds or check clock skew.`

IntermediateTroubleshootingBackups, DR & Runbook Automation
Answer

Likely causes → The CronJob was suspended or the controller could not schedule it for a long time; after more than 100 missed schedules the controller stops trying without a startingDeadlineSeconds.

Diagnose →

kubectl get cronjob -n ops db-backup -o yaml | yq '.spec.suspend, .spec.startingDeadlineSeconds, .status.lastScheduleTime'
kubectl get events -n ops --field-selector involvedObject.name=db-backup

Fix → Set startingDeadlineSeconds (for example 3600), unsuspend, and trigger a manual run: kubectl create job --from=cronjob/db-backup db-backup-manual -n ops.

Prevent → Alert on backup age, not on job status:

time() - kube_cronjob_status_last_successful_time{cronjob="db-backup"} > 26 * 3600
All SRE & Reliability questions Roadmap: Backup & disaster recovery

More on Backups, DR & Runbook Automation