In Kubernetes, a job creates one or more pods and ensures that a specified number of them successfully terminate. There are three main types of jobs:
- Non-parallel job: A job that creates only one pod and is completed when the pod terminates successfully.
- Parallel jobs with a fixed completion count: A job that creates one or more pods and is completed when a specified number of pods terminate successfully.
- Parallel jobs with a work queue: A job that creates one or more pods and that is completed with success when at least one pod has terminated with success and all pods are terminated.
A cron job runs periodically at a specified time. A cron job object is like one line of a Linux cron table file. Cron jobs are useful for creating periodic and recurring tasks, like running backups or sending emails.