Etcd集群备份失败问题
问题现象
k8s中etcdctl备份etcd时第2步卡住。
export ETCDCTL_API=3
etcdctl --endpoints 172.18.0.2:2379 snapshot save snapshot.db
问题分析
k8s中执行etcdctl命令时没有指定证书文件路径。
解决问题
export ETCDCTL_API=3
alias myetcd="etcdctl --cacert /etc/kubernetes/pki/etcd/ca.crt --cert /etc/kubernetes/pki/etcd/server.crt --key /etc/kubernetes/pki/etcd/server.key --endpoints https://127.0.0.1:2379"
myetcd snapshot save snapshot.db