I'm running multiple microservices into Kubernetes and I need to know the client real IP that sent the request to our gateway microservice to show that in UI dashboard. I use Flannel as my overlay network inside my cluster.
Asked
Active
Viewed 126 times
1 Answers
1
See the article "Create an External Load Balancer" and especially the section Preserving the client source IP.
You need at least version 1.7, and set to "externalTrafficPolicy": "Local"
on your Service spec.
harrymc
- 480,290
-
Tnx it works for me. Ref: https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip – Amir Soleimani Borujerdi Feb 06 '20 at 07:55