I'm using an OpenVPN connection inside one of my pods inside my cluster. The problem is that when the VPN connection fires, I'm not able to access my cluster services by DNS name (say I have a "backend" service, "backend" or "backend.default.svc.cluster.local" are not reachable) nor via their respective IP. I manage to reach cluster services when changing my VPN client config by adding :
route 10.2.0.0 255.255.0.0 net_gateway
dhcp-option DNS 10.3.0.10
dhcp-option DNS 192.168.10.1
dhcp-option DNS 188.8.131.52
dhcp-option DOMAIN-SEARCH cluster.local
dhcp-option DOMAIN-SEARCH svc.cluster.local
dhcp-option DOMAIN-SEARCH default.svc.cluster.local
But of course then, external traffic is not going through VPN, even if it is working properly.
So to sum up my needs : I'm want to be able to open a VPN connection inside a pod, I want all requests (I try to reach remote websites that we don't have inside the cluster) but I still want to be able to send requests to services inside the cluster. Does somebody have some insights to help me figure out how to achieve that. I would be very grateful!
Ps: I have the same application running on a dedicated server under docker-compose which handle this correctly.