<p>I am trying to make a GET request to a foreign server. But the foreign server requires our IP address for security purposes.</p>
<p>Now the problem is I am running my app inside Kubernetes' pod with three nodes.
When I send the request, it takes the IP address of one of the kubernetes nodes.
I could add static IP addresses to all my nodes. But from what I have learned, best practice is to only release the Gateway(ingress) IP address to the outside world. Everything else should be hidden.</p>
<p>So I tried to proxy my axios request like this:</p>
<pre><code>var res = await axios.get('https://someapi.com', {
    proxy: {
        host: 'ingressIP', //static ip
        port: 80
    }
});
</code></pre>
<p>But the request still returns an error saying that the IP is not allowed. It returned the IP address of the kubernetes node, where my POD was in.</p>

Sihoon Kim
<p>I am not sure, that you will be able to pass your traffic through ingress somehow.</p>
<p>We also had the same problem. We needed to send requests to a third-party server from a specific IP-address.</p>
<p>But we solved this a bit different, we just created a new small server with static IP, installed <a href="http://www.squid-cache.org/" rel="nofollow noreferrer">Squid</a> proxy server there and configured our applications to use Squid server as an HTTP forward proxy.</p>
