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!