I need to install flannel on kubernetes. My net range is 10.101.0.0/16
. I need to manage about 1500 nodes(bare metal).
My flannel config is
"Network": "10.101.0.0/16"
Flannel will set each node with 10.101.x.0/32
, Therefore the max number of noes is 255. How should I change the config to make it work with 1500 nodes??
Flannel gives each host an IP subnet (/24 by default) from which the Docker daemon is able to allocate IPs to the individual containers.
You can change default IP subnet netmask to any you want. This allows you to have more nodes, but from the other hand it decreases amount of pods in the node.
So, if you don't want to change your network range ("10.101.0.0/16") and still use flannel you can set:
/25
as default IP subnet netmask and be able to have 512 nodes with 125 pods each;
/26
as default IP subnet netmask and be able to have 1024 nodes with 61 pods each;
/27
as default IP subnet netmask and be able to have 2048 nodes with 29 pods each.
In order to set any range from above, just create it on etcd site. For example:
etcdctl --peers="{{ etcd_servers }}" set /coreos.com/network/config '{"Network":"10.101.0.0/16","SubnetLen": 25}'