Flannel is a simple, lightweight, and scalable data plane for Kubernetes networking. It provides a network interface that can be used by the pods to communicate with each other and with the outside world.
Features of Flannel
- Simple Configuration: Flannel uses a simple configuration file to define the network settings.
- High Performance: It offers high-performance networking with minimal overhead.
- Dynamic IP Address Assignment: Flannel can dynamically assign IP addresses to the pods.
How Flannel Works
Flannel works by creating a virtual overlay network on top of the physical network infrastructure. It does this by assigning a subnet to each node and then using an IP-in-IP encapsulation to send packets between nodes.
Key Components
- Subnet: A subnet is a range of IP addresses that are assigned to a node.
- IP-in-IP Encapsulation: This is a method of encapsulating one packet within another, allowing packets to be sent over a network that does not natively support the protocol of the packet being sent.
- Etcd: Flannel uses etcd to store and share network configuration information across all nodes.
Example Configuration
network:
type: overlay
subnets:
- cidr: 10.244.0.0/16