我已經在工作節點上成功配置了Flannel。當我在ifconfig
上工作時,我看到一個flannel.1
接口(我正在使用vxlan)。還有docker0
和cbr0
接口。Kubernetes - pod未從法蘭絨獲取IP CIDR
但是,當吊艙出現時,該節點上的泊塢員容器將從法蘭絨接口獲取來自cbr0
接口的IP地址和而不是。我嘗試手動刪除cbr0接口,但是當docker容器在pod出現的節點上進行調度時,它會恢復。
碼頭工人開始是這樣的:
dockerd --bip=10.200.50.1/24 --mtu=8951 --iptables=false --ip-masq=false --host=unix:///var/run/docker.sock --log-level=error --storage-driver=overlay
法蘭絨ENV:
$ cat /run/flannel/subnet.env
FLANNEL_NETWORK=10.200.0.0/16
FLANNEL_SUBNET=10.200.50.1/24
FLANNEL_MTU=8951
FLANNEL_IPMASQ=false
ifconfig
說:
$ ifconfig
cbr0 Link encap:Ethernet HWaddr 0a:58:0a:c8:04:01
inet addr:10.200.4.1 Bcast:0.0.0.0 Mask:255.255.255.0
inet6 addr: fe80::d99:edff:fec6:9dd0/64 Scope:Link
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:536 (536.0 B) TX bytes:648 (648.0 B)
docker0 Link encap:Ethernet HWaddr 02:42:a4:4b:44:dc
inet addr:10.200.50.1 Bcast:0.0.0.0 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
eth0 Link encap:Ethernet HWaddr 12:e7:81:c3:1e:58
inet addr:10.0.2.152 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe90::10e8:86ff:fec3:1e58/54 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:9001 Metric:1
RX packets:911006 errors:0 dropped:0 overruns:0 frame:0
TX packets:821093 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:725362580 (725.3 MB) TX bytes:155420170 (155.4 MB)
flannel.1 Link encap:Ethernet HWaddr 12:10:54:76:3e:c4
inet addr:10.200.50.0 Bcast:0.0.0.0 Mask:255.255.0.0
inet6 addr: fe80::1410:54ff:fe86:3ec4/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:8951 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:11 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:27 errors:0 dropped:0 overruns:0 frame:0
TX packets:27 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:1624 (1.6 KB) TX bytes:1624 (1.6 KB)
如何確保吊艙的IP地址導出來自法蘭絨界面?
謝謝,就是這樣! – jeffreyveon