当k8s做master集群高可用的时候,将另一个master02加入到当前master01,报错如下
failure loading certificate for CA: couldn't load the certificate file /etc/kubernetes/pki/ca.crt: open /etc/kubernetes/pki/ca.crt: no such file or directory
#需要把master01的ca文件同步到master02
# 在master02创建目录
mkdir -p /etc/kubernetes/pki && /etc/kubernetes/pki/etcd
# 同步master01的文件,在master01上执行
scp -rp /etc/kubernetes/pki/ca.* master02:/etc/kubernetes/pki
scp -rp /etc/kubernetes/pki/sa.* master02:/etc/kubernetes/pki
scp -rp /etc/kubernetes/pki/front-proxy-ca.* master02:/etc/kubernetes/pki
scp -rp /etc/kubernetes/pki/etcd/ca.* master02:/etc/kubernetes/pki/etcd
scp -rp /etc/kubernetes/admin.conf master02:/etc/kubernetes
我这里是master01和master02做了免密登录