etcdctl make-mirror跨集群迁移数据

Nginx代理

make-mirror节点无法直接访问新集群,配置nginx代理

configuration
server {
listen 50497;

location / {
proxy_pass http://10.233.36.110:2379;

# 基础代理头设置
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

# 连接超时控制
proxy_connect_timeout 5s;
proxy_read_timeout 60s;
proxy_send_timeout 60s;
}
}

数据迁移

ETCDCTL_API=3 etcdctl make-mirror --endpoints=http://source-cluster:2379 http://destination-cluster:2379
文章作者: 慕容峻才
文章链接: https://www.acaiblog.top/etcdctl-make-mirror跨集群迁移数据/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 阿才的博客
微信打赏
支付宝打赏