Velero Backup在k8群集上安装失败

时间:2020-06-24 13:41:28

标签: kubernetes backup velero

我试图在Kubernestes集群上安装Velero进行备份,Minio已安装且可访问,并且创建了一个桶kubedemo。 Velero已下载并设置了路径,运行良好,但是当我按下安装命令时,它在日志文件中给我错误。

[root@kube-master ~]# velero version
Client:
        Version: v1.0.0
        Git commit: 72f5cadc3a865019ab9dc043d4952c9bfd5f2ecb
<error getting server version: namespaces "velero" not found>


[root@kube-master ~]# velero install --provider aws --bucket kubedemo --secret-file ./minio.credentials --use-restic --backup-location-config region=minio,s3ForcePathStyle=true,s3Url=http://192.x.x.x:9000
    CustomResourceDefinition/downloadrequests.velero.io: attempting to create resource
    CustomResourceDefinition/downloadrequests.velero.io: already exists, proceeding
    CustomResourceDefinition/downloadrequests.velero.io: created
    CustomResourceDefinition/deletebackuprequests.velero.io: attempting to create resource
    CustomResourceDefinition/deletebackuprequests.velero.io: already exists, proceeding
    CustomResourceDefinition/deletebackuprequests.velero.io: created
    CustomResourceDefinition/resticrepositories.velero.io: attempting to create resource
    CustomResourceDefinition/resticrepositories.velero.io: already exists, proceeding
    CustomResourceDefinition/resticrepositories.velero.io: created
    CustomResourceDefinition/volumesnapshotlocations.velero.io: attempting to create resource
    CustomResourceDefinition/volumesnapshotlocations.velero.io: already exists, proceeding
    CustomResourceDefinition/volumesnapshotlocations.velero.io: created
    CustomResourceDefinition/serverstatusrequests.velero.io: attempting to create resource
    CustomResourceDefinition/serverstatusrequests.velero.io: already exists, proceeding
    CustomResourceDefinition/serverstatusrequests.velero.io: created
    CustomResourceDefinition/backups.velero.io: attempting to create resource
    CustomResourceDefinition/backups.velero.io: already exists, proceeding
    CustomResourceDefinition/backups.velero.io: created
    CustomResourceDefinition/restores.velero.io: attempting to create resource
    CustomResourceDefinition/restores.velero.io: already exists, proceeding
    CustomResourceDefinition/restores.velero.io: created
    CustomResourceDefinition/schedules.velero.io: attempting to create resource
    CustomResourceDefinition/schedules.velero.io: already exists, proceeding
    CustomResourceDefinition/schedules.velero.io: created
    CustomResourceDefinition/podvolumebackups.velero.io: attempting to create resource
    CustomResourceDefinition/podvolumebackups.velero.io: already exists, proceeding
    CustomResourceDefinition/podvolumebackups.velero.io: created
    CustomResourceDefinition/podvolumerestores.velero.io: attempting to create resource
    CustomResourceDefinition/podvolumerestores.velero.io: already exists, proceeding
    CustomResourceDefinition/podvolumerestores.velero.io: created
    CustomResourceDefinition/backupstoragelocations.velero.io: attempting to create resource
    CustomResourceDefinition/backupstoragelocations.velero.io: already exists, proceeding
    CustomResourceDefinition/backupstoragelocations.velero.io: created
    Waiting for resources to be ready in cluster...
    Namespace/velero: attempting to create resource
    Namespace/velero: created
    ClusterRoleBinding/velero: attempting to create resource
    ClusterRoleBinding/velero: created
    ServiceAccount/velero: attempting to create resource
    ServiceAccount/velero: created
    Secret/cloud-credentials: attempting to create resource
    Secret/cloud-credentials: created
    BackupStorageLocation/default: attempting to create resource
    BackupStorageLocation/default: created
    VolumeSnapshotLocation/default: attempting to create resource
    VolumeSnapshotLocation/default: created
    Deployment/velero: attempting to create resource
    An error occurred:
    
    Error installing Velero. Use `kubectl logs deploy/velero -n velero` to check the deploy logs: Error creating resource Deployment/velero: the server could not find the requested resource
    [root@kube-master ~]# kubectl logs deploy/velero -n velero
    Error from server (NotFound): deployments.apps "velero" not found

这是凭证的秘密文件

[root@kube-master ~]# cat minio.credentials
[default]
aws_access_key_id=minioadmin
aws_secret_access_key=minioadmin

2 个答案:

答案 0 :(得分:2)

您是否使用GCP's experimental k8 cluster?原因我遇到了同样的错误,后来我切换到normal cluster

答案 1 :(得分:1)

您可能缺少此参数 --plugins velero/velero-plugin-for-aws:v1.0.0