Courseiva
mediumMultiple ChoiceObjective-mapped

Google ACE Practice Question: A team is migrating a stateful application with…

A team is migrating a stateful application with local disk writes to GKE. The application requires a dedicated persistent disk that follows the Pod if it's rescheduled to a different node. Which Kubernetes resource provides this?

⚠ Common exam trap

Google Cloud often tests the distinction between ephemeral (emptyDir, HostPath) and persistent (PVC-backed) storage, trapping candidates who confuse node-local storage with cluster-wide persistent volumes that follow Pods across nodes.

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

A PersistentVolumeClaim backed by a GCE persistent disk StorageClass

A PersistentVolumeClaim (PVC) backed by a GCE persistent disk StorageClass is the correct choice because it provides a durable, network-attached block storage volume that persists independently of the Pod's lifecycle. When the Pod is rescheduled to a different node, the PVC ensures the GCE persistent disk is detached from the old node and reattached to the new node, preserving the application's state. This meets the requirement for a dedicated persistent disk that follows the Pod across rescheduling events.

Answer analysis

Option-by-option breakdown

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

  • A HostPath volume pointing to a directory on the node

    Why it's wrong here

    A HostPath volume mounts a file or directory from the specific node where the Pod is currently running into the container. This storage is local to that node: if the Pod is rescheduled to a different node (due to a node failure, rolling update, or scale-down), the new node's path will not contain the data written on the old node. HostPath also creates a security risk because it can expose sensitive host filesystem paths to containers. It is rarely appropriate for production stateful workloads, except for certain system-level tools that are node-bound.

  • A ConfigMap mounted as a volume

    Why it's wrong here

    A ConfigMap mounted as a volume is designed for injecting configuration data (e.g., environment variables, config files) into Pods, not for storing application state. ConfigMap volumes are presented as read-only mounts by Kubernetes, so an application cannot write to them at runtime. Additionally, ConfigMap data is stored in the cluster's etcd rather than on a persistent storage backend, making it unsuitable for any workload that requires durable, writable storage. Attempting to use a ConfigMap for state will result in write failures and data loss.

  • A PersistentVolumeClaim backed by a GCE persistent disk StorageClass

    Why this is correct

    A PersistentVolumeClaim (PVC) backed by a GCE persistent disk StorageClass provides durable, network-attached block storage that is provisioned independently of any specific node. When a Pod using this PVC is rescheduled, the underlying PersistentVolume (a GCE PD) is detached from the old node and attached to the new node, preserving all application-written data. This makes it the correct choice for stateful workloads that must survive Pod restarts or node failures. Note that the PD is zonal, so the new node must be in the same zone as the disk.

  • An emptyDir volume scoped to the Pod

    Why it's wrong here

    An emptyDir volume is created when a Pod is bound to a node and exists only as long as that Pod remains running on that node. If the Pod is deleted or rescheduled to another node, the contents of the emptyDir are permanently erased. It is intended for ephemeral scratch space, such as caches, temporary files, or inter-container sharing within the same Pod, not for data that must persist across Pod restarts or node migrations. Thus it cannot guarantee durability for stateful applications.

About these practice questions

One of 769 original ACE 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 ACE practice question is part of Courseiva's free Google Cloud 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 ACE exam.