Make sure you have a Kubernetes cluster ready and kubectl configured to manage the cluster resources.
Clone the k8sdevopscookbook/src repository to your workstation to use the manifest files under the chapter6 directory, as follows:
$ git clone https://github.com/k8sdevopscookbook/src.git
$ cd src/chapter6
Make sure the Container Storage Interface (CSI) driver from your preferred storage vendor is installed on your Kubernetes cluster and has implemented the snapshot functionality. We covered the installation of the AWS EBS, GCP PD, Azure Disk, Rook, and OpenEBS CSI drivers in Chapter 5, Preparing for Stateful Workloads.
The instructions in this section work similarly with other vendors that support snapshots via CSI. You can find these additional drivers on the Kubernetes CSI documentation site at: https://kubernetes-csi.github.io/docs/drivers.html.