Courseiva

AZ-500 Secure compute, storage, and databases Practice Question

An AKS cluster needs to pull container images from a private Azure Container Registry (ACR). The security policy requires that the AKS cluster identity should not have direct access to the ACR; instead, a service principal with the AcrPull role should be used, with credentials stored as a Kubernetes secret. Which authentication method should be configured on the AKS cluster?

⚠ Common exam trap

Watch out — candidates often confuse 'AKS managed identity' with the requirement for a service principal secret, mistakenly thinking managed identity is always the best practice, but the question explicitly prohibits direct cluster identity access to ACR.

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

✓

Kubernetes pull secret using a service principal

The scenario explicitly requires that the AKS cluster identity not have direct access to ACR, and instead mandates using a service principal with AcrPull role whose credentials are stored as a Kubernetes secret. A Kubernetes pull secret of type 'docker-registry' stores the service principal's client ID and client secret, which kubelet uses to authenticate to ACR when pulling images. This method decouples the AKS cluster's managed identity from ACR access, satisfying the security policy.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    AKS managed identity

    Why it's wrong here

    Using the AKS cluster's managed identity to pull from ACR grants registry access at the cluster level, meaning any workload running on any node in the cluster can potentially use that identity to obtain images. This violates the policy requiring the use of a dedicated service principal secret, because a managed identity is not a static service principal secret and lacks the per-pod scoping needed to limit access to specific workloads. Worse, a cluster-scoped identity amplifies the blast radius if the cluster or a node is compromised, as the credential is not easily revocable per workload.

  • ✗

    ACR admin account

    Why it's wrong here

    The ACR admin account is a static, shared username and password that carries full registry permissions, including push and delete, far beyond the read-only access needed to pull images. Because it is a single credential with no per-registry or per-repository scoping, any secret leak exposes the entire registry, and the lack of built-in rotation and auditing mechanisms makes it unsuitable for production. A service principal with the AcrPull role would provide a narrowly scoped, independently rotatable credential, which is why the admin account fails the least-privilege and secret-management requirements.

  • ✓

    Kubernetes pull secret using a service principal

    Why this is correct

    To implement this, create a service principal with only the AcrPull role, use its app ID and password as the username and password fields, and store the base64-encoded Docker config in a Kubernetes secret of type `kubernetes.io/dockerconfigjson`. Reference that secret in a pod's `imagePullSecrets` so the kubelet uses it to authenticate only for the pods that declare it, limiting access to those specific workloads. This credential is scoped to the service principal and can be rotated or revoked independently without affecting the cluster's control-plane identity, making it the correct choice when the policy explicitly demands a service principal secret instead of an identity-based assignment.

  • ✗

    Microsoft Entra ID pod identity

    Why it's wrong here

    Microsoft Entra ID Pod Identity assigns an Microsoft Entra ID managed identity to individual pods, enabling them to request a token and authenticate to ACR via `az acr login` or token-based pulls; however, this is fundamentally an identity-based mechanism, not a static service principal secret stored in a Kubernetes pull secret. Introducing it for image pulls would require deployed components like NMI (Node Managed Identity) and MIC (Managed Identity Controller), adding complexity and operational overhead while still violating the stated requirement to use a service principal secret. Additionally, the policy specifically forbids using any cluster or pod identity for this purpose, so this approach is not merely suboptimal—it is non-compliant by design.

About these practice questions

One of 617 original AZ-500 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This AZ-500 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 AZ-500 exam.