Closed ywk253100 closed 1 year ago
Have you created the secret?
Assuming velero is installed on "velero" namespace please follow the instructions precisely:
Steps:
kubectl -n velero delete deploy/backup-driver
kubectl -n velero delete daemonset datamgr-for-vsphere-plugin
kubectl -n velero scale deploy/velero --replicas=0
dkinni@dkinni-a02 ~ % cat csi-vsphere.conf
[Global]
cluster-id = "cluster1"
[VirtualCenter "10.182.1.133"] user = "Administrator@vsphere.local" password = "password" port = "443"
kubectl -n velero create secret generic velero-vsphere-config-secret --from-file=csi-vsphere.conf
3. Create the velero-vsphere-plugin-config
apiVersion: v1 kind: ConfigMap metadata: name: velero-vsphere-plugin-config namespace: velero data: cluster_flavor: VANILLA vsphere_secret_name: velero-vsphere-config-secret vsphere_secret_namespace: velero
kubectl apply -f velero-vsphere-plugin-config.yaml
4. Edit velero-vsphere-plugin-feature-states configmap to enable feature "decouple-vsphere-csi-driver"
dkinni@dkinni-a02 ~ % kubectl -n velero get cm velero-vsphere-plugin-feature-states -o yaml apiVersion: v1 data: decouple-vsphere-csi-driver: "true" local-mode: "false" kind: ConfigMap metadata: name: velero-vsphere-plugin-feature-states namespace: velero
5. scale up the velero deployment
kubectl -n velero scale deploy/velero --replicas=1
@ywk253100 This issue should be fixed by v1.3.0. Please verify.
@xing-yang Still get the same error with vSphere plugin 1.3.0
yinw@yinw-a02 velero-develop-tool % k --kubeconfig ~/Downloads/vsphere-kubeconfig get pod -n velero
NAME READY STATUS RESTARTS AGE
backup-driver-7469b784db-6cdnh 0/1 CrashLoopBackOff 3 87s
datamgr-for-vsphere-plugin-4cmzd 0/1 CrashLoopBackOff 1 26s
datamgr-for-vsphere-plugin-t74mj 0/1 CrashLoopBackOff 1 26s
datamgr-for-vsphere-plugin-zdmtq 0/1 CrashLoopBackOff 1 26s
restic-k8drq 1/1 Running 0 2m5s
restic-vwccq 1/1 Running 0 2m5s
restic-zg2l7 1/1 Running 0 2m5s
velero-9995f6ddd-rt5bj 0/1 Init:1/2 0 2m5s
yinw@yinw-a02 velero-develop-tool % k --kubeconfig ~/Downloads/vsphere-kubeconfig version
Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.1", GitCommit:"5e58841cce77d4bc13713ad2b91fa0d961e69192", GitTreeState:"clean", BuildDate:"2021-05-12T14:18:45Z", GoVersion:"go1.16.4", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.4+vmware.1", GitCommit:"d475bbd9e7cd66c6db7069cb447766daada65e3b", GitTreeState:"clean", BuildDate:"2021-02-22T22:15:46Z", GoVersion:"go1.15.8", Compiler:"gc", Platform:"linux/amd64"}
yinw@yinw-a02 velero-develop-tool % k --kubeconfig ~/Downloads/vsphere-kubeconfig logs backup-driver-7469b784db-6cdnh -n velero
time="2021-11-23T01:43:33Z" level=info msg="Starting backup-driver server v1.3.0 (179348de0db72a0a62649a16309efa296f368f37)" logSource="/go/src/github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/cmd/backupdriver/cli/server/server.go:116"
time="2021-11-23T01:43:33Z" level=info msg="backup-driver server is started" logSource="/go/src/github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/cmd/backupdriver/cli/server/server.go:191"
failed to retrieve velero-vsphere-plugin-config configuration, err: configmaps "velero-vsphere-plugin-config" not found.
Error received while retrieving cluster flavor from config, err: configmaps "velero-vsphere-plugin-config" not found
Falling back to retrieving cluster flavor from vSphere CSI Driver Deployment
time="2021-11-23T01:43:33Z" level=info msg="backup-driver detected cluster flavor: vSphere Kubernetes Cluster" logSource="/go/src/github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/cmd/backupdriver/cli/server/server.go:245"
failed to retrieve velero-vsphere-plugin-config configuration, err: configmaps "velero-vsphere-plugin-config" not found.
Error received while retrieving cluster flavor from config, err: configmaps "velero-vsphere-plugin-config" not found
Falling back to retrieving cluster flavor from vSphere CSI Driver Deployment
failed to retrieve velero-vsphere-plugin-config configuration, err: configmaps "velero-vsphere-plugin-config" not found.
Error received while retrieving cluster flavor from config, err: configmaps "velero-vsphere-plugin-config" not found
Falling back to retrieving cluster flavor from vSphere CSI Driver Deployment
Failed to retrieve velero-vsphere-plugin-config configuration, using defaults, err: configmaps "velero-vsphere-plugin-config" not found.
An error occurred: secrets "velero-vsphere-config-secret" not found
time="2021-11-23T01:43:33Z" level=info msg="Skipping k8s secret velero-vsphere-config-secret as it does not exist" error="secrets \"velero-vsphere-config-secret\" not found" logSource="/go/src/github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/utils/utils.go:125"
time="2021-11-23T01:43:33Z" level=error msg="failed to retrieve vSphere credentials Secret, [velero-vsphere-config-secret]" error="secrets \"velero-vsphere-config-secret\" not found" logSource="/go/src/github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/utils/utils.go:130"
time="2021-11-23T01:43:33Z" level=error msg="Could not retrieve vsphere credential from k8s secret" error="secrets \"velero-vsphere-config-secret\" not found" logSource="/go/src/github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/snapshotmgr/snapshot_manager.go:117"
yinw@yinw-a02 velero-develop-tool % k --kubeconfig ~/Downloads/vsphere-kubeconfig logs datamgr-for-vsphere-plugin-4cmzd -n velero
time="2021-11-23T01:43:44Z" level=info msg="Starting data manager server v1.3.0 (179348de0db72a0a62649a16309efa296f368f37)" logSource="/go/src/github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/cmd/datamgr/cli/server/server.go:111"
time="2021-11-23T01:43:44Z" level=info msg="data manager server is started" logSource="/go/src/github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/cmd/datamgr/cli/server/server.go:214"
failed to retrieve velero-vsphere-plugin-config configuration, err: configmaps "velero-vsphere-plugin-config" not found.
Error received while retrieving cluster flavor from config, err: configmaps "velero-vsphere-plugin-config" not found
Falling back to retrieving cluster flavor from vSphere CSI Driver Deployment
time="2021-11-23T01:43:44Z" level=info msg="data-manager detected cluster flavor: vSphere Kubernetes Cluster" logSource="/go/src/github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/cmd/datamgr/cli/server/server.go:238"
time="2021-11-23T01:43:44Z" level=info msg="VC Configuration will be retrieved from cluster secret" logSource="/go/src/github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/cmd/datamgr/cli/server/server.go:242"
time="2021-11-23T01:43:44Z" level=info msg="No customized config map for vddk exists" logSource="/go/src/github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/utils/utils.go:1336"
time="2021-11-23T01:43:44Z" level=info msg="Successfully retrieved vddk log level" logSource="/go/src/github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/cmd/datamgr/cli/server/server.go:256"
failed to retrieve velero-vsphere-plugin-config configuration, err: configmaps "velero-vsphere-plugin-config" not found.
Error received while retrieving cluster flavor from config, err: configmaps "velero-vsphere-plugin-config" not found
Falling back to retrieving cluster flavor from vSphere CSI Driver Deployment
failed to retrieve velero-vsphere-plugin-config configuration, err: configmaps "velero-vsphere-plugin-config" not found.
Error received while retrieving cluster flavor from config, err: configmaps "velero-vsphere-plugin-config" not found
Falling back to retrieving cluster flavor from vSphere CSI Driver Deployment
Failed to retrieve velero-vsphere-plugin-config configuration, using defaults, err: configmaps "velero-vsphere-plugin-config" not found.
time="2021-11-23T01:43:44Z" level=info msg="Skipping k8s secret velero-vsphere-config-secret as it does not exist" error="secrets \"velero-vsphere-config-secret\" not found" logSource="/go/src/github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/utils/utils.go:125"
time="2021-11-23T01:43:44Z" level=error msg="failed to retrieve vSphere credentials Secret, [velero-vsphere-config-secret]" error="secrets \"velero-vsphere-config-secret\" not found" logSource="/go/src/github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/utils/utils.go:130"
time="2021-11-23T01:43:44Z" level=error msg="Could not retrieve vsphere credential from k8s secret" error="secrets \"velero-vsphere-config-secret\" not found" logSource="/go/src/github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/snapshotmgr/snapshot_manager.go:117"
An error occurred: secrets "velero-vsphere-config-secret" not found
@ywk253100, you need to create a Configmap. See details in the PR description section here: https://github.com/vmware-tanzu/velero-plugin-for-vsphere/pull/391
I also opened a PR for @deepakkinni to update the install doc in Github: https://github.com/vmware-tanzu/velero-plugin-for-vsphere/issues/418
Follow the same instructions as https://github.com/vmware-tanzu/velero-plugin-for-vsphere/issues/398#issuecomment-926914563 , will be updating the official documentation shortly.
Trying to install velero with the plugin
dpcpinternal/velero-plugin-for-vsphere:main-1e7aa17-22.Sep.2021.20.19.31
on the Kubernetes provisioned by tkgm 1.3.1, thebackup-driver
anddatamgr-for-vsphere-plugin
cannot start upAfter creating the configamp, it is still failed