flannel设置udp模式报错

错误如下

sh 复制代码
root@node1:~# kubectl logs  kube-flannel-ds-2x9ln -n kube-flannel
Defaulted container "kube-flannel" out of: kube-flannel, install-cni-plugin (init), install-cni (init)
I1105 17:21:28.439652       1 main.go:210] CLI flags config: {etcdEndpoints:http://127.0.0.1:4001,http://127.0.0.1:2379 etcdPrefix:/coreos.com/network etcdKeyfile: etcdCertfile: etcdCAFile: etcdUsername: etcdPassword: version:false kubeSubnetMgr:true kubeApiUrl: kubeAnnotationPrefix:flannel.alpha.coreos.com kubeConfigFile: iface:[] ifaceRegex:[] ipMasq:true ifaceCanReach: subnetFile:/run/flannel/subnet.env publicIP: publicIPv6: subnetLeaseRenewMargin:60 healthzIP:0.0.0.0 healthzPort:0 iptablesResyncSeconds:5 iptablesForwardRules:true netConfPath:/etc/kube-flannel/net-conf.json setNodeNetworkUnavailable:true}
W1105 17:21:28.439725       1 client_config.go:617] Neither --kubeconfig nor --master was specified.  Using the inClusterConfig.  This might not work.
I1105 17:21:28.447236       1 kube.go:145] Waiting 10m0s for node controller to sync
I1105 17:21:28.447383       1 kube.go:490] Starting kube subnet manager
I1105 17:21:28.449501       1 kube.go:511] Creating the node lease for IPv4. This is the n.Spec.PodCIDRs: [10.244.0.0/24]
I1105 17:21:28.449578       1 kube.go:511] Creating the node lease for IPv4. This is the n.Spec.PodCIDRs: [10.244.1.0/24]
I1105 17:21:28.449594       1 kube.go:511] Creating the node lease for IPv4. This is the n.Spec.PodCIDRs: [10.244.2.0/24]
I1105 17:21:28.449599       1 kube.go:511] Creating the node lease for IPv4. This is the n.Spec.PodCIDRs: [10.244.3.0/24]
I1105 17:21:29.448434       1 kube.go:152] Node controller sync successful
I1105 17:21:29.448473       1 main.go:230] Created subnet manager: Kubernetes Subnet Manager - node1
I1105 17:21:29.448477       1 main.go:233] Installing signal handlers
I1105 17:21:29.448697       1 main.go:541] Found network config - Backend type: udp
I1105 17:21:29.448724       1 match.go:206] Determining IP address of default interface
I1105 17:21:29.449221       1 match.go:259] Using interface with name ens33 and address 192.168.202.151
I1105 17:21:29.449248       1 match.go:281] Defaulting external address to interface address (192.168.202.151)
E1105 17:21:29.449343       1 main.go:333] Error registering network: failed to open TUN device: open /dev/net/tun: no such file or directory
I1105 17:21:29.449453       1 main.go:521] Stopping shutdownHandler...
W1105 17:21:29.449484       1 reflector.go:347] github.com/flannel-io/flannel/pkg/subnet/kube/kube.go:491: watch of *v1.Node ended with: an error on the server ("unable to decode an event from the watch stream: context canceled") has prevented the request from succeeding

解决

github.com/flannel-io/...

sh 复制代码
修改权限为true
securityContext:  
  privileged: true
相关推荐
行百里er5 小时前
Redis 完结篇——Redis 热点问题在 Spring Boot 项目中实战
redis·后端
高频因子挖掘机6 小时前
只取最近 60 个交易日,却每次拉全历史:量化脚本变慢的原因与改法
后端·github·api
孟健7 小时前
从5000亿Token到83%字节匹配:AI逆向工程与重构的工程闭环实践
后端·架构·ai编程
码事漫谈8 小时前
丢得静悄悄,谈一谈 Agent 的记忆是怎么没的
后端
迪飞特科技8 小时前
智慧物业平台实战:Spring Boot 整合小程序实现报修巡检费用全流程
spring boot·后端·小程序
考虑考虑8 小时前
@JsonInclude注解使用
spring boot·后端·spring
IT_陈寒9 小时前
Vite的这个问题坑了我三天,原来如此解决!
前端·人工智能·后端
网易云信9 小时前
大模型能上岗做销售吗?我们让 12 款国产模型交了 420 份作业
前端·后端
CCblandy9 小时前
HTTP 长连接 3 类故障实测:[WinError 10053]、99 个 TIME_WAIT、69 次多余握手,4 种对策怎么选
后端·python·网络协议·http·云原生·性能优化·架构
蜗牛互联网9 小时前
Python Agent工具调用的白名单、参数校验与审批门禁
java·服务器·前端·人工智能·后端·python