Courseiva
mediumMultiple ChoiceObjective-mapped

Google ACE Practice Question: Deploying a stateful application to GKE that…

You are deploying a stateful application to GKE that requires each pod to have its own dedicated persistent disk, and each disk must persist data even if the pod is rescheduled to a different node. Which Kubernetes object type should you use?

⚠ Common exam trap

Test-takers frequently choose a Deployment with a shared PVC (Option A) because they think 'shared storage' is simpler, but they overlook the requirement for each pod to have its own dedicated disk, which a shared volume cannot provide.

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

StatefulSet with volumeClaimTemplates to provision individual PVCs per pod.

A StatefulSet with volumeClaimTemplates is the correct choice because it automatically provisions a unique PersistentVolumeClaim (PVC) for each pod replica, ensuring each pod gets its own dedicated persistent disk. When a pod is rescheduled to a different node, the PVC remains bound to its original PersistentVolume (PV), allowing the new pod to mount the same disk and retain the data. This meets the requirement for both per-pod dedicated storage and data persistence 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.

  • Deployment with a shared PersistentVolumeClaim mounted by all pods.

    Why it's wrong here

    A Deployment with a shared PersistentVolumeClaim mounts the same underlying disk into every replica, so all pods read from and write to a single filesystem rather than having dedicated storage. This requires the volume to support ReadWriteMany (RWX) access mode, but many cloud persistent disk types, such as zonal and regional persistent disks, only support ReadWriteOnce (RWO). Moreover, a shared disk creates a performance bottleneck and a single point of failure, making it incorrect for the requirement of each pod requiring its own dedicated volume.

  • StatefulSet with volumeClaimTemplates to provision individual PVCs per pod.

    Why this is correct

    StatefulSets are designed for applications that need stable network identities and dedicated persistent storage for each replica. The volumeClaimTemplates field causes Kubernetes to generate a unique PVC for every pod, which binds to a persistent disk that remains even after the pod is terminated. When a StatefulSet pod is rescheduled, it reattaches to the same PVC, ensuring data persists and remains exclusively associated with that pod.

  • DaemonSet with a hostPath volume on each node.

    Why it's wrong here

    A DaemonSet schedules exactly one pod per node, not multiple replicas, so it cannot provide each of many application instances with its own distinct volume. hostPath mounts a directory from the node's local filesystem, meaning data is tightly coupled to that node and is lost if the pod is rescheduled to a different node. This design fails to deliver the durable, per-pod persistent storage required.

  • Deployment with an emptyDir volume for each pod.

    Why it's wrong here

    An emptyDir volume is created empty when the pod is assigned to a node and lives only as long as that pod runs on that node. If the pod terminates, is deleted, or is rescheduled, the emptyDir is erased, so any data written to it disappears. Because the question requires persistence across rescheduling, emptyDir is unsuitable for storing application data durably.

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.