top | item 42610520

(no title)

LetMeLogin | 1 year ago

Totally. Plus it's misguiding readers with different functionality and use cases.

For example "Persistent Storage: StatefulSets provide persistent storage to their pods through Kubernetes PersistentVolumes".

The thing is that STS doesn't do that. That's actually in POD definition.

discuss

order

vanillax|1 year ago

Agree. Its more confusion. PVC / PV are native to k8s not something part of statefulsets. In fact you _probably_ only need to use Statefulsets for databases. Which is probably going to be abstracted away with Operators.

verdverm|1 year ago

It's more about roll forward/backward and services with a master+replica or leader election. That PVCs are common in stateful sets is more a symptom than the cause

MuffinFlavored|1 year ago

I had no idea... probably shows I haven't hit an advanced enough use case.

> why isn't a statefulset just a deployment/pod with PVC mounted?

* StatefulSets provide predictable pod names and hostnames (pod-0, pod-1)

* StatefulSets handle pods sequentially (0→1→2), ensuring proper cluster initialization.

* StatefulSets maintain a consistent pod-to-PVC mapping even after pod rescheduling.

* StatefulSets delete pods in reverse order,

wbl|1 year ago

You can look at the structure in TFA to see this. The only discussion of the volume mounting is in the pod template, not the Stateful Set itself.

vanillax|1 year ago

You can map a PVC back to a pod without statefulset. You just need to create the PV and PVC and map it to a deployment.

null0pointer|1 year ago

Author is most likely farming credibility with blog spam.