node1启动后flannel报错
来源:4-8 安装配置worker node节点

qq_永远的稻米_0
2023-01-28
此时执行了kubectl apply -f kubeblog/docs/Chapter4/flannel.yaml
kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
这两条才好,不是说node不用安装flannel插件么?
2回答
-
qq_金融超越战_03665934
2023-04-09
我跟你的问题一样,你解决了吗?
00 -
清风
2023-01-28
worker node只需要拷贝master上的/run/flannel/subnet.env,和/etc/cni/net.d 到worker节点,即可。
Flannel默认起2个pod,会被调度到master和work node1:
kube-system coredns-59d64cd4d4-kkk2k 1/1 Running 10 31d 10.244.0.20 master <none> <none>
kube-system coredns-59d64cd4d4-xr5rs 1/1 Running 10 31d 10.244.1.59 node1
查看flannel的pod,它其实挂载了这2个文件:
Volumes:
run:
Type: HostPath (bare host directory volume)
Path: /run/flannel
HostPathType:
cni:
Type: HostPath (bare host directory volume)
Path: /etc/cni/net.d
HostPathType:
此时只需要node1上这写配置文件即可,这样node1的上flannle pod会用到这个配置文件。
032023-03-02
相似问题