1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to Kubernetes

Connected

Exercise

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.

Instructions 1/6

undefined XP
    1
    2
    3
    4
    5
    6
  • Inspect the .yml Manifests to get an overview about what is going to be deployed.
  • You can use the command line tool cat to see the content of individual files. Use the asterisk wildcard ("*") to show the content of all Manifests.