Can I get geo location data for client IP

4/3/2018

I know with app engine, I would receive some geo location headers such as city, country for client IP (See documentation).

Is there a equivalent feature in Google Kubernetes Engine? If not, what is the best solution for getting IP geo location data with Google Kubernetes Engine?

-- user3908406
google-cloud-platform
google-kubernetes-engine
kubernetes

1 Answer

4/3/2018

Hi I think this is a very broad question. Google App Engine is eventually a framework and a deployment environment in one package, which provides lots of nice features (like the one you indicate above) + abstracts a lot more.

The Google Container Service (Kubernetes) is actually kubernetes as a service, where the cluster is configured and provided to you, in order to ship and deploy your application (which needs to be packaged as a container) and then if you want so, to be exposed to the internet. The service (GCE) does not provide the same kind of abstractions as GCE, it is far different, it abstracts some raw 'concerns' like the infrastructure, but what you are going to deploy on top of it is actually your problem. Meaning they do provide the environment, the cluster but the apps and functionality is totally up to you.

What I am trying to say is that, in order to track geo location data in the latter, you need to deploy a container with some code, that is going to be exposed as a service (is going to have a public endpoint /IP) and then is going to receive requests..and then your code/server/container is going to track the incoming request's header.

So it is your responsibility/ concern to provide that kind of functionality and not the environment.

I hope you get the idea, regarding the fundamental differences :)

-- javapapo
Source: StackOverflow