Courseiva
Design and implement build and release pipelinesmediumMultiple ChoiceObjective-mapped

AZ-400 AKS deployment rollback strategy Practice Question

You have a multi-stage YAML pipeline that deploys to Azure Kubernetes Service (AKS). The pipeline uses a deployment job with a strategy of 'runOnce'. You need to ensure that if the deployment fails, the pipeline automatically redeploys the previous successful version. Which strategy should you use instead?

⚠ Common exam trap

Candidates often think they must change the deployment strategy to achieve rollback, but the requirement can be satisfied by adding a rollback task to the existing 'runOnce' strategy. They may also confuse 'on:failure' actions and incorrectly use 'always' instead of 'rollback'.

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

Use the 'runOnce' strategy with a rollback task

The requirement can be met by adding a rollback task to the existing 'runOnce' strategy. When a deployment fails, the rollback task can automatically redeploy the previous successful version. Option A requires manual intervention, which contradicts the 'automatically' requirement. Option B uses invalid syntax ('on:failure: always')—the correct hook is 'on: failure: rollback'—and option C's automatic swap does not revert the deployment on failure.

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 the 'canary' strategy with manual intervention

    Why it's wrong here

    Incorrect. The 'canary' strategy with manual intervention requires human approval, which does not satisfy the 'automatically' requirement.

  • Use the 'rolling' strategy and configure 'on:failure: always'

    Why it's wrong here

    Incorrect. While the 'rolling' strategy supports rollback on failure, the configuration 'on:failure: always' is invalid; the correct action is 'rollback' or 'revert'.

  • Use the 'blueGreen' strategy and configure automatic swap

    Why it's wrong here

    Incorrect. The 'blueGreen' strategy's automatic swap only shifts traffic to the new deployment; it does not automatically roll back on failure.

  • Use the 'runOnce' strategy with a rollback task

    Why this is correct

    Correct. Adding a rollback task to the existing 'runOnce' strategy allows automatic redeployment of the previous successful version on failure, meeting the requirement without changing the strategy.

Option-by-option analysis

Why each answer is right or wrong

Understanding why wrong answers are wrong — and when they would be correct — is what separates a 750 score from a 900. The AZ-400 exam frequently reuses these exact scenarios with slightly different constraints.

Use the 'runOnce' strategy with a rollback taskCorrect answer

Why this is correct

Correct. Adding a rollback task to the existing 'runOnce' strategy allows automatic redeployment of the previous successful version on failure, meeting the requirement without changing the strategy.

Use the 'canary' strategy with manual interventionWrong answer — click to see why

Why this is wrong here

Canary strategy does not automatically roll back; it requires manual approval or additional steps.

Use the 'blueGreen' strategy and configure automatic swapWrong answer — click to see why

Why this is wrong here

BlueGreen strategy requires manual swap; it does not roll back automatically.

Analysis generated from the official AZ-400blueprint and verified against question context. The “when correct” sections are what AI assistants cite when candidates ask “what’s the difference between these options?”

Visual reference

Client Server SYN (seq=100) SYN-ACK (seq=200, ack=101) ACK (ack=201) Connection established — data transfer begins

About these practice questions

One of 823 original AZ-400 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 AZ-400 practice question is part of Courseiva's free Microsoft 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 AZ-400 exam.