How to provide for 2 different IP ranges? --pod-network-cidr= for multiple IP ranges

4/11/2019

I have 2 different IP sets in the same network. My kubeadm is in a different IP range than my other nodes. How shall I set the property here: kubeadm init --pod-network-cidr=

cat /etc/hosts
#kubernetes slaves  ebdp-ch2-d587p.sys.***.net 172.26.0.194,  ebdp-ch2-d588p.sys.***.net 172.26.0.195
10.248.43.214 kubemaster
172.26.0.194 kube2
172.26.0.195 kube3
-- Meena Rajani
cidr
ip
kubeadm
kubernetes

2 Answers

4/18/2019

In addition to @Yavuz Sert answer, --pod-network-cidr flag identifies Container Network Interface (CNI) IP pool for Pods communication purpose within a Kubernetes cluster. You have to choose some separate IP subnet for Pod networking, it has to be different against your current given network sets. Since --pod-network-cidr has successfully applied kube-proxy reflects Pod IP subnet and add appropriate routes for network communication between Pods through cluster overlay network. Indeed you can find clusterCIDR flag withing kube-proxy configmap which corresponds to --pod-network-cidr.

-- mk_sta
Source: StackOverflow

4/12/2019

--pod-network-cidr is for IPs of the pods that kubernetes will manage. It is not related with nodes of the cluster.

For nodes, the requirement is (from Kubernetes doc):

Full network connectivity between all machines in the cluster (public or private network is fine)

-- Yavuz Sert
Source: StackOverflow