Suppose I have a k8s cluster whose services IP range is 10.198.240.0/20.
Now I want this IP range to be accessible from another cluster or data center.
Is it feasible to run OpenVPN within kubernetes POD so that this IP range is accessible via VPN?
Had the same problem and made this solution:
Try it and let me know if it works for you.
Instructions:
get the service ID
What you are trying to achieve is described in these discussions [1][2]. Basically after you have exposed Kubernetes services to be reachable via a private IP, you also need to add at least one route in your Google network.
As an example, my services always get deployed using these range 10.167.240.0/20. I got the address range by looking at the output for ¨ gcloud container clusters describe CLUSTER_NAME --zone ZONE¨ (servicesIpv4Cidr: 10.167.240.0/20.)
I added a route in my Google network so that the range 10.167.240.0/20 is forwarded to one of my cluster´s node.