<p>Shortly, there are two services that communicates with each others via HTTP REST APIs. My deployment is running in an AKS cluster. For ingress controller, I installed this Nginx controller helm chart:
<a href="https://kubernetes.github.io/ingress-nginx" rel="nofollow noreferrer">https://kubernetes.github.io/ingress-nginx</a> <br><br>
The load balancer has a fix IP attached. My deployment running in my cluster should send usage info to the other service periodically and vica versa. However, that service has an IP whitelist and I need to provide a static IP for whitelisting my deployment. Currently, the problem is that my cURL call has the node's IP which is always changing depending on which node my deployment is running on. Also, the number of nodes are scaled dinamically, too. My goal is to send egress traffic through the loadbalancer something like this:<br> <a href="https://i.stack.imgur.com/LQVGc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LQVGc.png" alt="enter image description here" /></a> <br><br>
Is there any way to route the outbound traffic from my pods to the loadbalancer?</p>

<p>This is possible with Azure Load Balancer with <a href="https://learn.microsoft.com/en-us/azure/load-balancer/egress-only" rel="nofollow noreferrer">outbound rules</a>; which the LB will do a SNAT and your &quot;other service&quot; will see the fixed frontend public IP. Another method is use <a href="https://learn.microsoft.com/en-us/samples/azure-samples/aks-nat-agic/aks-nat-agic/" rel="nofollow noreferrer">Virtual Network NAT</a> where your &quot;other service&quot; will see the fixed NAT public IP. You can then whitelist the fixed public IP either way.</p>
