参考链接:K8S部署遇到的问题处理汇总node节点加入k8s集群失败kubeadm join 运行出错:FileAvailable--etc-kubernetes-pki-ca.crt,FileAvailable--etc-kubernetes-bootstrap-k
报错查询
error execution phase preflight: [preflight] Some fatal errors occurred
[ERROR FileAvailable--etc-kubernetes-kubelet.conf]: /etc/kubernetes/kubelet.conf already exists
报错日志:
[preflight] Running pre-flight checks
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=...`
原因是:一些配置文件与服务已经存在
解决方案:
#重置kubeadm
kubeadm reset
在运行kubeadm join命令
或者文章来源:https://www.toymoban.com/news/detail-502512.html
原因:有残留文件
解决方案:(有效)文章来源地址https://www.toymoban.com/news/detail-502512.html
#删除k8s配置文件和证书文件
rm -rf /etc/kubernetes/kubelet.conf /etc/kubernetes/pki/ca.crt #删除k8s配置文件和证书文件
#
kubeadm join 192.168.191.133:6443 --token xvnp3x.pl6i8ikcdoixkaf0 \
--discovery-token-ca-cert-hash sha256:9f90161043001c0c75fac7d61590734f844ee507526e948f3647d7b9cfc1362d
到了这里,关于k8s入坑之报错(3)解决error execution phase preflight: [preflight] Some fatal errors occurred...的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!