解决 Velero 报错 BackupStorageLocation is invalid or unavailable 修复
排查 Kubernetes 执行 velero backup 抛出 BackupStorageLocation "default" is unavailable,分析 S3 凭据 Secret 与 Endpoint 格式。
问题现象
Velero 启动后所有定时任务挂起,执行 velero backup-location get 显示:
NAME PROVIDER BUCKET/PREFIX PHASE LAST VALIDATED ACCESS MODE
default aws velero-backup Unavailable 2026-11-15 14:40:00 +0000 UTC ReadWrite
触发根因
- Velero 挂载的
cloud-credentialsSecret 中声明的 AccessKey / SecretKey 已过期或失效; - 连接私有 S3(如 MinIO / Ceph RGW)时未在 BSL 中配置
s3ForcePathStyle: "true"; - 集群出口网络安全组阻断了对对象存储 443/9000 端口的访问。
解决步骤
更新集群中的 cloud-credentials Secret
重新注入有效凭证:
kubectl create secret generic cloud-credentials -n velero \
--from-file=cloud=credentials-velero --dry-run=client -o yaml | kubectl apply -f -
确保 BackupStorageLocation 配置了正确的 s3Url 与强制路径格式
编辑 BSL:
spec:
config:
s3Url: http://minio.storage.svc:9000
s3ForcePathStyle: "true"
验证确认
检查 BSL 验证状态:
PHASE 状态秒级由 Unavailable 变为 Available,备份存储端点成功接通。


