Search code examples
interfacekuberneteslanweave

Using Weave's Kubenetes YAML file, how can I ensure that Weave uses the local interface?


I try to install Kubernetes with ⁠⁠⁠⁠kubeadm⁠⁠⁠⁠. Moreover, I install a pod network with

kubectl apply -f https://git.io/weave-kube

as recommended on http://kubernetes.io/docs/admin/addons/ when you click on “Weave Net”. It works, but I have two interface cards per node: One to the Internet and one for the LAN between all nodes. How can I assure that Weave uses the interface to the LAN?


Solution

  • On each node, the own /etc/hostname should resolve to an internal IP through an entry in /etc/hosts. This way, Kubernetes uses the internal network for inter-node communication by default.