Courseiva
Question 447 of 881
Develop Azure compute solutionseasyMultiple ChoiceObjective-mapped

AZ-204 Develop Azure compute solutions Practice Question

You deploy a container to Azure Container Instances. The container needs to persist data when it restarts. You mount an Azure Files share to a directory inside the container. Which volume type is this?

⚠ Common exam trap

Candidates often confuse `emptyDir` with persistent storage because it is commonly used in Kubernetes for temporary data, but in Azure Container Instances, `emptyDir` does not survive container restarts, whereas `azureFile` is the correct choice for persistence.

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

azureFile

Azure Container Instances supports mounting an Azure Files share as a volume to persist data across container restarts. The `azureFile` volume type references a pre-created Azure storage account and file share, which is mounted into the container's filesystem using SMB 3.0 protocol. This ensures data survives container crashes or restarts, as it is stored externally in Azure Files.

Answer analysis

Option-by-option breakdown

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

  • emptyDir

    Why it's wrong here

    An emptyDir volume provides a temporary, empty directory for a container within its pod. This volume is created when the pod is assigned to a node and exists only as long as that specific pod is running on the node. Any data written to an emptyDir is lost permanently when the container restarts, the pod is deleted, or the node fails, making it entirely unsuitable for persistent data storage.

  • gitRepo

    Why it's wrong here

    A gitRepo volume is specifically designed to clone a Git repository into a container at startup. It's primarily used for injecting initial application code, configuration files, or static assets directly from a specified repository URL. While it provides initial content, it does not offer persistent storage for data generated or modified by the application during its runtime, as changes are not committed back to the Git repository and are lost upon container restart.

  • azureFile

    Why this is correct

    An azureFile volume mounts an Azure Files share directly into a container, providing robust, network-attached persistent storage. Data written to this volume is stored externally in Azure Storage, ensuring it survives container restarts, crashes, or even the complete deletion and recreation of the container instance. This decoupling of storage from the container lifecycle is crucial for stateful applications requiring data durability and availability across container operations.

  • secret

    Why it's wrong here

    A secret volume is specifically designed to securely inject sensitive data, such as API keys, database credentials, or configuration certificates, into a container. This sensitive data is typically mounted as files within the container's filesystem or exposed as environment variables, retrieved from an Azure Key Vault or Kubernetes Secret. It serves as a secure mechanism for configuration management and credential injection rather than a general-purpose persistent storage solution for application-generated data.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 11, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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