CKAD Application Deployment Practice Question
A developer needs to run a one-time batch job to process data. After completion, the pod should be retained for logs inspection. Which Job configuration parameter should be set?
⚠ Common exam trap
CNCF often tests the misconception that `ttlSecondsAfterFinished` must be set to a positive value to retain Pods, when in fact leaving it unset (nil) achieves indefinite retention, while setting it to any non-negative integer triggers automatic deletion.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Leave ttlSecondsAfterFinished unset
To retain a Job's Pod after completion for log inspection, the `ttlSecondsAfterFinished` field must be left unset (or set to nil). When this field is unset, the Job controller does not automatically delete the Pod, allowing logs to be inspected. Setting it to any non-negative integer would schedule automatic deletion after that many seconds, which contradicts the requirement.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
backoffLimit: 0
Why it's wrong here
backoffLimit: 0 is a Job spec field that controls how many times the controller retries a failed Pod before the Job is marked as failed. Setting it to 0 means the Job will fail immediately if the first Pod fails, but it has no impact on what happens to Pods after the Job completes successfully. The developer's goal is to retain the completed Pod for later inspection, and backoffLimit only governs retry behavior, not pod retention or cleanup.
- ✓
Leave ttlSecondsAfterFinished unset
Why this is correct
Leaving ttlSecondsAfterFinished unset is the correct way to ensure the Job and its Pods remain after completion. By default, the Kubernetes Job controller does not automatically delete finished Pods or the Job object; they stay in the cluster indefinitely until a human or an automated process removes them. This gives the developer time to inspect the Pod's logs, output files, or status, which is exactly what is needed for a one-time batch job.
- ✗
ttlSecondsAfterFinished: -1
Why it's wrong here
ttlSecondsAfterFinished: -1 is not a valid configuration because the TTL field expects a non-negative integer; Kubernetes API validation rejects negative values. Even if the API accepted it, the field is specifically designed to automatically delete the Job after the specified number of seconds from completion, not to disable cleanup. To retain Pods, you must simply leave the field unset, because relying on a negative value to mean 'keep forever' is neither documented nor supported.
- ✗
activeDeadlineSeconds: 3600
Why it's wrong here
activeDeadlineSeconds: 3600 sets a time limit on the duration of a Job's active Pods; if the total running time exceeds 3600 seconds, the Job is terminated and marked as failed. This parameter is useful for bounding how long a job can run, but it does not affect pod retention after the Job finishes. Since the data processing job is presumably expected to finish well within an hour and the developer wants to retain the successful Pod, this deadline does not solve the cleanup or retention question.
Go deeper
Related to this question
About these practice questions
This CKAD question is part of Courseiva's 826-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This CKAD practice question is part of Courseiva's free CNCF certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CKAD exam.