Question about the "--pod-network-cidr" option when initializing the cluster

Hi everyone,

In the cluster setup with kubeadm lecture, the “–pod-network-cidr” option was passed to kubeadm init with the value of 10.244.0.0/16.
What’s the point of this since Weave allocates a different CIDR to the pods when deployed. This is shown in the weave logs: ipalloc-range:10.32.0.0/12.
To confirm this I run a simple nginx pod and it was affected an IP in the range that Weave specified.

NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES nginx 1/1 Running 0 18m **10.36.0.1** worker-1 <none> <none>

Anyone can shed some light on this?
Thank you in advance.

Hello, @yassinelaz
By default weave uses its’ own defined pod network range. Only in case of calico, --pod-network-cidr will work.

Hi,

Understood but that whats the point of using the --pod-network-cidr option.
It gets passed on to the controller manager as --cluster-cidr with the wrong value. The same thing goes for the kube-proxy with the clusterCIDR option in its configMap configuration.
The cluster seems to work fine even with these set to wrong CIDR values.