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
相关推荐
岁月如歌7786几秒前
顺序消息与幂等消费完全指南:从队列有序到接口幂等
java·后端·架构
合橱瑰1 分钟前
从“假智能”到“真闭环”:Go 向量推理引擎的零硬编码调优实践
后端·go
SamDeepThinking2 分钟前
不改逻辑、不拆方法:仅靠「调整代码顺序」提升可读性
java·后端·程序员
泡海椒3 分钟前
适配老旧项目:JQuick-Java兼容Java8+环境改造迁移实战指南
后端
IT_陈寒5 分钟前
Java的HashMap竟然不是线程安全的,现在才知道!
前端·人工智能·后端
IT_陈寒6 分钟前
React hooks闭包陷阱让我加了一宿班
前端·人工智能·后端
不一样的少年_6 分钟前
设计稿里的图片明明很清晰,为什么到了手机上却糊了?一文讲透 DPR、压缩与格式选择
前端·后端·图片资源
卷无止境7 分钟前
当"精简主义"住进AI编程助手:Ponytail深度解读
后端·python·fastapi
兔子零102412 分钟前
我给 Pi Coding Agent 做了一个桌面控制台:Pi-Harness
前端·javascript·后端
名字还没想好☜16 分钟前
Go 的 TCP 粘包与拆包:用长度前缀协议 + bufio 正确读消息
后端·tcp/ip·golang·go·php