Skip to content

Commit

Permalink
(untested) allow flannel interface selection, clarified for vagrant
Browse files Browse the repository at this point in the history
users.
  • Loading branch information
jayunit100 committed Jun 21, 2015
1 parent 17f98ed commit 82b3582
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
8 changes: 7 additions & 1 deletion group_vars/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,13 @@ kube_service_addresses: 10.254.0.0/16
kube_overlay_ip: 4.0.0.0
# Prefix length of kube_overlay_ip range.
kube_overlay_prefix: 16

# Flannel registers an interface with etcd
# and this interface gets a unique subnet for all its docker containers.
# Thus, the value you use here needs to be unique on ALL nodes of your cluster.
# In vagrant setups, this often is eth1 (eth0 is the bridge sometimes).
# HINT: If your nodes are spinning up containers w/ the same IP subnet,
# then you messed it up !
flannel_iface: eth0

# Internal DNS configuration.
# Kubernetes can create and mainatain its own DNS server to resolve service names
Expand Down
6 changes: 4 additions & 2 deletions roles/flannel/templates/flanneld.j2
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@ FLANNEL_ETCD="http://{{ groups['etcd'][0] }}:4001"
FLANNEL_ETCD_KEY="/coreos.com/network"

# Any additional options that you want to pass
#FLANNEL_OPTIONS=""

# In this case, we give it an interface, especially important
# for cases such as vagrant, where eth0 might be a bridge, and you
# want to use eth1.
FLANNEL_OPTIONS="--iface={{ flannel_iface }}"

0 comments on commit 82b3582

Please sign in to comment.