velero icon indicating copy to clipboard operation
velero copied to clipboard

k3d default storage-class can't backup

Open liyin37 opened this issue 6 months ago • 10 comments

we have two clusters: cluster A

[root@giskg ~]# kubectl version
Client Version: v1.28.8+k3s1
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.28.8+k3s1

clusterB

[root@k8s-node1 ~]# kubectl version
WARNING: This version information is deprecated and will be replaced with the output from kubectl version --short.  Use --output=yaml|json to get the full version.
Client Version: version.Info{Major:"1", Minor:"27", GitVersion:"v1.27.9", GitCommit:"d15213f69952c79b317e635abff6ff4ec81475f8", GitTreeState:"clean", BuildDate:"2023-12-19T13:41:13Z", GoVersion:"go1.20.12", Compiler:"gc", Platform:"linux/amd64"}
Kustomize Version: v5.0.1
Server Version: version.Info{Major:"1", Minor:"27", GitVersion:"v1.27.9", GitCommit:"d15213f69952c79b317e635abff6ff4ec81475f8", GitTreeState:"clean", BuildDate:"2023-12-19T13:32:15Z", GoVersion:"go1.20.12", Compiler:"gc", Platform:"linux/amd64"}

clusterA backup one namespace,the namespace resource have PVC

[root@giskg ~]# kubectl -n test get all 
NAME          READY   STATUS    RESTARTS       AGE
pod/minio-0   1/1     Running   1 (145m ago)   2d19h

NAME                     TYPE        CLUSTER-IP    EXTERNAL-IP   PORT(S)                         AGE
service/minio-headless   ClusterIP   None          <none>        9000/TCP,9001/TCP               2d19h
service/minio            NodePort    10.43.36.40   <none>        9000:30087/TCP,9001:30086/TCP   2d19h

NAME                     READY   AGE
statefulset.apps/minio   1/1     2d19h
[root@giskg ~]# kubectl -n test get pvc
NAME           STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   AGE
data-minio-0   Bound    pvc-fd9ac663-68a4-455c-bdea-057117f43956   100Gi      RWO            local-path     2d19h

the sc name is : local-path

when I install the verelo ,the version is: 1.14.0

[root@giskg ~]# velero version
Client:
	Version: v1.14.0
	Git commit: 2fc6300f2239f250b40b0488c35feae59520f2d3
<error getting server version: namespaces "velero" not found>
[root@giskg ~]# kubectl -n velero-system get pod|grep -E "node|velero"
node-agent-rbrmm                                                  1/1     Running     2 (147m ago)   3d21h
velero-7887649466-qm2kn                                           1/1     Running     2 (147m ago)   3d21h
node-agent-scbv2                                                  1/1     Running     3 (147m ago)   3d21h
node-agent-vjb5q                                                  1/1     Running     3 (147m ago)   3d21h
node-agent-bqhl5                                                  1/1     Running     2 (147m ago)   3d21h

then,I execute below cmd:

velero debug  backup create test-backup-2024081902 \
--include-cluster-resources=true \
--include-namespaces test \
--default-volumes-to-fs-backup \
--namespace velero-system

check the logs:

time="2024-08-19T04:21:49Z" level=info msg="Summary for skipped PVs: [{\"name\":\"pvc-4300ea91-9064-4dec-aa33-7ac5baaf29d8\",\"reasons\":[{\"approach\":\"volumeSnapshot\",\"reason\":\"not satisfy the criteria for VolumePolicy or the legacy snapshot way\"}]},{\"name\":\"pvc-728c03ff-1c6f-403b-b06c-aa22346d3287\",\"reasons\":[{\"approach\":\"volumeSnapshot\",\"reason\":\"not satisfy the criteria for VolumePolicy or the legacy snapshot way\"}]},{\"name\":\"pvc-74b80bab-f044-4a70-897d-1f203ca0f31d\",\"reasons\":[{\"approach\":\"volumeSnapshot\",\"reason\":\"not satisfy the criteria for VolumePolicy or the legacy snapshot way\"}]},{\"name\":\"pvc-7c774522-e0ea-487d-b679-c593006b79ff\",\"reasons\":[{\"approach\":\"volumeSnapshot\",\"reason\":\"not satisfy the criteria for VolumePolicy or the legacy snapshot way\"}]},{\"name\":\"pvc-9445a3c5-f197-488f-a2e1-32ca04b4e28f\",\"reasons\":[{\"approach\":\"volumeSnapshot\",\"reason\":\"not satisfy the criteria for VolumePolicy or the legacy snapshot way\"}]},{\"name\":\"pvc-bff44368-f0c3-403f-9ef3-8ba9dc33c99a\",\"reasons\":[{\"approach\":\"volumeSnapshot\",\"reason\":\"not satisfy the criteria for VolumePolicy or the legacy snapshot way\"}]},{\"name\":\"pvc-f563f48f-dc63-4964-9972-e069f9db46f0\",\"reasons\":[{\"approach\":\"volumeSnapshot\",\"reason\":\"not satisfy the criteria for VolumePolicy or the legacy snapshot way\"}]},{\"name\":\"pvc-fd9ac663-68a4-455c-bdea-057117f43956\",\"reasons\":[{\"approach\":\"volumeSnapshot\",\"reason\":\"not satisfy the criteria for VolumePolicy or the legacy snapshot way\"}]}]" backup=velero-system/test-backup-2024081902 logSource="pkg/backup/backup.go:494"
time="2024-08-19T04:21:49Z" level=info msg="Backed up a total of 266 items" backup=velero-system/test-backup-2024081902 logSource="pkg/backup/backup.go:498" progress=

the pvc doesnt backupd

liyin37 avatar Aug 19 '24 04:08 liyin37