Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

准备crd资源,从旧集群导出从旧集群导出需要的crd资源清单yaml文件

Code Block
kubectl get crd routetables.gateway.solo.io -oyaml >routetables.gateway.solo.io.yaml
kubectl get crd upstreamgroups.gloo.solo.io -oyaml >upstreamgroups.gloo.solo.io.yaml
kubectl get crd authconfigs.enterprise.gloo.solo.io -oyaml >authconfigs.enterprise.gloo.solo.io.yaml
kubectl get crd ratelimitconfigs.ratelimit.solo.io -oyaml >ratelimitconfigs.ratelimit.solo.io.yaml
kubectl get crd virtualhostoptions.gateway.solo.io -oyaml >virtualhostoptions.gateway.solo.io.yaml
kubectl get crd routeoptions.gateway.solo.io -oyaml >routeoptions.gateway.solo.io.yaml

...

旧的集群上执行备份

Code Block
miniopodname=`kubectl -n zadig get pod -l app=minio|grep -v NAME|awk '{print $1}'`
kubectl -n zadig annotate pod/$miniopodname backup.velero.io/backup-volumes=kr-minio --overwrite
kubectl -n zadig annotate pod/kr-mysql-0 backup.velero.io/backup-volumes=data-kr-mysql-0 --overwrite
kubectl -n zadig annotate pod/kr-mongodb-0 backup.velero.io/backup-volumes=data-kr-mongodb-0 --overwrite
velero backup create zadig-20230717 --include-namespaces zadig

...

新的集群上(如果存储类发生变化需要创建以下文件,因为我是从nfs-storage迁移到cephfs-sc

创建一个声明yaml文件创建crd资源文件,就是我们第一步导出的yaml

kubectl create -f routetables.gateway.solo.io.yaml

...