Conquer the CKAD Challenge 2025: Unleash Your Kubernetes Power!

Image Description

Question: 1 / 400

How do you configure a cron job in Kubernetes?

By utilizing a Deployment resource

By creating a CronJob resource

To configure a cron job in Kubernetes, the correct approach is to create a CronJob resource. A CronJob allows you to run jobs on a specified schedule, similar to the Linux cron tool. This resource type includes details about when to start the jobs (using the Cron format for scheduling), the job specification that defines what to execute, and additional configurations such as concurrency policies and time zone settings.

Using a Deployment resource is inappropriate for cron jobs because Deployments are focused on managing stateless applications and ensuring that a specified number of replicas of an application are running. They do not support scheduling tasks based on time.

Modifying the Pod specification doesn't provide the necessary scheduling capabilities that CronJob offers; Pods are concerned with running containers without built-in scheduling features.

On the other hand, a Service resource is meant for exposing applications running on Pods, enabling network communication. It does not relate to scheduling jobs and therefore would not assist in configuring a cron job.

Creating a CronJob resource is the effective way to ensure that tasks are executed at scheduled intervals in a Kubernetes environment.

Get further explanation with Examzify DeepDiveBeta

By modifying the Pod specification

By using a Service resource

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy