<p>I'm using GKE for deployments.</p>
<p><strong>Edit</strong>: I need to access a customer's API endpoint which is only accessible when using their VPN. So far I can run a container which connects to this VPN and I can cURL the endpoint successfully.</p>
<p>For the above, I have configured a Debian docker image which successfully connects to a VPN (specifically, using Kerio Control VPN) when deployed. Whenever I make a net request from this container, it runs through the VPN connection, as expected.</p>
<p>I have another image which runs a .NET Core program which makes necessary HTTP requests.</p>
<p>From <a href="https://jordanelver.co.uk/blog/2019/06/03/routing-docker-traffic-through-a-vpn-connection/" rel="nofollow noreferrer">this guide</a> I know it is possible to run a container's traffic through another using pure docker. Specifically using the <code>--net=container:something</code> option (trimmed the example):</p>
<pre><code>docker run \
  --name=jackett \
  --net=container:vpncontainer \
  linuxserver/jackett
</code></pre>
<p>However, I have to use Kubernetes for this deployment so I think it would be good to use a 2-container pod. I want to keep the VPN connection logic and the program separated.</p>
<p>How can I achieve this?</p>

<p>Each container in pod have shared network resources. If you run vpn client in one container them all containers in this pod will have access to network via vpn.</p>
