Reputation: 1115
I’m using GKE multi-cluster service and have configured two clusters.
On one cluster I have an endpoint I want to consume and it's hard-coded on address:
redpanda-0.redpanda.processing.svc.cluster.local.
Does anyone know how I can reach this from the other cluster?
I have exported the service, which is then automatically imported into the other cluster. Previously, I have been able to connect to the other cluster using SERVICE_EXPORT_NAME.NAMESPACE.svc.clusterset.local
, but then I had to change the endpoint address manually to this exact address. In my new case, the endpoint address is not configurable.
Upvotes: 0
Views: 505
Reputation: 144
Do you know if your clusters are connected to the same VPC? If so, you might as well just create a LoadBalancer service that is exposed only to internal network, which would also allow you to create proper DNS hostname and static internal IP. Something like this:
- kind: Service
apiVersion: v1
metadata:
name: my-app
annotations:
networking.gke.io/load-balancer-type: "Internal"
spec:
type: LoadBalancer
ports:
- port: 8080
name: my-service
targetPort: 8080
selector:
app: my-app
Doing so would be more straightforward than creating service exports and needing an additional API on the GKE side.
Upvotes: 0