Jobs & CronJobs Interview Questions
Why Jobs & CronJobs Matter in Interviews
Jobs and CronJobs cover a critical category of Kubernetes workloads that many candidates overlook in interview preparation. While Deployments and StatefulSets handle long-running services, Jobs address batch processing, data migrations, ETL pipelines, and one-off administrative tasks that must run to completion. Interviewers value this topic because it reveals whether you understand Kubernetes beyond just serving HTTP traffic.
Common interview questions include "How do completions and parallelism interact in a Job?" and "What happens if a CronJob's next scheduled run arrives while the previous one is still running?" Strong answers demonstrate understanding of the concurrency policy options (Allow, Forbid, Replace) and their trade-offs. Candidates should also be able to explain why Jobs require restartPolicy set to Never or OnFailure — unlike Deployments where Always is the default.
Failure handling is a frequent deep-dive area. Interviewers may ask about the relationship between backoffLimit, activeDeadlineSeconds, and Pod-level restart policies, or how to debug a Job that keeps failing without exceeding its backoff limit. Understanding TTL-after-finished cleanup is important for production readiness, since unmanaged completed Jobs can accumulate and consume API server resources.
CronJob-specific questions often focus on practical concerns: handling timezone-sensitive scheduling, dealing with missed schedules due to controller downtime (startingDeadlineSeconds), and ensuring idempotent Job execution. These questions test real operational maturity with Kubernetes batch workloads.