delete_persistent_volumes
Delete PersistentVolumes no claim uses: each named volume must be Released or Available, and no PersistentVolumeClaim may still be bound to it (a Bound volume is refused naming its claim). Up to 20 volumes per call. The cluster's volumes and claims are read live first; if they cannot be read the call is refused with a 'Not checked' line. The confirmation card lists each volume's size, age, StorageClass, reclaim policy and backing volume (CSI driver and volume handle, or the in-tree source), and what happens to its data. Before deleting, each CSI volume is snapshotted when the cluster can (the snapshot CRDs are installed and a VolumeSnapshotClass exists for its driver): a VolumeSnapshotContent naming the volume handle (deletionPolicy Retain) and a VolumeSnapshot in namespace default, labelled ankra.io/deleted-volume=, ankra.io/source-cluster and ankra.io/snapshot-time, never deleted automatically. The volume is deleted only once its snapshot is ready (bounded wait of 5 minutes); a snapshot that fails or is not ready leaves its volume in place, and calling again reuses a snapshot that became ready. The result names each snapshot and how to restore it (a PVC whose dataSource is the VolumeSnapshot). A volume no snapshot can be taken of (no CSI source, no snapshot API, or no VolumeSnapshotClass for its driver) is still deletable, and the card and result say for it: 'no snapshot possible: the data on this volume is deleted permanently'. If the data may be needed, take a restore point first with create_stack_restore_point on the stack that used the claim (list_restore_points shows existing ones). Not reversible. Each volume is re-checked unattached right before its delete. Find candidates with describe_resources on kind PersistentVolume (status.phase Released or Available). A person can delete any volume in the Ankra UI or with ankra cluster delete pv <name>. Requires kubernetes.write.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| names | Yes | Exact names of the PersistentVolumes to delete (1 to 20). | |
| cluster_id | Yes | Ankra cluster id (UUID) the call targets. Discover ids with list_clusters. |