📘 Free AI-200 Sample Questions
You maintain multiple versions of a container image in Azure Container Registry.
The production deployment must always run the exact same image build even if tags are changed later.
You need to ensure predictable and immutable image selection during deployment.
What should you do?
A
Tag the image as production and deploy it by using the production tag.
B
Schedule nightly rebuilds of the image.
C
Configure deployment to use the latest tag.
D
Identify the image by using its SHA digest.
Correct Answer:
D. Identify the image by using its SHA digest.
Explanation:
Justification for Correct Answer (D)
Why D is the Best Choice:Deploying by using the image's SHA (Secure Hash Algorithm) digest (Option D)
ensures predictable and immutable image selection. The SHA digest is a unique, cryptographically secure
hash that represents the exact contents of the image. Since the digest changes only if the image's contents
change, it provides an immutable reference. This approach guarantees that the production deployment runs
the exact same image build, regardless of subsequent tag changes.
Key Benefits:
Immutability: SHA digest remains constant for the same image contents.
Unambiguous Reference: Directly ties to the specific image version, unaffected by tag updates.
Why Other Options are Less Suitable:
A. Tag the image as "production" and deploy by using the production tag:
intended.
Lack of immutability in the reference point.
B. Schedule nightly rebuilds of the image:
Tags can be overwritten or updated, potentially leading to deployment of a different image build than
Does not address the requirement for immutable image selection based on existing builds.
Introduces unnecessary rebuilds without guaranteeing the deployment's image consistency.
C. Configure deployment to use the latest tag:
"Latest" tags are ambiguous and can change, leading to unpredictability in deployment images.
Fails to ensure immutability or consistency with a specific build.
References
Azure Container Registry: Pulling Images by Digest
Immutable Infrastructure with Azure Container Registry
A container in an AKS cluster repeatedly restarts.
Pod events show probe failures, although node-level CPU and memory metrics are normal.
You need to diagnose the cause of the repeating restarts.
What should you do first?
A
Scale the deployment to more replicas.
B
Decrease the initialDelaySeconds for the container liveness probe.
C
Drain and reboot the node hosting the pod.
D
Inspect the pod events and container logs.
Correct Answer:
D. Inspect the pod events and container logs.
Explanation:
Technical Justification for Correct Answer D
Why D is the best option:Inspecting the pod events and container logs (Option D) is the most appropriate first
step in diagnosing the cause of repeating restarts due to probe failures. This approach allows for the
collection of direct evidence related to the failure. Pod events provide contextual information around the
restarts (e.g., the specific probe that failed), while container logs can reveal the application's state leading up
to the failure. This step is non-invasive, doesn't alter the cluster's state, and guides the next diagnostic or
corrective actions.
Why other options are less suitable as the first step:
A. Scale the deployment to more replicas: Scaling does not address the underlying issue causing the
restarts. It might temporarily mask the problem by distributing the load but doesn't provide diagnostic insight.
Inappropriateness Level: High
B. Decrease the initialDelaySeconds for the container liveness probe: Adjusting initialDelaySeconds without
Inappropriateness Level: Medium
References
understanding the root cause could lead to premature probing, potentially worsening the situation if the
container needs more time to start. This is a reactive change without a diagnosed reason. Inappropriateness
Level: Medium to High
C. Drain and reboot the node hosting the pod: While node issues could theoretically cause pod problems, the
normal node-level CPU and memory metrics, combined with the specific indication of probe failures, make this
a less likely first culprit. Draining and rebooting is invasive and should be based on more targeted evidence.
Correct Approach Summary:Given the symptoms (repeat restarts due to probe failures with normal node
metrics), the logical first step is to gather more specific information about the failures through pod events
and container logs before attempting more invasive or speculative adjustments.
1. Azure Documentation - Troubleshoot pod startup issues: https://learn.microsoft.com/en
us/azure/aks/troubleshoot-pod-startup
2. Kubernetes Documentation - Container Probes: https://kubernetes.io/docs/tasks/configure-pod
container/configure-liveness-readiness-probes/
You develop a message-processing service deployed to Azure Container Apps. The service reads messages from
an Azure Service Bus queue.
The solution must minimize costs by ensuring NO compute resources are consumed when the queue is empty.
You need to configure scaling for the service.
Which two actions should you perform? Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one point.
A
Increase the scaling rule to allow for the maximum running replica count.
B
Configure the scaling rule to allow for the termination of all active replicas.
C
Configure a Kubernetes Event-driven Autoscaler rule that monitors queue length.
D
Enable HTTP ingress concurrency scaling.
Correct Answer:
B. Configure the scaling rule to allow for the termination of all active replicas.
Explanation:
Technical Justification for Correct Answer BC
To minimize costs by ensuring no compute resources are consumed when the Azure Service Bus queue is
empty, the scaling configuration for the message-processing service in Azure Container Apps must
dynamically adjust based on queue activity. Here’s why options B and C are the correct choices, and why A
and D are less suitable:
Correct Options
B. Configure the scaling rule to allow for the termination of all active replicas.
Justification: When the Service Bus queue is empty, terminating all active replicas ensures no compute
resources are consumed, directly addressing the cost minimization requirement. This action allows the service
to scale down to zero, which is crucial for achieving the "no idle compute" objective.
C. Configure a Kubernetes Event-driven Autoscaler (HAPROXY or KEDA) rule that monitors queue length.
Justification: An event-driven autoscaler, particularly one integrated with Kubernetes (like KEDA -
Kubernetes Event-Driven Autoscaler), can monitor the Azure Service Bus queue length. It scales the replicas
up when messages are present in the queue and down to zero when the queue is empty, aligning perfectly
with the requirement to only consume resources when necessary. KEDA's native integration with Azure
Services makes it an efficient choice for this scenario.
Less Suitable Options
A. Increase the scaling rule to allow for the maximum running replica count.
goal when there's no workload.
D. Enable HTTP ingress concurrency scaling.
References
Why Less Suitable: Increasing the maximum replica count does not address the need to scale down to zero when
the queue is empty. Instead, it focuses on the upper limit of scalability, which is orthogonal to the cost minimization
Why Less Suitable: HTTP ingress concurrency scaling is more relevant for scaling based on incoming HTTP
requests rather than the state of a message queue. Since the service is triggered by messages in a Service
Bus queue, not by HTTP requests, this option does not directly help in scaling based on queue length.
For deeper insights into the technologies mentioned:
1. Kubernetes Event-Driven Autoscaling with KEDA and Azure Service Bus:
https://kedacore.io/examples/azure-servicebus/
2. Azure Container Apps Scaling Configuration: https://learn.microsoft.com/en-us/azure/container
apps/scale-config (Specifically, sections on event-driven scaling)
You configure ACR Tasks to automate image builds.
Container images must rebuild when:
Application updates occur.
Base image updates occur, such as when the underlying OS image is updated.
Regular scheduled rebuilds are required.
You need to configure ACR Tasks to support automated image rebuilds.
Which three triggers should you configure? Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one point.
A
Timer trigger
B
Source code commit trigger
C
Registry event trigger
D
Base image update trigger
E
Webhook notification trigger
Correct Answer:
A. Timer trigger
Explanation:
Technical Justification for Configuring ACR Tasks Triggers (Correct Answer: ABD)
To fully automate image rebuilds in Azure Container Registry (ACR) Tasks based on the specified
requirements, the following triggers are justified:
changes.
latest application version.
Why Other Options Are Less Suitable:
References
A. Timer Trigger: This is necessary for regular scheduled rebuilds. The timer trigger allows for periodic
rebuilds at specified intervals (e.g., daily, weekly), ensuring images are refreshed routinely regardless of other
B. Source Code Commit Trigger: Essential for application updates. By triggering on source code commits,
ACR Tasks will automatically rebuild the image whenever changes are pushed to the repository, reflecting the
D. Base Image Update Trigger: Crucial for base image updates, such as OS updates. This trigger detects
intervals, or base image updates specifically.
updates to the base image (e.g., a security patch in the underlying OS) and initiates a rebuild, ensuring the
container image stays current with its base.
C. Registry Event Trigger: While useful for reacting to events within the registry (e.g., a new image being
pushed), it does not directly address the need for rebuilds based on source code changes, scheduled
E. Webhook Notification Trigger: Similar to the Registry Event Trigger, it's more about reacting to external
notifications rather than the intrinsic triggers required for the specified scenarios (scheduled, source code
changes, and base image updates).
Azure Container Registry Tasks Documentation
Triggering ACR Tasks
DRAG DROP -
You are developing several microservices to run on Azure Container Apps.
The microservices must allow HTTPS access by using a custom domain.
You need to configure the custom domain in Azure Container Apps.
In which order should you perform the actions? To answer, move all actions from the list of actions to the answer
area and arrange them in the correct order.
A
Correct Answer:
A.
Explanation:
Enable ingress: You must first expose your application externally to obtain the target endpoint URL or IP
address needed for configuration.
Add DNS records to the domain provider: Using the details from the ingress setup, you must create the
necessary verification (TXT) and routing (CNAME or A) records at your domain registrar.
Validate the custom domain name: Azure verifies ownership by checking the DNS records you just created.
Add the custom domain name: Once verification passes, the custom domain can be formally added to the
application configuration.
Bind the certificate: Finally, after the domain is recognized by the service, an SSL/TLS certificate is bound to
it to secure HTTPS traffic.
You plan to deploy an Azure Container app.
You need to configure the container app to support session affinity.
Which ingress type and revision mode should you assign to the container app?
A
TCP ingress type and single revision mode
B
TCP ingress type and multiple revision mode
C
HTTP ingress type and multiple revision mode
D
HTTP ingress type and single revision mode
Correct Answer:
D. HTTP ingress type and single revision mode
Explanation:
Technical Justification for Correct Answer: D
To support session affinity in an Azure Container App, the correct configuration involves selecting an ingress
type that natively understands and can manage session states effectively, alongside a revision mode that
ensures consistency for these sessions. Here’s why D. HTTP ingress type and single revision mode is the best
choice, and why other options are less suitable:
Why D is Correct
HTTP Ingress Type: Session affinity (also known as sticky sessions) is more commonly and effectively
implemented with HTTP ingress types. HTTP ingress controllers can leverage HTTP headers (e.g., cookies) to
direct subsequent requests from a client to the same instance, maintaining the session state. TCP ingress,
while suitable for certain stateless or protocol-specific needs, does not natively support the same level of
session management as HTTP.
Single Revision Mode: For session affinity to work reliably, ensuring that all requests in a session are routed
to the same version of the application (revision) is crucial. Single revision mode guarantees that only one
version of the application is running at a time, simplifying the management of session states. This mode
prevents conflicts that could arise from multiple revisions handling different parts of the same session.
Why Other Options are Less Suitable
A. TCP Ingress Type and Single Revision Mode:
TCP does not support session affinity as effectively as HTTP, making this a poor choice for the requirement.
Single Revision Mode is suitable here, but the ingress type limitation makes the entire option less viable.
B. TCP Ingress Type and Multiple Revision Mode:
TCP again fails to meet the session affinity needs.
Multiple Revision Mode would further complicate session management across different revisions.
C. HTTP Ingress Type and Multiple Revision Mode:
HTTP is the right choice for session affinity.
Multiple Revision Mode, however, introduces complexity in maintaining session consistency across different
application versions, which can lead to inconsistencies in session handling.
Conclusion
Given the need for session affinity, HTTP ingress type is the clear choice due to its ability to effectively
manage session states. Single revision mode ensures that session management is straightforward and
reliable by avoiding version conflicts. Thus, D. HTTP ingress type and single revision mode is the optimal
configuration for the container app.
References
Azure Container Apps - Ingress
Azure Container Apps - Revision Modes
DRAG DROP
You deploy an API to Azure Container Apps.
The solution must provide the following functionality:
.Support the concurrent activation of multiple application versions.
.Allocate a specific percentage of incoming requests to a secondary version.
You need to configure revision behavior.
Which configurations should you use? To answer, move the appropriate configurations to the correct requirements.
You may use each configuration once, more than once, or not at all. You may need to move the split bar between
panes or scroll to view content.
NOTE: Each correct selection is worth one point.
A
Support the concurrent activation of multiple application versions: Multiple Revisions ModeAllocate a specific
percentage of incoming requests to a secondary version: Traffic splitting
Correct Answer:
A. Support the concurrent activation of multiple application versions: Multiple Revisions ModeAllocate a specific
percentage of incoming requests to a secondary version: Traffic splitting
DRAG DROP
You plan to create a Docker image that runs an ASP.NET Core application named ContosoApp. You have a setup
You need to create a Dockerfile document that meets the following requirements:
script named setupScript.ps1 and a series of application files including ContosoApp.dll.
.Call setupScript.ps1 when the container is built.
.Run ContosoApp.dll when the container starts.
The Dockerfile document must be created in the same folder where ContosoApp.dll and setupScript.ps1 are
stored.
Which five commands should you use to develop the solution? To answer, move the appropriate commands from
the list of commands to the answer area and arrange them in the correct order.
A
FROM mcr.microsoft.com/dotnet/aspnet:6.0WORKDIR /appCOPY . .RUN powershell
./setupScript.ps1ENTRYPOINT ["dotnet", "ContosoApp.dll"]
Correct Answer:
A. FROM mcr.microsoft.com/dotnet/aspnet:6.0WORKDIR /appCOPY . .RUN powershell
./setupScript.ps1ENTRYPOINT ["dotnet", "ContosoApp.dll"]
DRAG DROP -
You are preparing a container image for deployment to production.
The container image build and deployment process must ensure the following:
• The image is uniquely versioned.
• Secure authentication is used when pushing the image to Azure Container Registry (ACR).
• The image is stored in ACR for deployment.
You need to ensure that the container image build-and-push process meets the requirements.
Which action should you perform for each requirement? To answer, move the appropriate actions to the correct
requirements. You may use each action once, more than once, or not at all. You may need to move the split bar
between panes or scroll to view content.
NOTE: Each correct selection is worth one point.
A
Correct Answer:
A.
Explanation:
Use a unique tag for the image: Tagging an image with unique identifiers (such as a semantic version or a
build/commit ID) rather than continuously overwriting a generic latest tag is the fundamental method for
versioning container images.
Authenticate to ACR by using Microsoft Entra ID: Leveraging Microsoft Entra ID (via service principals,
managed identities, or user tokens) provides robust, role-based access control (RBAC) to authorize secure
image push operations to Azure Container Registry.
Push the image to ACR: Uploading the compiled container layers to the remote registry (docker push or az acr
build) makes the artifact available inside the centralized repository for downstream deployment environments.
DRAG DROP
-
You plan to deploy a web application to AKS.
The solution must
.Scale out the application by adding more pods during peak CPU usage.
.Expose the application internally within the cluster only.
You need to configure a Kubernetes resource for each requirement.
Which resources should you configure? To answer, move the appropriate resources to the correct requirements.
You may use each resource once, more than once, or not at all. You may need to move the split bar between panes
or scroll to view content.
NOTE: Each correct selection is worth one point.
A
Scale out the application by adding more pods during peak CPU usage: Horizontal Pod AutoscalerExpose the
application internally within the cluster only: ClusterIP
Correct Answer:
A. Scale out the application by adding more pods during peak CPU usage: Horizontal Pod AutoscalerExpose the
application internally within the cluster only: ClusterIP
Questions: 1-10 out of 140
Continue Full Practice..
GET ALL 140 QUESTIONS