Courseiva
Kubernetes FundamentalsmediumMultiple ChoiceObjective-mapped

KCNA Kubernetes Fundamentals Practice Question

A Deployment manages ReplicaSets and supports rolling updates. You want to change the container image of a Deployment without downtime. What is the recommended approach?

⚠ Common exam trap

Watch out — candidates often confuse `kubectl expose` with updating images, or think that manually deleting pods will trigger the new image, when in fact the ReplicaSet only recreates pods based on its current template.

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

Edit the Deployment's pod template spec to use the new image; the Deployment will automatically perform a rolling update

Editing the Deployment's pod template spec triggers an automatic rolling update, which is the recommended approach for zero-downtime updates. The Deployment controller creates a new ReplicaSet with the updated image and gradually scales it up while scaling down the old ReplicaSet, ensuring that a minimum number of pods remain available throughout the process.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Use kubectl expose to update the image on the service

    Why it's wrong here

    Services do not manage pod images; they provide stable networking.

  • Delete the existing Deployment and create a new one with the updated image

    Why it's wrong here

    This causes downtime, which rolling updates aim to avoid.

  • Edit the Deployment's pod template spec to use the new image; the Deployment will automatically perform a rolling update

    Why this is correct

    Changing the pod template triggers a rolling update managed by the Deployment.

  • Manually delete all pods one by one; they will be recreated with the new image by the ReplicaSet

    Why it's wrong here

    Pods are recreated with the old image because the ReplicaSet template hasn't changed.

About these practice questions

This KCNA question is part of Courseiva's 833-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 →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This KCNA 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 KCNA exam.