Lesson 3.4

Jobs and CronJobs

A job runs pods until a set number succeed, then stops.

8mIntermediate7k students

Overview

Work that finishes

A job runs pods until a set number succeed, then stops. It is the right object for migrations, imports, and any batch task — unlike a deployment, which will restart your finished task forever.

Cron jobs create jobs on a schedule. Decide explicitly what happens when a run overlaps the previous one; the default allows concurrent runs, which is rarely what a nightly import wants.

Set a retry limit and a deadline. A job that retries indefinitely on a permanent failure quietly burns cluster resources for days.

In this lesson you will:

  • Run a task to completion
  • Schedule recurring work
  • Handle retries and concurrency

Resources

Previous Lesson
Next Lesson
Jobs and CronJobs — Kubernetes for Application Developers — Vertex