Use Jobs and CronJobs to control and manage Kubernetes pods and containers.

Kubernetes is the default orchestration engine for containers. Its options for controlling and managing pods and containers include:

  1. Deployments
  2. StatefulSets
  3. ReplicaSets

Each of these features has its own purpose, with the common function to ensure that pods run continuously. In failure scenarios, these controllers either restart or reschedule pods to ensure the services in the pods continue running.

As the Kubernetes documentation explains, a Kubernetes Job creates one or more pods and ensures that a specified number of the pods terminates when the task (Job) completes.

Just like in a typical operating system, the ability to perform automated, scheduled jobs without user interaction is important in the Kubernetes world. But Kubernetes Jobs do more than just run automated jobs, and there are multiple ways to utilize them through:

  1. Jobs
  2. CronJobs
  3. Work queues (this is beyond the scope of this article)

#kubernetes #cronjobs #kubernetes jobs

A beginner's guide to Kubernetes Jobs and CronJobs
1.10 GEEK