Sample configurations for running a stateful container

You can use the CSI (Container Storage Interface) driver for running stateful containers with a storage volume provisioned from IBM block storage systems.

About this task

These examples illustrate a basic configuration required for running a stateful container with volumes provisioned on an IBM Spectrum Virtualize Family storage system.

While these examples specify the use of IBM Spectrum Virtualize products, the same configuration is used on all supported storage system types.

The following are examples of different types of secret names that can be given per storage type.
Storage system name Secret name
IBM FlashSystem A9000
IBM FlashSystem A9000R
a9000-array1
IBM Spectrum Virtualize Family including IBM SAN Volume Controller and IBM FlashSystem family members built with IBM Spectrum Virtualize (FlashSystem 5010, 5030, 5100, 7200, 9100, 9200, 9200R storwize-array1
IBM DS8000 Family products DS8000-array1
This example includes the following steps:
  • Creating a secret for the storage system.
  • Creating a storage class (gold).
  • Creating a PersistentVolumeClaim (PVC) that uses the storage class gold and show some details on the created PVC and persistent volume (PV).
  • Creating a StatefulSet and observing the mountpoint / multipath device that was created by the driver.
  • Writing data inside the StatefulSet, and then deleting and recreating the StatefulSet, verifying that the data still exists.

Use the following sections for samples on running a stateful container on Statefulset volumes using file systems and raw block volumes: