Search code examples
kubernetesipkubeadmcidr

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


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

Solution

  • --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)