AZ-400 Practice Question: Design and implement build and release pipelines
Your Azure DevOps release pipeline deploys to Azure Kubernetes Service (AKS). You need to ensure that the deployment is rolled back automatically if the health checks fail within 5 minutes after deployment. The AKS cluster uses a canary deployment strategy. What should you use?
⚠ Common exam trap
Candidates often assume any 'rollback' command or flag (like kubectl rollout undo or Helm --wait) will suffice, but they miss that the question specifically requires automatic rollback based on health checks within a 5-minute window after deployment, which only the Kubernetes manifest task's canary strategy with stabilityCheck and rollback settings provides.
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 Kubernetes manifest task with 'canary' deployment strategy and configure 'stabilityCheck' and 'rollback' settings.
The Kubernetes manifest task in Azure DevOps supports a 'canary' deployment strategy with built-in 'stabilityCheck' and 'rollback' settings. This allows you to define a health check window (e.g., 5 minutes) and automatically trigger a rollback if the canary pods fail the stability checks, meeting the requirement without custom scripting.
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 an Azure CLI task to run 'kubectl rollout undo' in a post-deployment script.
Why it's wrong here
This approach requires writing custom Azure CLI or kubectl commands in a post-deployment script, and it only triggers a manual rollback after someone detects the issue; it does not integrate with the deployment's canary strategy or health checks, so it cannot automatically rollback based on stability failures.
- ✗
Use a Helm upgrade task with --wait and --timeout flags.
Why it's wrong here
Helm's `--wait` flag only blocks the upgrade command until all resources reach a ready state or the `--timeout` expires; it does not perform any post-deployment health verification or automatic rollback if the workload subsequently becomes unhealthy. If pods fail readiness shortly after the timeout, Helm leaves the failed release in place, requiring manual `helm rollback` intervention. The flag also lacks canary-specific logic such as traffic splitting or comparing canary stability against a baseline, so it cannot automatically revert based on a stability check failure.
- ✓
Use the Kubernetes manifest task with 'canary' deployment strategy and configure 'stabilityCheck' and 'rollback' settings.
Why this is correct
The Kubernetes manifest task in Azure Pipelines supports a canary deployment strategy where you can specify 'stabilityCheck' to validate the canary version's health and 'rollback' settings to automatically revert to the last stable version if the canary fails the specified criteria, enabling automated rollback on health failure.
- ✗
Use the Kubectl task with a 'rollback' subcommand condition.
Why it's wrong here
The Kubectl task in Azure DevOps provides a generic 'rollback' subcommand, but it lacks native canary deployment logic, stability checks, and automatic rollback tuning; using it requires external control of conditions and cannot automatically decide when to rollback based on health metrics.
Go deeper
Related to this question
Learn chapter
Introduction to DevOps and Azure DevOps
Key term
Pipeline
A pipeline is an automated series of steps that takes code from development to production, ensuring quality and speed.
Key term
Azure DevOps
Azure DevOps is a Microsoft service that provides development tools for planning, building, testing, and deploying software applications using automated pipelines and collaboration features.
About these practice questions
This AZ-400 question is part of Courseiva's 823-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 →
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.