© Ernesto Garbarino 2019
E. GarbarinoBeginning Kubernetes on the Google Cloud Platformhttps://doi.org/10.1007/978-1-4842-5491-2_7

7. CronJobs

Ernesto Garbarino1 
(1)
EGHAM, UK
 

Some tasks may need to be run periodically at regular intervals; for example, we may want to compress and archive logs every week or create backups every month. Bare Pods could be used to instrument said tasks, but this approach would require the administrator to set up a scheduling system outside of the Kubernetes cluster itself.

The need to schedule recurrent tasks brought the Kubernetes team to design a distinct controller modeled after the traditional cron utility found in Unix-like operating systems. Unsurprisingly, the controller is called CronJob, and it uses the same ...

Get Beginning Kubernetes on the Google Cloud Platform: A Guide to Automating Application Deployment, Scaling, and Management now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.