KCNA · Question #81
What is the Kubernetes object used for running a recurring workload?
The correct answer is D. CronJob. The Kubernetes CronJob object is specifically designed to run scheduled, recurring tasks, similar to a cron utility in Linux systems.
Question
What is the Kubernetes object used for running a recurring workload?
Options
- AJob
- BBatch
- CDaemonSet
- DCronJob
How the community answered
(34 responses)- A6% (2)
- B3% (1)
- C3% (1)
- D88% (30)
Why each option
The Kubernetes CronJob object is specifically designed to run scheduled, recurring tasks, similar to a cron utility in Linux systems.
A Job runs a single, finite task to completion, but it does not inherently provide recurring scheduling capabilities.
While 'Batch' implies batch processing, 'Batch' is not a specific Kubernetes object used for recurring workloads; 'Job' and 'CronJob' are the relevant objects.
A DaemonSet ensures that a copy of a pod runs on all (or selected) nodes, primarily for cluster-level services, not for recurring scheduled tasks.
A CronJob creates Jobs on a repeating schedule, allowing you to automate tasks that need to run at specific times or intervals, such as backups, report generation, or periodic cleanup operations, directly within Kubernetes.
Concept tested: Kubernetes CronJob
Source: https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/
Topics
Community Discussion
No community discussion yet for this question.