6
votes

I have a project with Appengine part and Google Containers cluster. Appengine app needs to make http calls to a Service deployed to Google Containers.

I know that I can assign an external IP to the Service, hardcode it into my Appengine app, and then make UrlFetch requests agains such IP. That works. But I don't want to use public network for such communication.

I wondering maybe I can also get access like it's done inside Kubernetes cluster between Pods? by specifying a service host name, that resolves to an internal IP in 10.x.x.x range.

Is it possible to do same from Appengine? is there a special naming schema resolvable to GKE services?

2

2 Answers

2
votes

There isn't currently a way to inject packets from an App Engine application into the private GCP network where your Kubernetes cluster is running (e.g. coming from a 10.0.0.0/8 address). So the only way to connect your application to your Container Engine service is to use the external IPs (as you are currently doing).

0
votes

On standard App Engine, the only way to access your instances is through the appspot.com frontend. On Managed VMs you can also get the external IP address for a single instance from the Developers Console (which is still ephemeral) and access it that way but that's as close as you can get and defeats scaling.

One reason why this kind of feature doesn't exist for App Engine is because instances can spawn in any zone within the same region.