1

I am configuring my GKE service to work with internal load balancer as described in the GCP docs:

apiVersion: v1
kind: Service
metadata:
  name: [NAME]
  annotations:
    cloud.google.com/load-balancer-type: "Internal"
spec:
  type: LoadBalancer
  loadBalancerIP: [IP-ADDRESS]
  ...

I have previously allocated the internal IP in GCP to serve as the ILB address, and is seen in the API as:

> gcloud compute addresses list --project=[PROJECT] --uri
...
https://www.googleapis.com/compute/v1/projects/[PROJECT]/regions/us-central1/addresses/[NAME]
...

It works fine as it is, but the question is: Is there a way to refer to the IP address by its URI from my service.yaml, or do I always have to copy its value?

1

0

You must log in to answer this question.