Networking of multihost containers with Flannel

In this recipe, we'll use Flannel ( to set up multihost container networking. Flannel is a generic overlay network that can be used as an alternative to Software Defined Networking (SDN). It is an IP-based solution that uses Virtual Extensible LAN (VXLAN), in which unique IP addresses are assigned to each container on a unique subnet given to the host that is running that container. So, in this kind of a solution, a different subnet and communication occurs within each host in the cluster, using the overlay network. Flannel uses the etcd service ( for the key-value store.

Getting ready

For this recipe, we will require three VMs or physical ...

Get DevOps: Puppet, Docker, and Kubernetes now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.