Sharing Gluten OpenVPN With Container In Pod

Cluster information:

Kubernetes version: 1.25.4
Cloud being used: DigitalOcean
Installation method: DigitalOcean Managed Kubernetes Service


I am trying to figure out the networking implications of containers in the same pod. Specifically in terms of VPNs and traffic routing tables.

I have setup a Gluten container to run an OpenVPN client which connects to the Private Internet Access VPN. In the Gluten docs they provide instructions for using the network_mode Docker compose option to connect a main container to the VPN container. My understanding is this makes the two containers share the same networking stack (namespace?). So if the OpenVPN client is not configured in split tunnel mode, and should send all traffic through the VPN, then the main container should have the same behavior.

While reading the Kubernetes docs it seems like containers in the same pod act similar to Docker compose containers with network_mode linking them? Where containers in the same pod share the same networking stack?

If this is true then would it be the case that any pod with an OpenVPN sidecar container will have other container’s networking behave as the VPN setup?