I've seen documentation, blog posts, and stackoverflow responses indicating 
two different solutions for persisting data across pod restarts.

In one solution, it's a volume mounted as persistent volume claim within a 
Deployment. [3]

In the other, the persistent volume claim is mounted within a StatefulSet.

The official documentation clearly indicates Deployments for stateless [1] 
applications and StatefulSets for stateful [2] applications.

The question is, does the Deployment as stateful application set up work 
even though the documentation appears to indicate otherwise? Is there a 
significant difference between the two options?
And does it make sense to use the StatefulSet for one pod just to set up 
persistence? The Kubernetes documentation [4] describes an unrelated goal 
for StatefulSets, indicating that they "manage the deployment and scaling 
of a set of Pods 
<https://kubernetes.io/docs/concepts/workloads/pods/pod-overview/>, and 
provides guarantees about the ordering and uniqueness of these Pods."

[1] https://cloud.google.com/kubernetes-engine/docs/how-to/stateless-apps
[2] https://cloud.google.com/kubernetes-engine/docs/how-to/stateful-apps
[3] https://devopscube.com/persistent-volume-google-kubernetes-engine/
[4] https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/

-- 
You received this message because you are subscribed to the Google Groups 
"Kubernetes user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to kubernetes-users+unsubscr...@googlegroups.com.
To post to this group, send email to kubernetes-users@googlegroups.com.
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.
  • [kubernetes-users... Tyler Johnson

Reply via email to