PROFESSIONAL-CLOUD-DEVELOPER · Question #86
You are planning to deploy your application in a Google Kubernetes Engine (GKE) cluster. Your application can scale horizontally, and each instance of your application needs to have a stable network…
The correct answer is B. StatefulSet. StatefulSet is the correct GKE workload object when pods need stable, persistent identities and dedicated persistent storage. A StatefulSet assigns each pod a stable, ordered hostname (e.g., app-0, app-1) that persists across rescheduling, and it creates a unique…
Question
You are planning to deploy your application in a Google Kubernetes Engine (GKE) cluster. Your application can scale horizontally, and each instance of your application needs to have a stable network identity and its own persistent disk. Which GKE object should you use?
Options
- ADeployment
- BStatefulSet
- CReplicaSet
- DReplicaController
How the community answered
(55 responses)- A16% (9)
- B71% (39)
- C4% (2)
- D9% (5)
Explanation
StatefulSet is the correct GKE workload object when pods need stable, persistent identities and dedicated persistent storage. A StatefulSet assigns each pod a stable, ordered hostname (e.g., app-0, app-1) that persists across rescheduling, and it creates a unique PersistentVolumeClaim per pod so each instance retains its own data. A Deployment (A) is for stateless applications where any pod is interchangeable. A ReplicaSet (C) manages pod replicas but without stable identities or per-pod storage - it is normally managed by a Deployment. ReplicationController (D) is the legacy predecessor to ReplicaSet and similarly lacks StatefulSet's guarantees.
Topics
Community Discussion
No community discussion yet for this question.