I deployed the echo service and configured a route accordingly. However, the ip address is still not the external one.
x-forwarded-for=10.42.0.1
x-real-ip=10.42.0.1
Also the variable “kong.client.get_forwarded_ip()” is 10.42.0.1 in the serverless function context.
What did I miss here? I haven’t found more information on that topic. Any help is appreciated, as knowing the ip is crutial for the application due to geolocation features (currencies, etc.).
I don’t have (yet) a loadbalancer in front of the k3s installation and I’m aware that that’s not the purpose of distributed systems. So in my case, client requests hit port 80/443 of k3s with kong for the time being.
As traefik is disabled I assumed kong would have the information of the client request.
I haven’t found more information about this topic so far: Design
In that case, you need to figure out how is traffic being routed to the Kong pod running inside the k3s cluster and then see how to preserve the IP address.
ExternalTrafficPolicy setting on Service might help in this case.