Score:0

GCP: Api Gateway failing to redirect to an url made from a private dns

pk flag

I have a vm instance at IP 35.187.188.140. I created two url representing this service by two different ways, and I inject it in the Gateway configuration file.

http://35.187.188.140.nip.io is a url created by nio.io service. Given an IP, you get a public url http://nik.internal.zone:3000 is a url made from a DNS Zone, with A -> The good IP

The gateway works perfectly with the public nip address, but fails with the private url ginving the message:

{"message":"no healthy upstream","code":503}

However, from a second vm instance, I'm perfectly able to reach the service using the private url !

So here is the full config


swagger: '2.0'
info:
  title: nipornot2
  description: API test for backend
  version: 1.0.0
schemes:
  - https
produces:
  - application/json
paths:
  /api/v1/nip:
    get:
      summary: Greet a User from service
      operationId: hellonip
      x-google-backend:
        address: http://35.187.188.140.nip.io:3000/api/v1/service
      responses:
        '200':
          description: A successful response
          schema:
            type: string
  /api/v1/service:
    get:
      summary: Greet a User from service
      operationId: hello
      x-google-backend:
        address: http://nik.internal.zone:3000/api/v1/service
      responses:
        '200':
          description: A successful response
          schema:
            type: string

Maybe internal url are not allowed for some reason but I don't see a good alternative, maybe I miss something in the config. Any idea ?

Jeffrey D. avatar
cl flag
Try to review this [documentation](https://cloud.google.com/dns/docs/zones#create-private-zone), follow all prerequisites.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.