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 kubelet7665: 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 kubelet7665: 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 kubelet7665: 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 kubelet7665: 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 kubelet7665: 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插件就可以的

相关推荐
码农小韩1 小时前
Linux应用开发(八)——TCP/IP网络编程基础
linux·嵌入式软件开发·linux操作系统·嵌入式操作系统·linux网络编程·linux应用
迷途之人不知返1 小时前
【进程】-5-进程优先级
linux
名字还没想好☜1 小时前
Docker 网络实战:bridge/host/none/自定义网络、容器互通与端口映射踩坑
运维·docker·kubernetes
fengyehongWorld1 小时前
Linux squid搭建基础代理服务器
linux·运维·服务器
木白CPP2 小时前
Linux DMA驱动详解(二)-----DMA的使用者
java·linux·运维
赵民勇2 小时前
systemd-socket-activate命令详解
linux·运维
Cx330❀3 小时前
【Linux网络】网络层 IP 协议:从网段划分到内核源码解析
大数据·linux·服务器·网络·tcp/ip·性能优化·langchain
企鹅的蚂蚁3 小时前
LubanCat RK3588 实时 Linux 开发(七):YT6801 PCIe 网卡驱动移植与 vermagic 排查
linux·rk3588·linux驱动·yt6801·pcie网卡·vermagic
DYWorker0013 小时前
Linux驱动子系统:DMA子系统 —— Consumer和Provider(006)
linux·驱动开发
byte轻骑兵3 小时前
【BlueZ】 log 模块:日志系统的实现与自定义日志输出配置
linux·人工智能·bluez·电脑蓝牙·嵌入式蓝牙