Copying pvc snapshot from one kubernetes cluster to another

6/8/2021

Can someone suggest any ideas, or references that I could use to copy a pvc snapshot from one cluster to another without using any third-party like velero.

-- Ka98
devops
kubernetes
kubernetes-pvc
persistent-volume-claims

1 Answer

6/8/2021

You can use Volume snapshots. Volume snapshots provide Kubernetes users with a standardized way to copy a volume's contents at a particular point in time without creating an entirely new volume. This functionality enables, for example, database administrators to backup databases before performing edit or delete modifications.

apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshot
metadata:
  name: new-snapshot-test
spec:
  volumeSnapshotClassName: csi-hostpath-snapclass
  source:
    persistentVolumeClaimName: pvc-test
-- efdestegul
Source: StackOverflow