Get startedGet started for free

StatefulSet With Attached Storage

In this exercise, you will again use the Kubernetes concepts for storage. This time, you will create a basic StatefulSet with attached storage. Each Pod of the StatefulSet will have a dedicated Persistent Volume (PV) attached. Of course, all of the necessary PVs will be created dynamically.

You will use a predefined basic storage class (local-path) that simulates a real-world storage system attached to your Kubernetes cluster. Furthermore, you will use a Kubernetes Namespace here to organize your Kubernetes objects.

Note again how "storage and compute" are separated here: your Pods (the "compute") have access to attached PVs all the time but can be deleted and recreated at any time without spoiling storage. If, for whatever reason, a Pod dies, stored data is kept and will be reattached to a recreated Pod.

This exercise is part of the course

Introduction to Kubernetes

View Course

Hands-on interactive exercise

Turn theory into action with one of our interactive exercises

Start Exercise