k8s工作节点出现/etc/kubernetes/pki/ca.crt already exists /etc/kubernetes/kubelet.conf already exists

将工作节点加入主节点报一下错误:

error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR FileAvailable–etc-kubernetes-kubelet.conf]: /etc/kubernetes/kubelet.conf already exists
[ERROR FileAvailable–etc-kubernetes-pki-ca.crt]: /etc/kubernetes/pki/ca.crt already exists
[preflight] If you know what you are doing, you can make a check non-fatal with --ignore-preflight-errors=...
To see the stack trace of this error execute with --v=5 or higher

1、先执行 kubeadm reset,重新初始化节点配置:

kubeadm reset

2、再次执行join kubeadm join --token xxxxx master_ip:6443 --discovery-token-ca-cert-hash sha256:xxxx

你可能感兴趣的:(kubernetes,kubelet,容器)