Can pod-network-cidr and service-cidr overlap outside cluster intranet ips?

#1

Hello, guys! i have a few questions about the pod-network-cidr and service-cidr and maybe someone can help me to understand.

Are these pod-network-cidr and service-cidr internal to the kubernetes cluster only ? Can they interfere with the external network if those addresses overlap addresses outside the cluster ?
Hypothetically speaking, since service-cidr defaults to “10.96.0.0/12”, what would happen if somewhere in my network ( outside the k8s cluster ) i have a router whose ip is 10.111.255.254 ( that belongs to the 10.96.0.0/12) ?
Thanks for the help!

#2

Hi! We looked at this question during office hours, take a look!

#3

here are the result:
https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/#pod-network

that your Pod network must not overlap with any of the host networks as this can cause issues. If you find a collision between your network plugin’s preferred Pod network and some of your host networks, you should think of a suitable CIDR replacement and use that during kubeadm init with --pod-network-cidr and as a replacement in your network plugin’s YAML.