Bird
0
0

You created a CronJob but notice it never runs. Which YAML mistake could cause this?

medium📝 Troubleshoot Q14 of 15
Kubernetes - Scheduling
You created a CronJob but notice it never runs. Which YAML mistake could cause this?
AMissing <code>schedule</code> field in the CronJob spec.
BUsing <code>restartPolicy: Always</code> in the Job template.
CSetting <code>image</code> to a valid container image.
DDefining <code>command</code> as an array.
Step-by-Step Solution
Solution:
  1. Step 1: Check required CronJob fields

    The schedule field is mandatory to tell when to run the job.
  2. Step 2: Identify impact of missing schedule

    Without schedule, the CronJob controller cannot trigger jobs, so none run.
  3. Final Answer:

    Missing schedule field prevents CronJob from running. -> Option A
  4. Quick Check:

    CronJob needs schedule to run [OK]
Quick Trick: CronJob must have schedule field to run [OK]
Common Mistakes:
  • Using restartPolicy Always (allowed but not cause no run)
  • Thinking image or command cause no run
  • Ignoring missing schedule field

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes