Deleting a Snapshot of a Dynamically Provisioned Volume

About this task

You can delete snapshots you created using Container Storage Interface (CSI) Storage Plugin. To delete:

Procedure

  1. Run the following command:
    kubectl delete -f <volume snapshot>.yaml
    For example:
    # kubectl delete -f test-snapshot1.yaml
    volumesnapshot.snapshot.storage.k8s.io "test-snapshot1" deleted
  2. Log in to the cluster and verify that the snapshot was deleted by running the volume snapshot list command.
    For example:
    # maprcli volume snapshot list -path /csisc/csisc-securesc-txiqvsdxwu -cluster clusterA -json
    {
    	"timestamp":1548365417772,
    	"timeofday":"2019-01-24 01:30:17.772 GMT-0800 PM",
    	"status":"OK",
    	"total":1,
    	"data":[
    		{
    			"ownername":"root",
    			"ownertype":"1",
    			"volumeid":"234021649",
    			"volumename":"csisc-securesc.txiqvsdxwu",
    			"volumepath":"/csisc/csisc-securesc-txiqvsdxwu",
    			"snapshotid":"256000051",
    			"snapshotname":"mapr-snapshot-4c5293bc-201d-11e9-84c0-0cc47ab39644",
    			"creationtime":"Thu Jan 24 13:16:22 PST 2019",
    			"cumulativeReclaimSizeMB":"0",
    			"ownedsize":"0",
    			"sharedSize":"0",
    			"volumeSnapshotAces":{
    				"readAce":"p",
    				"writeAce":"p"
    			}
    		}
    	]
    }