We have a K8s cluster on Azure (AKS) with Azure CNI networking. We specified the IP range with this CIDR: 10.131.0.0/22
So the IP range of pods between 10.131.0.0
and 10.131.3.255
. These are my internal IP's. And there is no problem until here.
I want to give a simplified example to express my problem:
Let's imagine a pod called pod1
in this cluster. Inside this pod, I want to access the outside world. Like curl myapi.com
(myapi.com
is a public web site and it's not related with this cluster).
Also imagine myapi.com
has a public IP like 10.131.0.166
which is overlapping my internal IP address range. How can I force pod1
to access this public IP rather than routing another pod within this cluster?