kubernetesgoogle-cloud-platformkubernetes-podambassadorgpc

Kubernetes call service exposed with ambasador in cluster cluster-a from a different cluster cluster-b, same prohect but different vpc


I have two Kubernetes clusters cluster-a, cluster-b in Google Cloud GCP. Can i call a service exposed with ambasador in cluster (cluster-a) from a different cluster (cluster-b) in the same GCP project but different VPC's ?

Right now i can call the service by the ambasador service name (when I do it in the same cluster).

I have read about Internal TCP/UDP Load Balancing, but it only works when cluster-a and cluster-b are in the same VPC network and my clusters are in different VPC's.

There is a different approach to accomplish it ?


Solution

  • VPCs on GCP aren't routed to each other by default, so your requests won't be reaching the remote CIDRs. For that, you want to use VPC Network Peering to make each VPC reachable to each other.

    Note that firewall rules still apply for both VPCs, so you have to create them in order to establish full communication.

    Finally, this will only allow network communication between your VPCs. If you rule out this as the issue and you're still experiencing lack of connectivity, it might be related to your Ambassador configuration, in which case, I'd recommend posting either information about that or create another question for that specifically.