K8S etcd目录迁移ssd

1、停master服务:kubelet、docker、etcd
2、将三台master上/var/lib/etcd下内容迁移到 ssd目录上
3、修改/etc/etcd.env中data_dir,或者不修改,挂载的时候用ssd,容器内还是/var/lib/etcd
4、修改/usr/local/bin/etcd中宿主主机挂载目录
5、重启etcd,memberlist检查状态

export ETCDCTL_API=3
etcdctl --endpoints=[ip:2379]  
--cacert="/etc/ssl/etcd/ssl/ca.pem" 
--cert="/etc/ssl/etcd/ssl/member-yq01-aip-aikefu21.yq01.baidu.com.pem" 
--key="/etc/ssl/etcd/ssl/member-yq01-aip-aikefu21.yq01.baidu.com-key.pem" member list

5、重启docker、kubelet

你可能感兴趣的:(etcd,kubernetes)