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
• 7,320 points
1,412 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,890 points

Related Questions In Kubernetes

0 votes
2 answers

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

if u want to directly want to ...READ MORE

answered Jul 26, 2020 in Kubernetes by Akash Gupta
479 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
• 52,310 points
861 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
• 52,310 points
200 views
+1 vote
1 answer
0 votes
3 answers

Error while joining cluster with node

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

answered Jan 17, 2019 in Others by anonymous
10,346 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,890 points
988 views
0 votes
1 answer