Courseiva
Develop Azure compute solutionseasyMultiple ChoiceObjective-mapped

AZ-204 Develop Azure compute solutions Practice Question

A company deploys a stateful application as a container in Azure Container Instances (ACI). They need persistent storage that can be shared across multiple container instances and retain data after container restarts. Which volume mount should they use?

⚠ Common exam trap

A common mix-up: candidates confuse emptyDir (which is ephemeral and pod-scoped) with persistent storage, or assume host path works in ACI because it works in Kubernetes, but ACI does not expose host filesystem access.

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

Azure Files share

Azure Files shares provide fully managed SMB file shares in the cloud that can be mounted as volumes in Azure Container Instances. This allows multiple container instances to read and write to the same persistent storage concurrently, and data persists independently of container lifecycles, surviving restarts or deletions. The scenario requires shared, persistent storage across instances, which Azure Files uniquely supports among the given options.

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 is created when a pod is scheduled on a node and exists only as long as that pod is running. It provides a temporary, empty directory for containers within the pod to share, useful for scratch space, caching, or temporary file storage. However, all data stored in an emptyDir is deleted permanently when the pod terminates, making it fundamentally unsuitable for stateful applications requiring data persistence beyond the pod's lifecycle.

  • Azure Files share

    Why this is correct

    Azure Files share volumes provide durable, network-attached storage that persists independently of the container's lifecycle. This fully managed file share service supports SMB and NFS protocols, allowing multiple container instances or groups to concurrently read from and write to the same data. Its ability to provide shared, persistent storage that survives container restarts and can be accessed across different nodes makes it an ideal solution for stateful applications requiring high availability and data durability.

  • Host path

    Why it's wrong here

    Host path volumes directly mount a file or directory from the underlying node's filesystem into a container. While this provides persistence, it tightly couples the container to a specific host node, making the application non-portable and difficult to scale or reschedule across different nodes. This dependency on a single node makes host path volumes unsuitable for stateful applications in a distributed container environment where high availability and flexibility are crucial.

  • Secret volume

    Why it's wrong here

    Secret volumes are designed to securely inject sensitive data, such as API keys, passwords, or certificates, into containers as files or environment variables. They are typically mounted as read-only, in-memory (tmpfs) filesystems, meaning any data written to them by the application is not durable and will be lost upon container or pod termination. Therefore, they are entirely unsuitable for persisting application state or general-purpose data that needs to survive restarts.

About these practice questions

This AZ-204 question is part of Courseiva's 881-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 →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

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.