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
Go deeper
Related to this question
Learn chapter
Introduction to DevOps and Azure DevOps
Key term
Task
A Task in Azure DevOps is a predefined, reusable step that performs a specific action during a build or release pipeline, like compiling code or running tests.
Key term
Pipeline
A pipeline is an automated series of steps that takes code from development to production, ensuring quality and speed.
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 →
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.