Interview Prep/Kubernetes/Resources, OOM, probes and termination

A CronJob stopped running and its status shows `Cannot determine if job needs to be started: too many missed start time (> 100). Set or decrease .spec.startingDeadlineSeconds or check clock skew`.

AdvancedTroubleshootingResources, OOM, probes and termination
Answer

Likely causes → The CronJob controller found more than 100 missed schedules since the last run (it was suspended, controller-manager was down, or the schedule is every minute and something blocked it) and gave up.

Diagnose →

kubectl get cronjob report -o jsonpath='{.spec.schedule} {.spec.suspend} {.status.lastScheduleTime}{"\n"}'
kubectl get events --field-selector involvedObject.name=report

Fix → Set startingDeadlineSeconds (e.g. 300) so only misses within that window are counted, then the controller resumes. Unsuspend if needed.

Prevent → Always set startingDeadlineSeconds and concurrencyPolicy: Forbid for jobs that must not pile up; alert on time() - kube_cronjob_status_last_schedule_time too large.

All Kubernetes questions Roadmap: Kubernetes core

More on Resources, OOM, probes and termination