K8s报错:[preflight] WARNING: JoinControlPane.controlPlane settings will be ignored when control-plane flag is not set.

一、报错信息

[preflight] WARNING: JoinControlPane.controlPlane settings will be ignored when control-plane flag is not set.
[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-bootstrap-kubelet.conf]: /etc/kubernetes/bootstrap-kubelet.conf already exists
[ERROR FileAvailable--etc-kubernetes-pki-ca.crt]: /etc/kubernetes/pki/ca.crt already exists

二、解决方案

原因是:一些配置文件与服务已经存在

#重置kubeadm 
kubeadm reset
#删除k8s配置文件和证书文件
rm -rf /etc/kubernetes/kubelet.conf /etc/kubernetes/pki/ca.crt #删除k8s配置文件和证书文件
 kubeadm join 192.168.117.100:6443 --token 0l3qfv.mx9js9pfl1ft4avd     --discovery-token-ca-cert-hash sha256:cee17915cc12a2ba319629e41b6460a25725652bad41cc138f2b8d4407821c67

亲测 完美解决 SUCCESS

 原文:https://www.cnblogs.com/muzlei/p/16376746.html

posted @ 2023-04-30 10:44  KwFruit  阅读(569)  评论(0编辑  收藏  举报