By default, how many completed and failed jobs are kept in a CronJob according to the successfulJobsHistoryLimit field?

Prepare for the KCNA Certification Test. Study with flashcards, multiple-choice questions, and detailed explanations to enhance your understanding of Kubernetes Cloud Native concepts. Ace your exam!

Multiple Choice

By default, how many completed and failed jobs are kept in a CronJob according to the successfulJobsHistoryLimit field?

Explanation:
When a CronJob runs, Kubernetes keeps a history of the Jobs it creates to help with debugging. The number of successful Jobs that are kept is controlled by the field that tracks successful history. By default, this value is 3, so only the last three successful Jobs remain as history (older ones are cleaned up). The number of failed Jobs kept is controlled by a separate field, which defaults to 1. So, for the given question, the default number of kept completed (successful) Jobs is three. If you want to keep more, you can set spec.successfulJobsHistoryLimit to a higher value like 5.

When a CronJob runs, Kubernetes keeps a history of the Jobs it creates to help with debugging. The number of successful Jobs that are kept is controlled by the field that tracks successful history. By default, this value is 3, so only the last three successful Jobs remain as history (older ones are cleaned up). The number of failed Jobs kept is controlled by a separate field, which defaults to 1. So, for the given question, the default number of kept completed (successful) Jobs is three. If you want to keep more, you can set spec.successfulJobsHistoryLimit to a higher value like 5.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy