Skip to Content
Certified Kubernetes Application Developer (CKAD) Study Guide, 2nd Edition
book

Certified Kubernetes Application Developer (CKAD) Study Guide, 2nd Edition

by Benjamin Muschko
May 2024
Intermediate to advanced content levelIntermediate to advanced
366 pages
7h 43m
English
O'Reilly Media, Inc.
Content preview from Certified Kubernetes Application Developer (CKAD) Study Guide, 2nd Edition

Chapter 6. Jobs and CronJobs

A Job models a one-time process—for example, a batch operation. The Pod and its encompassed containers stop running after the work has been completed. CronJobs run periodically according to their defined schedules. A good application for a CronJob is a task that needs to occur periodically (for example, a process that exports data). In this chapter you will learn how to configure, run, and inspect a Job and a CronJob.

Working with Jobs

A Job is a Kubernetes primitive that runs functionality until a specified number of completions has been reached, making it a good fit for one-time operations like import/export data processes or I/O-intensive processes with a finite end. The actual work managed by a Job is still running inside of a Pod. Therefore, you can think of a Job as a higher-level coordination instance for Pods executing the workload. Figure 6-1 shows the parent-child relationship between a Job and the Pod(s) it manages.

Upon completion of a Job and its Pods, Kubernetes does not automatically delete the objects—they will stay until they’re explicitly deleted. Keeping those objects helps with debugging the command run inside of the Pod and gives you a chance to inspect the logs.

ckd2 0601
Figure 6-1. Relationship between a Job ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Certified Kubernetes Application Developer (CKAD) Study Guide

Certified Kubernetes Application Developer (CKAD) Study Guide

Benjamin Muschko

Publisher Resources

ISBN: 9781098152857Errata PageSupplemental Content