I'm in the process of setting up a Kubernetes cluster from scratch. I am looking to install Flannel as part of the installation process. When I look at online guides/examples I can see that it is necessary to configure the Flannel subnetwork.
I can see that some guides (deploying-kubernetes-using-ansible.html) set up the flannel network like this:
{
"Network": "172.16.0.0/12",
"SubnetLen": 24,
"Backend": {
"Type": "vxlan"
}
}
whereas another guide here (Kubernetes – simple install on CentOS 7) sets up the network like this:
{"Network":"172.17.0.0/16"}
I am still learning about CIDR notation, so I can see that there are more IP addresses available with the first approach than the second. The second URL states that:
All your kubernetes nodes will be in 3 different subnets at the same time:
External interface subnet: 10.0.1.0/24
Flannel subnet: 172.17.0.0/16 #Do not use existing subnet
Service cluster subnet: 10.10.10.0/24 # Do not use existing subnet
I can see from Wikipedia (Private IPv4 address spaces) that the 172 range is a private address space of up to /12.
The implications of the quote as I see them are:
- External interface: /24 (set by the network admin) == up to 255 hosts on the external network. This is the max number of nodes in the cluster.
- Flannel subnet: 172.17.0.0/16 (set by Flannel config) == up to 65535 IPs in the Flannel network. What does this mean?
- Service cluster: 10.10.10.0/24 (set by KUBE_SERVICE_ADDRESSES="--service-cluster-ip-range=10.10.10.0/24") == up to 255 services in the cluster? (docs here)
What are the practical implications of changing the Flannel config to /12 (or any other number from 12..31)?
Same question for service-cluster-ip-range
and how do you deconflict the service IPs from the IPs of pods?