CKAD Application Deployment Practice Question
A Deployment has replicas: 3 and uses a ConfigMap. The ConfigMap is updated. The developer wants to update the pods to use the new ConfigMap without recreating the Deployment. What is the correct approach?
⚠ Common exam trap
A common mix-up: candidates assume ConfigMaps are dynamically updated in running Pods (Option C), but in reality, Pods must be recreated to consume updated ConfigMap data unless the application explicitly watches for file changes.
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
✓
kubectl rollout restart deployment/<name>
A `kubectl rollout restart deployment/<name>` triggers a rolling restart of the Pods managed by the Deployment. Since ConfigMaps are mounted as volumes or injected as environment variables at Pod creation time, the only way to pick up updated ConfigMap data without recreating the Deployment object itself is to force the existing Pods to be terminated and recreated. The Deployment controller handles this gracefully, ensuring zero downtime by following the configured rolling update strategy.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
kubectl rollout restart deployment/<name>
Why this is correct
kubectl rollout restart deployment/<name> is correct because it modifies the pod template's annotation (spec.template.metadata.annotations) without changing container images, forcing the Deployment controller to create a new ReplicaSet and perform a rolling update. New pods are scheduled with the patched template and therefore mount the latest ConfigMap data at container start, while old pods are terminated gradually. This is the recommended declarative way to reload configuration changes with zero downtime and full rollout history.
- ✗
kubectl set image deployment/<name> <container>=<new-image>
Why it's wrong here
This command updates the container image reference in the deployment's pod template, which in turn creates a new ReplicaSet and restarts pods—so it would indirectly refresh the mounted ConfigMap. However, using it solely to reload configuration is wrong because it changes the deployed container image, potentially introducing an unintended version or tag, and it does not regard ConfigMap as the source of change. The image update is a side effect, not a targeted way to propagate ConfigMap changes.
- ✗
The pods automatically mount the new ConfigMap within seconds
Why it's wrong here
The kubelet periodically syncs ConfigMap volumes, so a file mounted as a volume may eventually show updated data after the sync period (often up to a minute), but environment variables are injected only at pod creation and never refreshed. Crucially, most applications read configuration at startup, so even if the volume file changes, the running process does not reload it automatically. Therefore, saying pods automatically mount the new ConfigMap within seconds is false and risky; a rollout restart is required to guarantee the new configuration is loaded.
- ✗
Delete and recreate each pod manually
Why it's wrong here
Manually deleting each pod forces the ReplicaSet controller to create replacements that mount the updated ConfigMap, but this is an imperative, ad-hoc process that requires handling multiple pods individually and offers no granular rollout control. If you delete all pods at once, you risk downtime unless you carefully sequence deletions; and you lose the deployment rollout history and easy rollback that a rollout restart provides. The Kubernetes-native approach is to trigger a new rollout declaratively rather than phasing pods by hand.
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.