microsoft AI-200: Developing AI Cloud Solutions on Azure · Practice questions

1. Develop containerized solutions on Azure Practice Questions

Review 10 sample questions with their correct answers and explanations. Sign up free to continue with the full topic quiz.

Sign up free for the full quiz

Question 1

An ACR task builds an image from a GitHub repository. The image should rebuild on every commit to main. What trigger should the task use?

  1. A manual trigger only
  2. A timer trigger that runs every minute and checks the repository for changes
  3. A source code commit trigger with a GitHub token — Correct
  4. A base image trigger

Correct answer

A source code commit trigger with a GitHub token

Explanation

ACR Tasks support source commit triggers that start a build when code is pushed to a branch.

Question 2

A container app shows no output in the portal log stream and keeps restarting. Which log source shows platform events such as image pull failures and probe failures?

  1. Console logs
  2. Azure Activity log only
  3. System logs — Correct
  4. Application Insights availability tests

Correct answer

System logs

Explanation

Container Apps system logs report platform events like image pull errors, container start failures and probe failures. Console logs show app stdout and stderr.

Question 3

A Deployment manifest sets resources.limits.memory to 512Mi. The container regularly uses more memory while loading an embedding model. What symptom is most likely?

  1. The HPA scales the cluster nodes
  2. The pod is throttled and runs slower, but is never restarted because memory limits are only advisory
  3. The Service drops to ClusterIP
  4. The container is killed with OOMKilled and restarted — Correct

Correct answer

The container is killed with OOMKilled and restarted

Explanation

Exceeding a memory limit causes the kernel to kill the container (OOMKilled). Raise the limit or reduce memory use.

Question 4

You need to collect container stdout logs and node metrics from AKS into Log Analytics with minimal setup. What should you enable?

  1. Kubernetes Dashboard
  2. Network Watcher packet capture
  3. Container insights (the Azure Monitor add-on) for the cluster — Correct
  4. Diagnostic settings on the cluster resource that send kube-apiserver logs to a storage account

Correct answer

Container insights (the Azure Monitor add-on) for the cluster

Explanation

Container insights collects container logs, Kubernetes events and performance metrics into a Log Analytics workspace.

Question 5

A container app's image, environment variables and scale rules are changed in one update. The app uses multiple revision mode. What happens?

  1. The changes are applied to the running replicas of the current revision without creating a new revision
  2. The existing revision is modified in place
  3. The container app environment is recreated
  4. A new revision is created, and traffic is routed according to the traffic weights — Correct

Correct answer

A new revision is created, and traffic is routed according to the traffic weights

Explanation

Changes to the revision template (image, env vars, scale rules) create a new revision. In multiple revision mode, traffic follows the configured weights.

Question 6

You apply a Kubernetes Deployment manifest to AKS. Which command applies the manifest and creates or updates the resources it defines?

  1. az aks update --file deployment.yaml
  2. kubectl apply -f deployment.yaml — Correct
  3. kubectl rollout restart -f deployment.yaml
  4. kubectl create namespace -f deployment.yaml

Correct answer

kubectl apply -f deployment.yaml

Explanation

kubectl apply creates or updates resources declaratively from a manifest file.

Question 7

A Deployment's manifest is stored in Git. Operators sometimes edit live objects with kubectl edit, causing drift. Which practice addresses this?

  1. Turn off the Kubernetes API server audit logs
  2. Use kubectl edit with --save-config so changes are recorded in the last-applied annotation
  3. Apply manifests only from source control, for example through a pipeline or GitOps — Correct
  4. Store manifests in a ConfigMap

Correct answer

Apply manifests only from source control, for example through a pipeline or GitOps

Explanation

Treating Git as the source of truth and applying manifests from it prevents configuration drift.

Question 8

A pod remains in the Pending state. Which command best reveals why the scheduler cannot place it, such as insufficient CPU?

  1. kubectl port-forward <pod> 8080
  2. kubectl describe pod <pod> — Correct
  3. kubectl exec <pod> -- env
  4. kubectl logs <pod>

Correct answer

kubectl describe pod <pod>

Explanation

kubectl describe shows the pod's events, including scheduling failures such as insufficient resources or unsatisfied node selectors.

Question 9

A container app must read a third-party API key. The key must not appear in the app's environment variable definitions in plain text. What should you do?

  1. Store it as a container app secret and reference it with secretRef — Correct
  2. Bake it into the image in a separate layer and mark the repository as private in the registry
  3. Store it in the ingress configuration as a custom header
  4. Put it in the revision suffix

Correct answer

Store it as a container app secret and reference it with secretRef

Explanation

Container Apps secrets are referenced by environment variables using secretRef, and can also be sourced from Key Vault with a managed identity.

Question 10

Pods in AKS stay in ImagePullBackOff. The image is in a private ACR in the same subscription. What is the most likely fix?

  1. Change the Service type to LoadBalancer
  2. Attach the registry with az aks update --attach-acr — Correct
  3. Add a readiness probe
  4. Increase the node pool size so the kubelet has more capacity to download large images from the registry

Correct answer

Attach the registry with az aks update --attach-acr

Explanation

ImagePullBackOff with a private registry usually means the cluster cannot authenticate. Attaching ACR grants AcrPull to the kubelet identity.

Ready for the full quiz?

Create a free QuizAnalyst account to practice the complete question set and save your progress.

Sign up free for the full quiz