Create and use local snapshots on FlashArray
Summary and Key concepts
Summary
This article provides a detailed guide on how to create and manage snapshots of Portworx volumes in Kubernetes using Stork. It covers the process of creating snapshots for both single PVCs and groups of PVCs using label selectors, restoring snapshots to new or existing PVCs, and performing in-place restores. The article highlights the importance of using annotations for managing snapshot operations and explains how to handle snapshots across namespaces. Additionally, it includes guidance on verifying snapshots and restoring operations using the Kubernetes CLI tools like kubectl
and Stork's CLI storkctl
.
Kubernetes Concepts
- PersistentVolumeClaim (PVC): A request for storage in Kubernetes, used for creating and restoring snapshots.
- StorageClass: Defines how storage is provisioned, such as using the
stork-snapshot-sc
StorageClass for restoring snapshots. - Annotations: Metadata used to manage snapshots, including cross-namespace snapshot restoration.
- ClusterRole: Defines permissions for managing snapshot operations across the Kubernetes cluster.
Portworx Concepts
-
Stork: A Portworx tool for managing storage operations, including snapshots and backups in Kubernetes.
-
VolumeSnapshot: A snapshot of a Portworx volume for backup and cloning.
-
VolumeSnapshotRestore: Used to restore a PVC from a snapshot, supporting both new PVCs and in-place restores.
This document will show you how to create snapshots of Portworx volumes and how you can clone those snapshots to use them in pods.
The suggested way to manage snapshots on Kuberenetes is to use Stork. If you are looking to create Portworx snapshots using PVC annotations, you will find instructions here.
Prerequisites
Install Stork
This requires that you already have Stork installed and running on your Kubernetes cluster. If you fetched the Portworx specs from the Portworx spec generator in Portworx Central and used the default options, Stork is already installed.
Create snapshots
With local snapshots, you can either snapshot individual PVCs one by one or snapshot a group of PVCs by using a label selector.
Instructions on taking snapshots of single PVCs and restoring PVCs from the snapshots.📄 Snapshot single PVCs