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
相关推荐
smileNicky10 小时前
SpringBoot系列之从繁琐配置到一键启动之旅
java·spring boot·后端
David爱编程10 小时前
为什么必须学并发编程?一文带你看懂从单线程到多线程的演进史
java·后端
long31610 小时前
java 策略模式 demo
java·开发语言·后端·spring·设计模式
rannn_11112 小时前
【Javaweb学习|黑马笔记|Day1】初识,入门网页,HTML-CSS|常见的标签和样式|标题排版和样式、正文排版和样式
css·后端·学习·html·javaweb
柏油12 小时前
Spring @Cacheable 解读
redis·后端·spring
柏油13 小时前
Spring @TransactionalEventListener 解读
spring boot·后端·spring
两码事14 小时前
告别繁琐的飞书表格API调用,让飞书表格操作像操作Java对象一样简单!
java·后端
shark_chili15 小时前
面试官再问synchronized底层原理,这样回答让他眼前一亮!
后端
灵魂猎手15 小时前
2. MyBatis 参数处理机制:从 execute 方法到参数流转全解析
java·后端·源码
易元15 小时前
模式组合应用-桥接模式(一)
后端·设计模式