AZ-400 Deployment Patterns 3 — Questions and Answers
Question 1: Which Azure Pipelines built-in task is used to deploy an ARM template to a resource group?
- AzureWebApp@1
- AzureResourceManagerTemplateDeployment@3 (Correct answer)
- KubernetesManifest@0
- AzureFunctionApp@1
Correct answer: AzureResourceManagerTemplateDeployment@3
The AzureResourceManagerTemplateDeployment task (ARM template deployment) deploys ARM JSON templates to an Azure resource group.
Question 2: What is the key difference between 'rolling' and 'recreate' deployment strategies in Kubernetes?
- Recreate scales horizontally; rolling does not
- Recreate terminates all old pods before starting new ones; rolling gradually replaces them (Correct answer)
- Rolling requires a service mesh; recreate does not
- They are identical but differ in naming convention
Correct answer: Recreate terminates all old pods before starting new ones; rolling gradually replaces them
Recreate causes downtime by killing all existing pods first, while RollingUpdate replaces pods incrementally to maintain availability.
Question 3: An Azure release pipeline stage has an 'Invoke Azure Function' gate configured. When does this gate run?
- Only before the first deployment in the pipeline
- Automatically before and/or after the deployment stage at configured intervals (Correct answer)
- Only when triggered manually by an approver
- Once during pipeline creation
Correct answer: Automatically before and/or after the deployment stage at configured intervals
Invoke Azure Function gates run on a polling interval before or after a stage and the stage proceeds only when the function returns a success response.
Question 4: You want to ensure that a deployment to production automatically rolls back if the error rate exceeds 5% within 10 minutes of release. Which Azure service pair best supports this?
- Azure DevOps boards + Azure Test Plans
- Application Insights + Azure Monitor alerts with auto-rollback action group (Correct answer)
- Azure Key Vault + Azure Policy
- Azure Container Registry + Azure DNS
Correct answer: Application Insights + Azure Monitor alerts with auto-rollback action group
Application Insights detects error rate spikes and Azure Monitor alert rules can trigger action groups that initiate a rollback via webhooks or Logic Apps.
Question 5: In GitOps-style deployments using Azure Arc-enabled Kubernetes, what acts as the source of truth for the desired cluster state?
- Azure DevOps pipeline variables
- A Git repository configured as a flux configuration (Correct answer)
- Azure Key Vault secrets
- Azure Container Registry tags
Correct answer: A Git repository configured as a flux configuration
GitOps with Azure Arc uses Flux to continuously reconcile the cluster state against manifests stored in a Git repository, which is the single source of truth.
Question 6: Which deployment pattern is most appropriate when you need to test a new payment service with only users in the US Pacific timezone?
- Blue-green deployment
- Geographic or user-segment canary deployment (Correct answer)
- Recreate deployment
- Shadow deployment
Correct answer: Geographic or user-segment canary deployment
A canary deployment scoped to a specific user segment (geography, timezone, or attribute) lets you validate the payment service with a targeted subset before wider rollout.
Question 7: What does the 'maxSurge' parameter control in a Kubernetes RollingUpdate deployment strategy?
- Maximum number of pods that can be unavailable during the update
- Maximum number of extra pods that can exist above the desired count during the update (Correct answer)
- Maximum CPU burst allowed per pod
- Maximum time before a rollback is triggered
Correct answer: Maximum number of extra pods that can exist above the desired count during the update
maxSurge sets how many additional pods (above the desired replica count) can be created during a rolling update, controlling update speed.
Which Azure Pipelines built-in task is used to deploy an ARM template to a resource group?