How do I get client IP addressed from HTTP requests in kubernetes services?

0 votes

I'm running my web app as pod behind an nginx reverse proxy for ssl. Both of them use kubernetes service for load balancing(Like shown here). My problem is that all of the HTTP request logs show the cluster IP address instead of the IPs of the HTTP clients. Is there any other way I can make kubernetes service to pass this info to my app servers?

Sep 11, 2018 in Kubernetes by shubham
• 6,890 points
254 views

1 answer to this question.

0 votes

Kube-proxy can get out of the loop in one of two ways:

  1. Use ingress to configure your nginx to load balance based on the source IP address and then you cna send traffic to your endpoint(https://github.com/kubernetes/contrib/tree/master/ingress/controllers#ingress-controllers)
  2. OR you can use the haproxy loadbalancer and set the balance annotation of your service so that it uses "source"(https://github.com/kubernetes/contrib/blob/master/service-loadbalancer/service_loadbalancer.go#L51)
answered Sep 11, 2018 by DareDev
• 6,810 points

Related Questions In Kubernetes

0 votes
1 answer
0 votes
1 answer

How can I access a service installed on Kubernetes from anywhere?

I have followed the link which you have ...READ MORE

answered Jul 23, 2018 in Kubernetes by Atul
• 10,240 points
141 views
0 votes
1 answer

How do I create a service account for my dashboard and get all the credentails

Run the following commands: This command will create ...READ MORE

answered Oct 8, 2018 in Kubernetes by Kalgi
• 41,660 points
277 views
0 votes
1 answer

How do I run kubernetes on AWS

There are two main ways to use ...READ MORE

answered Oct 26, 2018 in Kubernetes by Kalgi
• 41,660 points
60 views
0 votes
1 answer
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17 in Others by anonymous
2,592 views
0 votes
1 answer
0 votes
1 answer

How do I sign-in to kubernetes dashboard?

Since version 1.7 Dashboard uses more secure ...READ MORE

answered Sep 7, 2018 in Kubernetes by DareDev
• 6,810 points
154 views
0 votes
1 answer