limitation of flannel on kubernetes

9/22/2017

I using flannel on kubernetes. On very node, there is a flannel interface and cni interface. I.E, If I use 10.244.0.0 as subnet, Then

flannel 10.244.3.0
cni 10.244.3.1

They almost always come as a pair like above. The quest is, If I use flannel, The number of nodes should be less equal than 255 ? 10.244.1~255.0

That is I can only manage 255 nodes on kubernetes with flannel ???

-- xren
flannel
kubernetes

1 Answer

9/22/2017

Flannels network range is changeable in its net-conf.json, see the recommended kubernetes deployment of flannel 0.8.0 for clarification. The actual subnet given to node the is set on node join by the Kubernetes node controller and fetched by flannel via the Kubernetes api server on startup before network creation when the --kube-subnet-mgr option of the flannel daemon is set.

I am not familiar with the implementation of the Kubernetes node controller, I suspect it would assign smaller subnets to the nodes if the third octet of the CIDR is exhausted. If you want to be absolutely sure, set your flannel network to something like 10.0.0.0/8, depending on number of nodes and pods.

-- Simon Tesar
Source: StackOverflow