Skip to content

Commit 82b3582

Browse files
committed
(untested) allow flannel interface selection, clarified for vagrant
users.
1 parent 17f98ed commit 82b3582

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

group_vars/all.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,13 @@ kube_service_addresses: 10.254.0.0/16
1515
kube_overlay_ip: 4.0.0.0
1616
# Prefix length of kube_overlay_ip range.
1717
kube_overlay_prefix: 16
18-
18+
# Flannel registers an interface with etcd
19+
# and this interface gets a unique subnet for all its docker containers.
20+
# Thus, the value you use here needs to be unique on ALL nodes of your cluster.
21+
# In vagrant setups, this often is eth1 (eth0 is the bridge sometimes).
22+
# HINT: If your nodes are spinning up containers w/ the same IP subnet,
23+
# then you messed it up !
24+
flannel_iface: eth0
1925

2026
# Internal DNS configuration.
2127
# Kubernetes can create and mainatain its own DNS server to resolve service names

roles/flannel/templates/flanneld.j2

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,7 @@ FLANNEL_ETCD="http://{{ groups['etcd'][0] }}:4001"
88
FLANNEL_ETCD_KEY="/coreos.com/network"
99

1010
# Any additional options that you want to pass
11-
#FLANNEL_OPTIONS=""
12-
11+
# In this case, we give it an interface, especially important
12+
# for cases such as vagrant, where eth0 might be a bridge, and you
13+
# want to use eth1.
14+
FLANNEL_OPTIONS="--iface={{ flannel_iface }}"

0 commit comments

Comments
 (0)