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?
- A manual trigger only
- A timer trigger that runs every minute and checks the repository for changes
- A source code commit trigger with a GitHub token — Correct
- 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?
- Console logs
- Azure Activity log only
- System logs — Correct
- 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?
- The HPA scales the cluster nodes
- The pod is throttled and runs slower, but is never restarted because memory limits are only advisory
- The Service drops to ClusterIP
- 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?
- Kubernetes Dashboard
- Network Watcher packet capture
- Container insights (the Azure Monitor add-on) for the cluster — Correct
- 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?
- The changes are applied to the running replicas of the current revision without creating a new revision
- The existing revision is modified in place
- The container app environment is recreated
- 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?
- az aks update --file deployment.yaml
- kubectl apply -f deployment.yaml — Correct
- kubectl rollout restart -f deployment.yaml
- 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?
- Turn off the Kubernetes API server audit logs
- Use kubectl edit with --save-config so changes are recorded in the last-applied annotation
- Apply manifests only from source control, for example through a pipeline or GitOps — Correct
- 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?
- kubectl port-forward <pod> 8080
- kubectl describe pod <pod> — Correct
- kubectl exec <pod> -- env
- 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?
- Store it as a container app secret and reference it with secretRef — Correct
- Bake it into the image in a separate layer and mark the repository as private in the registry
- Store it in the ingress configuration as a custom header
- 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?
- Change the Service type to LoadBalancer
- Attach the registry with az aks update --attach-acr — Correct
- Add a readiness probe
- 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.