kubeadm join 运行出错:FileAvailable--etc-kubernetes-pki-ca.crt,FileAvailable--etc-kubernetes-bootstrap-k

 再配置worker节点的时候,运行kubeadm join 节点,出现如下错误:

[root@localhost yum.repos.d]#  kubeadm join 192.168.242.134:6443 --token d1m53m.nhiwh52j7cvzn93e --discovery-token-ca-cert-hash sha256:3c81d3a0f34f63b715f4997d79ae1ca3c98fe7e7bbe2d0a6ff3ee07c62733a23
[preflight] running pre-flight checks
	[WARNING RequiredIPVSKernelModulesAvailable]: the IPVS proxier will not be used, because the following required kernel modules are not loaded: [ip_vs ip_vs_rr ip_vs_wrr ip_vs_sh] or no builtin kernel ipvs support: map[ip_vs_rr:{} ip_vs_wrr:{} ip_vs_sh:{} nf_conntrack_ipv4:{} ip_vs:{}]
you can solve this problem with following methods:
 1. Run 'modprobe -- ' to load missing kernel modules;
2. Provide the missing builtin kernel ipvs support

	[WARNING Service-Docker]: docker service is not enabled, please run 'systemctl enable docker.service'
I0625 03:54:45.816100    7146 kernel_validator.go:81] Validating kernel version
I0625 03:54:45.816220    7146 kernel_validator.go:96] Validating kernel config
	[WARNING SystemVerification]: docker version is greater than the most recently validated version. Docker version: 17.12.1-ce. Max validated version: 17.03
[discovery] Trying to connect to API Server "192.168.242.134:6443"
[discovery] Created cluster-info discovery client, requesting info from "https://192.168.242.134:6443"
[discovery] Requesting info from "https://192.168.242.134:6443" again to validate TLS against the pinned public key
[discovery] Cluster info signature and contents are valid and TLS certificate validates against pinned roots, will use API Server "192.168.242.134:6443"
[discovery] Successfully established connection with API Server "192.168.242.134:6443"
[kubelet] Downloading configuration for the kubelet from the "kubelet-config-1.21" ConfigMap in the kube-system namespace
configmaps "kubelet-config-1.21" is forbidden: User "system:bootstrap:d1m53m" cannot get configmaps in the namespace "kube-system"
[root@localhost yum.repos.d]# systemctl enable docker.service
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
[root@localhost yum.repos.d]#  kubeadm join 192.168.242.134:6443 --token d1m53m.nhiwh52j7cvzn93e --discovery-token-ca-cert-hash sha256:3c81d3a0f34f63b715f4997d79ae1ca3c98fe7e7bbe2d0a6ff3ee07c62733a23
[preflight] running pre-flight checks
	[WARNING RequiredIPVSKernelModulesAvailable]: the IPVS proxier will not be used, because the following required kernel modules are not loaded: [ip_vs_sh ip_vs ip_vs_rr ip_vs_wrr] or no builtin kernel ipvs support: map[ip_vs:{} ip_vs_rr:{} ip_vs_wrr:{} ip_vs_sh:{} nf_conntrack_ipv4:{}]
you can solve this problem with following methods:
 1. Run 'modprobe -- ' to load missing kernel modules;
2. Provide the missing builtin kernel ipvs support

I0625 03:55:27.478187    7215 kernel_validator.go:81] Validating kernel version
I0625 03:55:27.478245    7215 kernel_validator.go:96] Validating kernel config
	[WARNING SystemVerification]: docker version is greater than the most recently validated version. Docker version: 17.12.1-ce. Max validated version: 17.03
[preflight] Some fatal errors occurred:
	[ERROR FileAvailable--etc-kubernetes-pki-ca.crt]: /etc/kubernetes/pki/ca.crt already exists
	[ERROR FileAvailable--etc-kubernetes-bootstrap-kubelet.conf]: /etc/kubernetes/bootstrap-kubelet.conf 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命令 

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值