Volumes and Handling Failures

Learn about volumes in StatefulSets Pods and how to handle Pod failure.

StatefulSets and Volumes

Volumes are an important part of a StatefulSet Pod’s sticky ID (state).

When StatefulSets create Pods, they also create any volumes the Pods require. To help with this, they give the volumes special names that Kubernetes uses to connect them to the correct Pods. The following figure shows a StatefulSet called tkb-sts requesting three Pods, each with a single volume. You can see how Kubernetes uses the volume names to connect them to the right Pods.

Get hands-on with 1400+ tech skills courses.