Courseiva
Application Deployment →mediumMultiple Select

CKAD Application Deployment Practice Question

Which TWO of the following are correct ways to pause a rollout of a Deployment named 'myapp'? (Select TWO)

⚠ Common exam trap

A common trap is assuming that only the dedicated `kubectl rollout pause` command can pause a rollout. In fact, setting `spec.paused: true` via `kubectl edit` (or `patch`) is also a valid method, as the `paused` field exists in the Deployment spec. Candidates may overlook this alternative.

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 pause deployment/myapp

`kubectl rollout pause deployment/myapp` is the dedicated command to pause a rollout. Option C is also correct because the Deployment spec includes a `paused` field; setting `spec.paused: true` via `kubectl edit` or `kubectl patch` achieves the same effect. Option B (`kubectl rollout undo`) rolls back a rollout, not pauses it. Option D (`kubectl rollout resume`) resumes a paused rollout. Option E triggers a new rollout with `set image` before pausing, which does not simply pause the current rollout.

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 pause deployment/myapp

    Why this is correct

    kubectl rollout pause deployment/myapp is the dedicated imperative command for pausing a rollout. It immediately sets the deployment's spec.paused field to true, which halts any ongoing rollout and prevents any new rollout from being triggered until the rollout is resumed. This is the standard, direct method because it requires no manual manifest edits and is explicitly designed for this purpose.

  • ✗

    kubectl rollout undo deployment/myapp

    Why it's wrong here

    kubectl rollout undo deployment/myapp does not pause the current rollout; instead, it rolls the deployment back to a previously recorded revision, effectively undoing the latest changes. This creates a new rollout to the earlier revision rather than freezing the existing one. Using undo while a rollout is in progress can actually perform a different kind of state transition, not a pause.

  • ✓

    kubectl edit deployment myapp and set spec.paused: true

    Why this is correct

    kubectl edit deployment myapp and setting spec.paused: true achieves the same result as kubectl rollout pause but through a declarative edit. The Deployment controller watches for changes to spec.paused and halts any in-progress rollout when it becomes true. This is a valid approach for users who prefer to modify the manifest directly, though it allows the possibility of accidentally changing other fields in the editor.

  • ✗

    kubectl rollout resume deployment/myapp

    Why it's wrong here

    kubectl rollout resume deployment/myapp performs the opposite operation: it clears the paused condition by setting spec.paused to false, allowing a paused deployment to continue its rollout. Issuing resume on a running (non-paused) deployment is a no-op, but it never pauses the deployment. In fact, using resume when you intend to pause would have no effect or would inadvertently start a rollout that was previously paused.

  • ✗

    kubectl set image deployment/myapp app=nginx && kubectl rollout pause deployment/myapp

    Why it's wrong here

    Running kubectl set image deployment/myapp app=nginx && kubectl rollout pause deployment/myapp is incorrect because the set image command updates the container image, which immediately triggers a new rollout by creating a new ReplicaSet. This happens before the pause command executes, so the pause is applied to the newly created rollout, not to the existing, pre-set-image state. The sequence therefore changes the deployment's desired state and then pauses, rather than pausing the currently running rollout without modification.

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 →

How Courseiva writes practice questions · Editorial policy

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.