k8s集群node节点加入失败

出现这种情况:

[preflight] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -o yaml'

[kubelet-start] Writing kubelet configuration to file "/var/lib/kubelet/config.yaml"

[kubelet-start] Writing kubelet environment file with flags to file "/var/lib/kubelet/kubeadm-flags.env"

[kubelet-start] Starting the kubelet

[kubelet-start] Waiting for the kubelet to perform the TLS Bootstrap...

[kubelet-check] Initial timeout of 40s passed.

error execution phase kubelet-start: error uploading crisocket: Unauthorized

To see the stack trace of this error execute with --v=5 or higher

这是因为我最初初始化主节点的时候加入了该节点,然后kubeadm reset了,,需要初始化一下node节点才能成功,具体执行操作如下:

kubelet reset一下,然后发现node节点还是notready,journalctl -f -u kubelet命令查看,出现如下:

[failed to find plugin \"flannel\" in path [/opt/cni/bin]]"

6月 27 22:01:42 nodeOne kubelet[7665]: I0627 22:01:42.792331 7665 cni.go:240] "Unable to update cni config" err="no valid networks found in /etc/cni/net.d"

6月 27 22:01:42 nodeOne kubelet[7665]: E0627 22:01:42.803879 7665 kubelet.go:2347] "Container runtime network not ready" networkReady="NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized"

6月 27 22:01:47 nodeOne kubelet[7665]: I0627 22:01:47.797916 7665 cni.go:205] "Error validating CNI config list" configList="{\n \"name\": \"cbr0\",\n \"cniVersion\": \"0.3.1\",\n \"plugins\": [\n {\n \"type\": \"flannel\",\n \"delegate\": {\n \"hairpinMode\": true,\n \"isDefaultGateway\": true\n }\n },\n {\n \"type\": \"portmap\",\n \"capabilities\": {\n \"portMappings\": true\n }\n }\n ]\n}\n" err="[failed to find plugin \"flannel\" in path [/opt/cni/bin]]"

6月 27 22:01:47 nodeOne kubelet[7665]: I0627 22:01:47.797937 7665 cni.go:240] "Unable to update cni config" err="no valid networks found in /etc/cni/net.d"

6月 27 22:01:47 nodeOne kubelet[7665]: E0627 22:01:47.809606 7665 kubelet.go:2347] "Container runtime network not ready" networkReady="NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized",和主节点一样问题,未安装cni网络插件,下载,然后到/opt/cni/bin目录下解压,然后在网上下载一个flannel插件就可以的

相关推荐
活跃的煤矿打工人9 分钟前
【星海随笔】删除ceph
linux·服务器·ceph
颜淡慕潇17 分钟前
【K8S问题系列 | 20 】K8S如何删除异常对象(Pod、Namespace、PV、PVC)
后端·云原生·容器·kubernetes
__zhangheng20 分钟前
Mac 查询IP配置,网络代理
linux·服务器·网络·git
lmxnsI20 分钟前
docker使用笔记
笔记·docker·容器
0xdadream23 分钟前
Vim 编辑器详细教程
linux·编辑器·vim
木卫二号Coding27 分钟前
Docker-构建自己的Web-Linux系统-镜像webtop:ubuntu-kde
linux·ubuntu·docker
hc_bmxxf1 小时前
Linux应用软件编程-多任务处理(进程)
linux·运维·服务器
沐多2 小时前
波折重重:一个Linux实时系统Xenomai宕机问题的深度定位过程
linux·xenomai·实时linux·xenomai4
猿经验2 小时前
tar.gz压缩文件在linux上解压异常问题:gzip:stdin:invalid compressed data
linux·运维·服务器
木卫二号Coding2 小时前
宝塔-firefox(Docker应用)-构建自己的Web浏览器
linux·docker·开源