Classless Inter-Domain Routing (CIDR) is used to extend the IPv4 addressing scheme, using the subnets instead of "wasting" whole IP addresses on a handful of machines in a network.

Kubernetes allows us to define the CIDR for a cluster , so we wouldn't have two pods with the same IP address on two different clusters.


We could use the "--pod-network-cidr" parameter when setting up the kubernetes cluster with the "kubeadm" tool:


Pods could get for example the addresses : 10.244.0.1, 10.244.0.2, ...

On another cluster, we could have for example:


Pods in that cluster could get for example the addresses : 10.244.1.1, 10.244.1.2, ...

kubeadm is a utility that allows us to set up a kubernetes cluster, and it takes several parameters, among them, as we saw above the "--pod-network-cidr" parameter.

We could also check the CIDR of the cluster, by cheking the Yaml file of the API server as below:

Brando Sabatini and Ikbal C ©. Powered by Blogger.