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

相关推荐
IT大白鼠7 小时前
Ingress 与 Ingress-Controller:K8s 七层 HTTP 反向代理技术详解与实践
http·容器·kubernetes
徐小黑ACG8 小时前
nginx配置文件
linux·服务器·nginx
新时代牛马8 小时前
Linux VFS 完整篇:从path_openat、dentry/inode 到page cache 与挂载排障
linux·运维·服务器
java_logo9 小时前
Docker 部署 Rocky Linux:轻松搭建 RHEL 兼容企业级基础镜像平台
linux·docker·容器·rocky linux·基础镜像·轩辕镜像·rhel 兼容
拂拉氏9 小时前
【知识讲解】 Linux虚拟地址空间认识
linux·虚拟地址空间
新时代牛马10 小时前
Linux 驱动中断与定时完整篇:从 request_threaded_irq 到hrtimer 选型与排障
linux·运维·服务器
分支预测失败13 小时前
RISC-V 核间中断 IPI 实战:从 MSIP 寄存器到 IMSIC 消息投递
linux·后端
GeW14 小时前
RHCE考试避坑指南"90%考生容易忽略的细节
linux
IT大白鼠14 小时前
Istio 结合 K8s 实现流量管理:服务网格灰度、熔断、限流实战
云原生·kubernetes·istio
键盘会跳舞15 小时前
【C++多线程】死锁诊断工具实战:从 Windows 到 Linux 的全链路排查
linux·c++·windows·死锁