~/ nmadiraju.com Amazon EKS · Jobs and CronJobs
arrow_back Back to nmadiraju
Visual Walkthrough · Kubernetes fundamentals

How Jobs and CronJobs Work on Amazon EKS

Follow one nightly sales report from a looping Deployment to a scheduled CronJob, then check yourself with 8 questions.

1Visual Walkthrough

A CronJob, its Jobs and their Pods on an EKS node, writing a nightly report from RDS to S3 Left, objects in the Kubernetes API: a CronJob report-nightly, the Jobs it creates, and at first a Deployment. Middle, node-1 with the report Pods and the kubelet. Right, the RDS database sales-db and the S3 bucket acme-reports. The walkthrough shows a Deployment restarting a finished script, a Job completing, retries with back-off up to backoffLimit, a CronJob schedule and its time zone, overlapping runs, and cleanup. You kubectl · laptop OBJECTS IN THE KUBERNETES API CronJob report-nightly schedule: "0 3 * * *" keeps 3 succeeded · 1 failed Job DELETED Deployment report replicas: 1 restartPolicy: Always (the only value a Deployment allows) keeps the Pod running DELETED node-1 · EC2 · 10.0.1.10 DELETED DELETED DELETED kubelet starts the Pod's containers, and restarts them only if restartPolicy says so AWS · SAME VPC / REGION sales-db RDS for PostgreSQL :5432 S3 bucket acme-reports one CSV per night

    2Quiz to check understanding

    Check yourself