I am running a Ruby on Rails app (using Passenger in Nginx mode) on Google Container Engine. These pods are sitting behind a GCE network load balancer. My question is how to access the external client IP from inside the Rails app.
The Github issue here seems to present a solution, but I ran the suggested:
for node in $(kubectl get nodes -o name | cut -f2 -d/); do kubectl annotate node $node \ net.beta.kubernetes.io/proxy-mode=iptables; gcloud compute ssh --zone=us-central1-b $node \ --command="sudo /etc/init.d/kube-proxy restart"; done but I am still getting a REMOTE_ADDR header of 10.140.0.1.
On ideas on how I could get access to the real client IP (for geolocation purposes)?
0 comments:
Post a Comment