我在这里关注指南:
设置一个由1个主人和2个小兵组成的Kubernetes集群。完成所有步骤后,当我创建一个pod时,它会被安排到一个minion但仍然处于Pending状态。
当我查看奴才中的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
在小兵身上,网络看起来像这样:
[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
有人会对这里可能出现的问题有任何暗示吗?
谢谢!
答案 0 :(得分:0)
您链接到指南的顶部说&#34;本指南只能让一个小兵工作。多个小兵需要在kubernetes之外完成功能性网络配置。&#34;
您是否为群集完成了任何特殊的网络配置(如flannel)?
如果您想使用Fedora,您可能会更好地遵循Fedora + Ansible说明而不是手动说明。