Flannel is an open source soft-defined networking solution for containers. It works by making a subnets available to hosts for use with container runtimes.
It is one of the many new featured introduced in rkt 0.8, which was released in August.
In the following blog post, you’ll read how to use Flannel as a soft-defined networking solution for rkt containers running on CoreOS Linux.
It begins like this:
Let’s walk through setting up rkt with flannel on CoreOS. We start with the CoreOS image 808.0 or later and bring up 3 instances clustered together using the following cloud-config:
#cloud-config coreos: units: - name: etcd2.service command: start - name: flanneld.service drop-ins: - name: 50-network-config.conf content: | [Service] ExecStartPre=/usr/bin/etcdctl set /coreos.com/network/config '{ "network": "10.1.0.0/16" }' command: start etcd2: discovery: $YOUR_DISCOVERY_TOKEN advertise-client-urls: http://$public_ipv4:2379 initial-advertise-peer-urls: http://$private_ipv4:2380 listen-client-urls: http://0.0.0.0:2379 listen-peer-urls: http://$private_ipv4:2380 write_files: - path: "/etc/rkt/net.d/10-containernet.conf" permissions: "0644" owner: "root" content: | { "name": "containernet", "type": "flannel" }