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插件就可以的 ![](https://i-blog.csdnimg.cn/direct/e627357f438d4748b26dd7a1da437e02.png)

相关推荐
欧先生^_^2 小时前
Linux内核可配置的参数
linux·服务器·数据库
海尔辛2 小时前
学习黑客5 分钟读懂Linux Permissions 101
linux·学习·安全
王RuaRua3 小时前
[数据结构]5. 栈-Stack
linux·数据结构·数据库·链表
曼岛_4 小时前
[架构之美]linux常见故障问题解决方案(十九)
linux·运维·架构
tan180°4 小时前
Linux进程信号处理(26)
linux·c++·vscode·后端·信号处理
大神的风范4 小时前
从0开始学linux韦东山教程第三章问题小结(4)
linux·服务器
sz66cm4 小时前
Linux基础 -- SSH 流式烧录与压缩传输笔记
linux·笔记·ssh
YOYO--小天5 小时前
RS485和RS232 通信配置
linux·嵌入式硬件
李匠20245 小时前
C++GO语言微服务之Dockerfile && docker-compose②
c++·容器
Lw老王要学习5 小时前
Linux数据库篇、第一章_02_MySQL的使用增删改查
linux·运维·数据库·mysql·云计算·it