Why does setting gateway on minion to 10.0.1.0 fail on Kubernetes?

1/25/2015

I am following the guide here:

https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/getting-started-guides/fedora/fedora_manual_config.md

to setup a Kubernetes cluster of 1 master and 2 minions. After following through all the steps, when I create a pod it gets scheduled to a minion but continues to be in the Pending state.

When I look at the Kubelet log in the minion, I see this error:

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

The network on my master looks like this:

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

On the minion the network looks like this:

[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

Would anyone have any hints of what could be going wrong here ?

Thank you!

-- S K
kubernetes

1 Answer

1/27/2015

The top of the guide you link to says "This guide will only get ONE minion working. Multiple minions requires a functional networking configuration done outside of kubernetes."

Have you done any special networking configuration (like flannel) for your cluster?

If you want to use Fedora, you might have better luck following the Fedora + Ansible instructions instead of the manual instructions.

-- Robert Bailey
Source: StackOverflow