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?

bereal
  • 131
  • 1
  • 4
  • It seems only [IP addresses are accepted](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#service-v1-core). I think you can use “URIs” in [Deployment Manager](https://cloud.google.com/deployment-manager/docs/quickstart) templates/config files, but not with Kubernetes or Kubernetes Engine. – Fady Sep 04 '18 at 01:22

0 Answers0