In this section, we will create Volume Snapshots from our persistent volumes in Kubernetes. By following this recipe, you will learn how to enable the Volume Snapshot functionality, create snapshot storage classes, and restore from existing Volume Snapshots.
Getting ready
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...