我在这里遵循指南:
设置 1 个 master 和 2 个 minions 的 Kubernetes 集群。完成所有步骤后,当我创建一个 pod 时,它会被安排到一个 minion,但仍处于 Pending 状态。
当我查看 minion 中的 Kubelet 日志时,我看到了这个错误:
Jan 24 00:46:21 localhost.localdomain kubelet[2356]: E0124 00:46:21.042058 2356 kubelet.go:906] Error syncing pod, skipping: API error (500): Cannot start container fa6cbc76fe336aca5f9a341c8cf71ad4ba3aec83e276e340d0e5de16a0052001: setup networking set gateway to 10.0.1.0 on device eth0 failed with invalid argument
我的主人的网络是这样的:
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.109.82 netmask 255.255.255.0 broadcast 192.168.109.255
inet6 fe80::250:56ff:fe0b:bb1 prefixlen 64 scopeid 0x20<link>
ether 00:50:56:0b:0b:b1 txqueuelen 1000 (Ethernet)
RX packets 2822228 bytes 201486806 (192.1 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1527270 bytes 143886867 (137.2 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
在 minion 上,网络如下所示:
[root@localhost ~]# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.109.83 netmask 255.255.255.0 broadcast 192.168.109.255
inet6 fe80::250:56ff:fe0b:bb0 prefixlen 64 scopeid 0x20<link>
ether 00:50:56:0b:0b:b0 txqueuelen 1000 (Ethernet)
RX packets 2207203 bytes 164668744 (157.0 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 777356 bytes 65960933 (62.9 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
kbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 10.0.1.0 netmask 255.255.255.0 broadcast 10.0.1.255
ether 00:00:00:00:00:00 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1 bytes 42 (42.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
有人会暗示这里可能出了什么问题吗?
谢谢!