root@master01:~/velero# cat switchSC.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: change-storageclass-plugin-config
namespace: velero
labels:
app.kubernetes.io/name: velero
velero.io/plugin-config: "true"
velero.io/change-storage-class: RestoreItemAction
data:
managed-nfs-storage: nfs-storage
root@master01:~# kubectl get pvc
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
mysql-pv-claim Bound pvc-e33dd7b7-b274-46e0-b571-b4fcd8a793ad 10Gi RWX managed-nfs-storage 136m
test-claim Bound pvc-6b11e425-0ee3-42ed-9aa8-575cc0da4fb3 1Mi RWX managed-nfs-storage 3d1h
test-claim-2 Bound pvc-97995b2e-da8d-4ce6-a0ca-abd03577cf63 2Mi RWX managed-nfs-storage 3d1h
test-claim-22 Bound pvc-a2fe8ae2-4982-4f74-9b60-ed20a40ca63d 2Mi RWX managed-nfs-storage 34h
test-claim22 Bound pvc-55806bd1-1ddf-4841-9610-9f23d3dfd08a 1Mi RWX nfs-storage 34h
test-claim22-2 Bound pvc-fee6ca1c-be35-42df-9c49-aae6f815e636 1Mi RWX nfs-storage 34h
root@master01:~# kubectl describe pvc/mysql-pv-claim InProgress
error: there is no need to specify a resource type as a separate argument when passing arguments in resource/name form (e.g. 'kubectl get resource/<resource_name>' instead of 'kubectl get resource resource/<resource_name>'
root@master01:~# kubectl describe pvc/mysql-pv-claim
Name: mysql-pv-claim
Namespace: default
StorageClass: managed-nfs-storage
Status: Bound
Volume: pvc-e33dd7b7-b274-46e0-b571-b4fcd8a793ad
Labels: velero.io/backup-name=backup-app4
velero.io/restore-name=backup-app4-20231022202023
Annotations: pv.kubernetes.io/bind-completed: yes
pv.kubernetes.io/bound-by-controller: yes
volume.beta.kubernetes.io/storage-class: managed-nfs-storage
volume.beta.kubernetes.io/storage-provisioner: qgg-nfs-storage
volume.kubernetes.io/storage-provisioner: qgg-nfs-storage
Finalizers: [kubernetes.io/pvc-protection]
Capacity: 10Gi
Access Modes: RWX
VolumeMode: Filesystem
Used By: mysql-5b7cc77c9-66jqb
Events: <none>