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)

相关推荐
Sleepy MargulisItG3 分钟前
【Linux网络编程】TCP Socket
linux·网络·tcp/ip
骥龙9 分钟前
4.14、云原生安全攻防:容器与 Kubernetes 的脆弱点
安全·云原生·kubernetes
kevin_水滴石穿11 分钟前
Docker 健康检查(Healthcheck)
运维·docker·容器
羑悻的小杀马特12 分钟前
Docker高阶实战:从镜像构建优化策略实践到MySQL主从集群详解+一主二从容器化实现,一文打通生产级部署!
mysql·docker·容器·镜像实战
倔强的石头10614 分钟前
Linux 进程深度解析(三):调度算法、优先级调整与进程资源回收(wait与waitpid)
linux·服务器·算法
熊文豪22 分钟前
Ubuntu 安装 Oracle 11g XE 完整指南
linux·ubuntu·oracle
_OP_CHEN25 分钟前
【Linux系统编程】(十五)揭秘 Linux 环境变量:从底层原理到实战操作,一篇吃透命令行参数与全局变量!
linux·运维·操作系统·bash·进程·环境变量·命令行参数
ice_bird27 分钟前
Ansible 一键部署k8s1.28配置完整版
kubernetes·ansible
橘子真甜~32 分钟前
C/C++ Linux网络编程14 - 传输层TCP协议详解(保证可靠传输)
linux·服务器·网络·网络协议·tcp/ip·滑动窗口·拥塞控制
小云小白33 分钟前
Bash /dev/tcp、nc 与 nmap:端口检测的定位与取舍
linux·端口检测