<p>I have an VPN between the company network 172.16.0.0/16 and GCP 10.164.0.0/24</p>

<p>On GCP there is a cassandra cluster running with 3 instances. These instances get dynamical local ip adresses - for example <em>10.4.7.4</em> , <em>10.4.6.5</em>, <em>10.4.3.4</em>. </p>

<p>My issue: from the company network I cannot access 10.4x addresses as the tunnel works only for 10.164.0.0/24.</p>

<p>I tried setting up an LB service on 10.164.0.100 with the cassandra nodes behind. This doesnt work: when I configure that ip adress as seed node on local cluster, it gets an reply from one of the 10.4.x ip addresses, which it doesnt have in its seed list.</p>

<p>I need advice how to setup inter DC sync in this scenario.</p>

<p>IP addresses which K8s assign to Pods and Services are <a href="https://kubernetes.io/docs/concepts/cluster-administration/networking/" rel="nofollow noreferrer">internal cluster-only addresses</a> which are not accessible from outside of the cluster. It is possible by some CNI to create connection between in-cluster addresses and external networks, but I don't think that is a good idea in your case.</p>

<p>You need to expose your Cassandra using <a href="https://kubernetes.io/docs/concepts/services-networking/" rel="nofollow noreferrer">Service</a> with NodePort or LoadBalancer type. That is another one <a href="https://github.com/kubernetes/examples/issues/48" rel="nofollow noreferrer">answer</a> with a same solution from Kubernetes Github.</p>

<p>If you will add a Service with type NodePort, your Cassandra will be available on a selected port on all Kubernetes nodes. </p>

<p>If you will choose LoadBalancer, Kubernetes will create for you Cloud Load Balancer which will be an entrypoint for Cassandra. Because you have a VPN to your VPC, I think you will need an <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/internal-load-balancing" rel="nofollow noreferrer">Internal Load Balancer</a>.</p>
