cookeem / kubeadm-ha

通过kubeadm安装kubernetes高可用集群,使用docker/containerd容器运行时,适用v1.24.x以上版本
MIT License
679 stars 275 forks source link

Add configuring network interface for flannel #28

Closed Mar4eli closed 6 years ago

Mar4eli commented 6 years ago

According to official flannel documentation there is a known issue with flannel and vagrant:

Vagrant typically assigns two interfaces to all VMs. The first, for which all hosts are assigned the IP address 10.0.2.15, is for external traffic that gets NATed.

This may lead to problems with flannel. By default, flannel selects the first interface on a host. This leads to all hosts thinking they have the same public IP address. To prevent this issue, pass the --iface eth1 flag to flannel so that the second interface is chosen.

Can you please add network interface options for flannel in your cannal.yaml?

cookeem commented 6 years ago

@Mar4eli IP_AUTODETECTION_METHOD option related with network interface selection in canal.yaml file:

            - name: IP_AUTODETECTION_METHOD
              value: "can-reach=K8SHA_CALICO_REACHABLE_IP"

this will help you to select the network interface you expect not the first interface.

Mar4eli commented 6 years ago

Thanks, this helped!