Connect from Appengine to Kubernetes from Google Containers

I have a project with an Appengine part and a Google Containers cluster. The Appengine app should make http calls to a service deployed on Google Containers.

I know that I can assign an external IP address to the Service, write it to my Appengine application, and then repeat UrlFetch requests to that IP address. It works. But I do not want to use a public network for such communication.

I am wondering, maybe I can also access, how is this done inside the Kubernete cluster between Pods? specifying a service host name that resolves to an internal IP address in the range 10.xxx

Is it possible to do the same from Appengine? Is there a special naming scheme allowed for GKE services?

+5
source share
2 answers

There is currently no way to inject packets from an App Engine application into a private GCP network where your Kubernetes cluster is running (e.g., coming from 10.0.0.0/8). Thus, the only way to connect your application to the Container Engine service is to use external IP addresses (as you are doing now).

+2
source

In the standard Engine application, the only way to access your instances is through the appspot.com interface. In Managed Virtual Machines, you can also get the external IP address for one instance from the Developer Console (which is still ephemeral) and access it this way, but since you can get and defeat the scaling.

One of the reasons why this feature does not exist for App Engine is because instances can appear in any zone within the same region.

0
source

Source: https://habr.com/ru/post/1240448/


All Articles