SC-100 Design security solutions for infrastructure Practice Question
You are designing a security solution for Azure Kubernetes Service (AKS). You need to ensure that only authorized container images from a private container registry can run in the cluster. What should you configure?
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 Azure Policy to enforce that containers run only from allowed registries.
Azure Policy is the correct choice (A) because it can enforce admission-time constraints on an AKS cluster, such as an allowed-registries policy that denies pods whose images do not originate from the specified private Azure Container Registry. This directly satisfies the requirement that only authorized images from a private registry can run. Option B is incorrect because ACR Tasks scan images for vulnerabilities but do not restrict which registries pods may pull from. Option C is incorrect because network policies control pod-level traffic, not image provenance, and blocking outbound traffic does not enforce registry allowlisting. Option D is incorrect because Microsoft Defender for Containers provides threat detection and posture management, not admission control that blocks unauthorized images.
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 Azure Policy to enforce that containers run only from allowed registries.
Why this is correct
Azure Policy's built-in 'Ensure only allowed container images' initiative works with the Azure Policy add-on for AKS, which installs Gatekeeper as a validating admission webhook. At pod creation or update, the policy evaluates the image repository against an allowed list of fully qualified registry names, rejecting any non-conforming pod spec before it is persisted to etcd. This provides deterministic, cluster-wide, preventive enforcement rather than relying on runtime detection or network filtering.
- ✗
Implement Azure Container Registry tasks to scan images.
Why it's wrong here
ACR Tasks are primarily a CI/CD workflow engine for building, patching, and importing container images, and they can be chained to trigger vulnerability scanning, but they have no admission control or audit capability over what Kubernetes deploys. Once an image is built and pushed, ACR Tasks have no hook into the AKS control plane to inspect or veto pod creation requests. Scanning is inherently a detective control; it can identify vulnerable images in a registry, but it cannot stop a pod from referencing a disallowed image.
- ✗
Configure network policies in AKS to block outbound traffic to public registries.
Why it's wrong here
Kubernetes NetworkPolicies in AKS govern IP address and port-level traffic between pods and external endpoints, not the semantic content of a pod's image reference. The kubelet pulls images directly from a container registry in the node's network namespace before the pod starts, so an egress policy that blocks reachability to public registries would also break legitimate pulls from those registries if the policy could even cover the kubelet's traffic. Even if you blocked egress to public registries, nothing prevents a pod manifest from specifying an unauthorized image—the image simply fails to pull or runs only if cached, meaning the policy is not an enforcement point for allowed registries.
- ✗
Enable Microsoft Defender for Containers to block unauthorized images.
Why it's wrong here
Microsoft Defender for Containers is a cloud workload protection platform that provides vulnerability assessment, runtime threat detection, and security recommendations for AKS clusters and ACR images. It acts as a detective and monitoring control—alerting on suspicious runtime behavior or known vulnerabilities—but it does not intercept Kubernetes API server admissions and therefore cannot block a pod from being scheduled with an unauthorized image. The service can say that an image is bad, but it has no native capability to deny its deployment based on a registry allowlist.
Go deeper
Related to this question
About these practice questions
This SC-100 question is part of Courseiva's 605-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 SC-100 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 SC-100 exam.