一、Velero 简介
Velero 是开源的Kubernetes集群备份迁移工具,使用对象存储保存集群资源,默认支持的存储有aws,azure,gcp 兼容S3协议。
二、Velero 安装
macos
1
brew install velero
linux
下载对应平台的release 解压安装
windows
1 | choco install velero |
三、使用minio-operator 部署
1. minio-operator 安装
1 | echo 'apiVersion: apiextensions.k8s.io/v1 |
2. minio-instance 安装
1 | echo ' |
3.查看部署情况
1 | $ [devops] kubectl get pod -n velero |
4.暴露minio服务
1 | echo ' |
5. 创建bucket
四、Velero server 安装
如果要使用velero进行备份还原,需要再对应的k8s集群安装velero-server
1. 安装Velero server
1 | cat > credentials-velero <<EOF |
五、备份和恢复
1.备份
1 | $ velero create backup ack-test-sass-pos-test --include-namespaces sass-pos-test |
2.查看备份
1 | $ velero get backup |
3.还原备份
1 | $ velero restore create --from-backup ack-test-sass-pos-test |
4.创建计划备份
1 | $ velero create schedule ack-test-sass-pos-test-schedule --schedule="@every 6m" |
5.从计划备份还原
1 | velero restore create --from-schedule ack-test-sass-pos-test-schedule |
- 本文作者: ChuLinx
- 本文链接: http://yoursite.com/2020/11/17/Kubernetes Velero备份恢复/
- 版权声明: 本博客所有文章除特别声明外,均采用 MIT 许可协议。转载请注明出处!