<p>I have a k8s cluster on <code>DigitalOcean</code> using <code>traefik</code> 1.7 as Ingress Controller.
our domain point to the load balancer ip created by <code>trafik</code>.</p>

<p>All incomming request go through load balancer ip and be routed by <code>trafik</code> to proper service.</p>

<p>Now I want to perform HTTP requests from my services to an external system which only accepts registered IPs.</p>

<p>Can I provide them load balancer's IP and make all outbound requests go through load balancer IP? or I need to provide them all node's public IPs?</p>

<p>thanks</p>

Kien Dang
<p>You can do either of them.</p>

<p>But the best solution to this would be to make all the traffic go through load balancer assuming this is some proxy server with tunnelling capabilities and open comms through load balancer IP on your external system. Because, imagine, right now you might be having a dozen of nodes running 100 micro services and  now you opened your external system security group to allow traffic from dozen.</p>

<p>But in next few months you might go from 12 to 100 nodes and the overhead of updating your external system's security group whenever you add a node in DigitalOcean. </p>

<p>But you can also try a different approach by adding a standalone proxy server and route traffic through it from your pods. Something like [this] (<a href="https://stackoverflow.com/questions/59469135/kubernetes-outbound-calls-to-an-external-endpoint-with-ip-whitelisting/59469678#59469678">Kubernetes outbound calls to an external endpoint with IP whitelisting</a>).</p>

<p>Just a note, it's not just these options there are several ways one can achieve this, one another approach would be associating a NAT IP to all your nodes and keeping every node behind a private network would also work. It all depends on how you want to set it up and the purpose of the system you are planning to achieve.</p>

<p>Hope this helps.</p>
