Integrating Flannel with CoreOS
Flannel runs a daemon flanneld
on each host, responsible for allocating a free IP within the configured subnet. flanneld
sets a watch on etcd
information and routes the packets using the mechanism configured.
Although the flanneld
service is not part of the standard CoreOS distribution, when the flanneld
service is started through cloud-config
, CoreOS internally starts a service before other initializations to pull flanneld
from the docker
registry. flanneld
is stored as a docker
container in the CoreOS enterprise registry.
The same setup used for Weave networking is being used here. Note that for Flannel, hostnames are irrelevant.
The following is the cloud-config
file used to create setup. The other configuration files are reused from the Static discovery section in Chapter 3, Creating your CoreOS cluster and Managing the Cluster. Set $num_instances
to 2
in the config.rb
file as we need to start only two instance of members.
#cloud-config --- coreos: etcd2...