Skip to content

Flannel

Cel A. Skeggs edited this page Dec 1, 2017 · 3 revisions

Every pod (i.e. small group of containers, often just one container) needs its own IP address, so that it can expose network services to the rest of the Kubernetes cluster.

The default networking model for containers allows communication between containers on the same host, but not communication between containers on different hosts. Because we want to separate the actual hardware from how the cluster functions, we need an overlay network that spans the entire Homeworld cluster.

Enter flannel.

Flannel provides an overlay network, taking (in our case) a /16 of non-publically-routable IP addresses (such as 172.18.0.0/16), handing out a /24 of such addresses to each cluster node, and then letting each cluster node hand out individual IP addresses from that range to the containers that it runs.

These IP addresses are routed throughout the entire cluster, by letting flannel encapsulate them in UDP packets that are then routed between the normal IP addresses of the physical nodes. This allows any container running on any node to communicate with any container running on any other node, just by knowing its internal IP address.

This network is invisible outside of the cluster.

[insert more stuff about flannel here]

Clone this wiki locally