0

I am new to both Google Cloud Platform and K8s. I have launched Kubernetes cluster in GCP and chosen europe-north1 as the region (europe-north1-a as the zone).

When I try to run my application on this cluster it fails because it expects the application to run in EU region. I added IP and Geo check (using GeoLite database (https://dev.maxmind.com/geoip/legacy/geolite/) and AWS IP check tool (http://checkip.amazonaws.com/)) into my application and they tell me that the host is located in US.

Have I perhaps missed some GCP/K8s configuration option or is this because the europe-north1 region is still quite new and the IP addresses do not correctly show that they are located in EU? In which case I should direct this question to Google?

1 Answers1

2

It's good to be circumspect, but for the most part, you can trust that the big cloud providers like GCP, Azure, etc, are putting their instances where they tell you they are.

Geo-IP matching services aren't perfect. As best as I can tell, the issue here is just that the Geo-IP matching services you're using can't really know the location of Google's dynamic IP addresses as they're being reassigned.

These services use a combination of various methods to provide the geo-ip match, sometimes they grab addresses from whois records, sometimes they're using latency to triangulate general locations. This for the most part works to give you a general idea of the location, but in the case of GCP's pool of dynamic addresses, that are being frequently reassigned to new vms in new locations, they just can't keep up.

I tried to broadly recreate what you ran into with vms instead of a Kubernetes cluster. I launched an instance in both Europe and in the US. Doing a geo-ip match, both of the instances showed as being in the US, but when I pinged both addresses (I pinged from the United States), the latency definitely supported the vms being where they are supposed to be.

Ping

user9975441
  • 195
  • 9
  • Thank you for your thorough answer. This is still quite unfortumate and prevents us from using GCP. We have previously used AWS ECS (not kubernetes) and have not had this kind of problems. Unfortunately the 3rd party service our app tries to connect forbids logins from US. – Umeetiusbaarus Jun 27 '18 at 15:04
  • @teemu-hiltunen No problem, seems like you're not the only one that has run into this problem: https://groups.google.com/forum/#!topic/gce-discussion/n-xls5ioVJg Please accept the answer if you're satisfied! In terms of alternatives, out of curiosity I tested launching an Azure VM in Europe and the IP came up in Ireland on a Geo IP check so AKS might be an option for you. – user9975441 Jun 27 '18 at 15:45
  • Thank you, you have been most helpful in this case! I will look into Azure next even though they do not have datacenter here in Finland - which was the main reason to try out GCP in the first place. – Umeetiusbaarus Jun 28 '18 at 05:56