- name: proxy
- name: proxy-ssl
- name: kong-admin
- name: kong-admin-ssl
No matter which client I access from, in the end my client IP is the IP of the ingress, not the real IP. The picture is my visit from my local machine, but the ip is not 127.0.0.1
How do I get the real ip
Here is a guide that should help you out:
This file has been truncated.
# Preserving Client IP Address
Kong is usually deployed behind a Load Balancer (using a
Kubernetes Service of type `LoadBalancer`). This can result
in loss of actual Client IP address and Kong observing the IP address
of the Load Balancer as the client IP address. This guide lays
out different methods of solving this problem.
Preserving the Client IP address in cloud behind Load-Balancers requires
configuration that is be specific to your use-case, cloud provider
and other architecture details.
provides details on how networking works inside Kubernetes and explains
in detail of how various methods describe later in this document work.
It is recommended that you give this a read.
Following methods are possible to preserve Client IP address:
## ExternalTrafficPolicy: Local
Thank you very much, but my cluster is local, the NodePort type used by kong-proxy, env I also have configured KONG_TRUSTED_IPS, KONG_PROXY_LISTEN, KONG_REAL_IP_HEADER, but that has no effect, it is worth noting that I have tried to use nginx outside the cluster to forward the request Give kong, and configure these in nginx in this way, so that I can get the real IP, the following is the nginx configuration
I am using docker desktop for windows to build a kubernetes cluster, does it have anything to do with this