1

I'm right now using GKE with kubernetes and an nginx container to proxy different services. My goal is to block some countries. I'm used to do that with nginx and it's useful geoip module, but as of now, kubernetes doesn't forward the real customer ip to the containers, so I can't use it.

What would be the simplest/cheapest solution to filter out countries until kubernetes actually forward the real IP?

  • External service?
  • Simple google server with only nginx, filtering countries, forwarding to kubernetes (not great in terms of price and reliability)?
  • Modify the kube-proxy (as I've seen here and there, but it seems a bit odd)?
  • Frontend geoip filtering (hmm, worse idea by far)
  • ?

thank you!

1 Answer 1

2

This answer says you can use a Google Cloud Platform load balancer via an Ingress object, and then find the client's IP address in the X-Forwarded-For header.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .