Courseiva
mediumMultiple ChoiceObjective-mapped

Google ACE Practice Question: Deploying a stateful application on Google…

A company is deploying a stateful application on Google Kubernetes Engine (GKE) that requires persistent storage. Each pod needs its own dedicated persistent disk that is not shared. Which Kubernetes resource should be used to manage the deployment?

⚠ Common exam trap

Google Cloud often tests the distinction between Deployments and StatefulSets, and the trap here is that candidates mistakenly choose a Deployment with a PVC template, not realizing that Deployments treat all pods as interchangeable and would share the same PVC, violating the 'dedicated disk per pod' requirement.

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

A StatefulSet with volumeClaimTemplates is designed for stateful applications where each pod requires its own dedicated PersistentVolume (PV) that is not shared. The volumeClaimTemplates automatically generate a unique PersistentVolumeClaim (PVC) for each pod replica, ensuring each pod gets a separate, stable persistent disk that persists across rescheduling. This matches the requirement for a stateful application on GKE where pods need dedicated, non-shared storage.

Answer analysis

Option-by-option breakdown

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

  • Job with PersistentVolume

    Why it's wrong here

    A Job is designed for finite, batch-style workloads that run until completion, not for long-running application services that must stay available. Attaching a PersistentVolume to a Job doesn't grant the pod a stable identity or automatically provision durable storage, and once the Job's pod finishes or fails, the pod won't be restarted with the same claim. Therefore it cannot provide the operational behavior expected from a production stateful application.

  • DaemonSet with hostPath volumes

    Why it's wrong here

    DaemonSet ensures that a copy of a pod runs on every node, which is intended for node-level infrastructure such as log collectors or monitoring agents, not for a stateful application with a defined number of replicas. Furthermore, hostPath volumes refer to a directory on the node's filesystem, so the data is tied to that specific node, lacks per-pod isolation, and is lost or inaccessible if the pod moves to another node. This makes it unsuitable for durable, dedicated persistent storage for each stateful replica.

  • Deployment with PersistentVolumeClaim template

    Why it's wrong here

    A Deployment manages a group of identical, interchangeable pods, and its template cannot include volumeClaimTemplates; you can only reference existing PVCs or shared volumes. Because all replicas are ephemeral and share the same volume, or the Deployment cannot guarantee a fresh PVC per pod, scaling or rolling updates won't preserve a stable binding between a pod and its disk. Thus a Deployment fails to provide the unique persistent storage and stable pod identity required by a stateful application.

  • StatefulSet with volumeClaimTemplates

    Why this is correct

    StatefulSet is purpose-built for stateful applications: each pod gets a stable, ordinal identity (e.g., web-0, web-1) and a matching PersistentVolumeClaim provisioned from the volumeClaimTemplates block. When a pod is rescheduled, the StatefulSet controller reattaches the same PVC to the same pod name, preserving the data and ensuring consistent storage across restarts. This combination of stable identity, ordered deployment, and per-pod persistent storage is exactly what a stateful service on Google Kubernetes Engine needs.

Go deeper

Related to this question

About these practice questions

Courseiva writes every ACE question from scratch — 769 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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 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.