aks+ firewall control egress traffic with multiple IPs

Copper Contributor

My basic problem is to run multiple containers that make HTTP requests to a test server. I need to control the egress traffic with multiples IPs. I need that each pod or a set of pod have different outbound IPs. I am using azure AKS. So far I follow the documentation from: https://docs.microsoft.com/en-us/azure/aks/limit-egress-traffic#restrict-egress-traffic-using-azure-... The above works fine. I need to run another container with a different outbound IP address. For that I created a new Ip address, add it to the firewall, created a new Kubernetes service, connect the container to it and also create a new NAT rules connecting the service IP to the new public IP. That didn't work: the source Ip registered by the test server is the same public IP wich is the first public IP of the firewall.

The Documentation also states that: "If needed, you can generalize the steps above to forward the traffic to your preferred egress solution, following the Outbound Type userDefinedRoute documentation."

For that, I create a cluster with vm-set-type of VirtualMachineScaleSets and load-balancer-sku of Standard. Try the above steps and it didn't work. Also, I created a new route on the Route table connecting the internet to the new public IP.. nothing I am lack of ideas. I don't know if I mess something up. Anyway.. Any idea is welcome. Thanks in advance.

0 Replies