CKAD Application Observability and Maintenance Practice Question
You need to configure a container to shut down gracefully when it receives a SIGTERM signal, with a timeout of 30 seconds before force kill. Which field in the Pod spec should you set?
⚠ Common exam trap
It's easy for candidates to confuse `terminationGracePeriodSeconds` with `activeDeadlineSeconds` (which limits Pod runtime) or assuming `restartPolicy` affects shutdown behavior, when in fact only `terminationGracePeriodSeconds` controls the SIGTERM-to-SIGKILL timeout.
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
✓
terminationGracePeriodSeconds
The `terminationGracePeriodSeconds` field in a Pod spec defines the duration (in seconds) that Kubernetes waits after sending a SIGTERM signal to the container's main process before forcefully killing it with SIGKILL. Setting this to 30 seconds allows the container to perform graceful shutdown tasks (e.g., closing connections, flushing data) within that window, meeting 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.
- ✗
activeDeadlineSeconds
Why it's wrong here
activeDeadlineSeconds limits the total runtime of a Job or Pod in the scheduler's eyes; when exceeded, Kubernetes attempts to terminate the Pod. It is a hard deadline mechanism for long-running/task execution, not the mechanism that gives a container time to clean up after receiving SIGTERM. Graceful shutdown is controlled by the Pod's terminationGracePeriodSeconds, which allows application cleanup before forced kill.
- ✗
livenessProbe.periodSeconds
Why it's wrong here
livenessProbe.periodSeconds defines how frequently the kubelet checks container liveness. It is used to detect a hung container so it can be restarted, not to control the sequence of signals sent during a Pod shutdown. Liveness probes do not change the delay between SIGTERM and SIGKILL; they merely determine when a container is considered unhealthy and needs a restart.
- ✗
restartPolicy
Why it's wrong here
restartPolicy controls whether a container will be restarted after it exits, but it does not influence how shutdown signals are delivered. Even with Always, OnFailure, or Never, the kubelet still sends SIGTERM and then SIGKILL after the grace period. The decision to restart is made after exit, so it cannot configure the graceful shutdown period itself.
- ✓
terminationGracePeriodSeconds
Why this is correct
terminationGracePeriodSeconds is the correct Pod-level setting that determines how long Kubernetes waits between sending SIGTERM and the forced SIGKILL when a Pod is being terminated. This gives the main container process time to flush state, close connections, and complete cleanup. It is configurable per Pod in the Pod spec and defaults to 30 seconds; setting it appropriately is essential for graceful shutdown.
Go deeper
Related to this question
About these practice questions
One of 826 original CKAD practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.