A team is deploying a stateful application on GKE that requires each pod to have its own persistent disk. Which TWO Kubernetes resources are essential for this deployment? (Choose two.)
StatefulSet is the correct workload API for stateful applications on GKE. It gives each pod a stable, unique network identity (e.g., `database-0`, `database-1`) and, via `volumeClaimTemplate`, provisions a dedicated PersistentVolume and PVC for each replica. Pods are created and scaled in ordinal order, ensuring predictable startup/shutdown sequences. This is ideal for databases, message brokers, and other apps that need sticky identity and per-pod persistent storage.
Why this answer
A StatefulSet is essential because it provides stable, unique network identifiers and ordered, graceful deployment and scaling for stateful applications, ensuring each pod maintains its identity and persistent storage binding across rescheduling. A PersistentVolumeClaim (PVC) is required to request and bind a persistent disk to each pod, enabling the pod to retain its data independently of other pods in the set.
Exam trap
Google Cloud often tests the misconception that a Deployment can handle stateful workloads with persistent storage, but the trap is that a Deployment does not guarantee stable pod identities or ordered PVC binding, causing data loss or identity conflicts when pods are rescheduled.