Welcome to the Linux Foundation Forum!

Network timeout immediately after first pod deployment

aherisanu
aherisanu Posts: 6
edited April 2020 in LFD259 Class Forum

Hi,
I have a weird issue that's reproducing on two different computers. I have a VMWare setup with a VM for master and a second VM for the worker.

Immediately after I install kubernetes and I kubectl create the first pod, the network drops on both hosts.
I can't ping my router.

The network setup is set to Bridged.
I'm out of ideas. Doesn't appear to be a firewall issue. If I reboot the hosts, network will work up until kubernetes is up and running.

Network CIDR is: 192.168.1.0/24
Pod network CIDR: 192.168.0.0/16

Should the pod network CIDR be the same with my network?

Comments

  • chrispokorni
    chrispokorni Posts: 2,357

    Hi @aherisanu,

    The 2 network CIDRs should not overlap.

    In addition, I would explore the VMware documentation around networking features. Keep in mind that your Kubernetes nodes need access to the internet, while they should also be able to fully talk to each other (all ports should be visible between nodes, with no firewall blocking any traffic).

    Regards,
    -Chris

  • Hi @chrispokorni,
    thank you for your reply.

    I think I found the issue. I configured each host to use static IP addressing and the problem fixed itself. Weird.

    Thank you for your help.

    herisanu@master:~/work/ch2$ cat /etc/cloud/cloud.cfg.d/50-curtin-networking.cfg
    network:
      ethernets:
        ens33:
          dhcp4: no
          addresses: [192.168.1.20/24]
          gateway4: 192.168.1.1
          nameservers:
            addresses: [192.168.1.1]
      version: 2
    herisanu@master:~/work/ch2$
    
  • Nope. That was not it.

  • chrispokorni
    chrispokorni Posts: 2,357

    You are right, that is not it, although it helps to have a static IP at least for your master node.

  • aherisanu
    aherisanu Posts: 6

    Just wanted to leave here a workaround: I've configured the system to use Flannel instead of IP-IP and BGP.
    https://docs.projectcalico.org/getting-started/kubernetes/flannel/flannel

    Tried to disable IP-IP, once all containers are up and running, I can't ping my router anymore. Anything else works.
    Unfortunately I don't have any diagnostics on the router and can't say for sure what it seems to be the problem.
    I see the packets going out, but nothing in.

    If anyone has any ideas i can debug this, I'd be happy to give it a try.

  • chrispokorni
    chrispokorni Posts: 2,357

    Flannel is a lighter alternative to Calico, but in a later chapter, more specifically the exercise on Network Policy, you may run into unexpected/inconsistent results since Flannel does not support the Network Policies feature of Kubernetes.

    I am not familiar with any configuration change on the router, and typically Kubernetes network plugins do not affect routers. The network plugins should only configure the networking of the local node(s). Keep in mind, however, that your hypervisor has some say in the node's networking configuration also, and, if their configuration settings are in conflict, then you'd experience connectivity issues either between the nodes, or between nodes and the internet.

    Regards,
    -Chris

  • aherisanu
    aherisanu Posts: 6

    Thank you for the heads-up @chrispokorni . I've reinstalled the Kubernetes setup to use Calico, but VXLAN instead of IPIP and no BGP.

    It seems that this did the trick in my case.
    This is the link for the ones that might hit the same issues as me.
    https://docs.projectcalico.org/getting-started/kubernetes/installation/config-options#switching-from-ip-in-ip-to-vxlan

Categories

Upcoming Training