I have dynamic PVC created with EBS volume which holds mysql. Now I am trying to create the snapshot of PVC using volumesnapshotclass and volumesnapshot. But the snapshot is not getting created. Below is my code:
Volumesnapshotclass.yaml
kind: VolumeSnapshotClass
metadata:
name: test-snapclass
driver: ebs.csi.aws.com
deletionPolicy: Retain
Volumsnapshot.yaml
apiVersion: snapshot.storage.k8s.io/v1beta1
kind: VolumeSnapshot
metadata:
name: test-snapshot
namespace: default
spec:
volumeSnapshotClassName: test-snapclass
source:
persistentVolumeClaimName: mysql-data
It says snapshot has been created but I couldn't find any snapshotcontent and snapshot READY TO USE in false state.