StatefulSet

The Kubernetes object for replicated applications where each pod needs a stable name and its own storage, such as databases.

In more detail

Pods are named with an ordinal, web-0, web-1 and so on, and keep that name and their claim when replaced. A headless Service gives each one a stable DNS name, and volume claim templates create one claim per replica. Pods start and stop in order by default.

Example

kubectl get pvc -l app=web

Related terms

Taught in

References

Certification courses