Browse Source

fix flannel's cross vm networking for vagrant

* set flannel backend type to `host-gw`
* set flannel interface to be eth1 ip
pull/227/head
Paul Czarkowski 8 years ago
parent
commit
bd064e8094
2 changed files with 4 additions and 1 deletions
  1. 4
      Vagrantfile
  2. 1
      roles/network_plugin/flannel/tasks/main.yml

4
Vagrantfile

@ -90,7 +90,9 @@ Vagrant.configure("2") do |config|
ip = "#{$subnet}.#{i+100}"
host_vars[vm_name] = {
"ip" => ip,
"access_ip" => ip
"access_ip" => ip,
"flannel_interface" => ip,
"flannel_backend_type" => "host-gw"
}
config.vm.network :private_network, ip: ip

1
roles/network_plugin/flannel/tasks/main.yml

@ -4,6 +4,7 @@
src: network.json
dest: /etc/flannel-network.json
backup: yes
- name: Flannel | Create flannel pod manifest
template:
src: flannel-pod.yml

Loading…
Cancel
Save