Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

help request: Difficulty Configuring APISIX for Obtaining Client IP Behind Load Balancer in OVH Kubernetes Cluster #11138 #748

Open
adussarps opened this issue Apr 10, 2024 · 1 comment

Comments

@adussarps
Copy link

Description

Issue Description:
I'm currently trying to configure APISIX within an OVH Kubernetes cluster to obtain the client's real IP address behind the load balancer, similar to the setup described in the OVH documentation (link).

The OVH documentation suggests using the Proxy Protocol at the TCP layer to add the client's IP to the incoming request. However, despite attempting to replicate this setup in APISIX, I haven't been successful.

Steps Taken:

I've reviewed the OVH documentation and tried to adapt the configuration for APISIX.
I've attempted to enable the Proxy Protocol in the APISIX configuration by uncommenting the relevant section in the config.yaml file and adjusting the settings.

  # proxy_protocol:                    # PROXY Protocol configuration
  #   listen_http_port: 9181           # APISIX listening port for HTTP traffic with PROXY protocol.
  #   listen_https_port: 9182          # APISIX listening port for HTTPS traffic with PROXY protocol.
  #   enable_tcp_pp: true              # Enable the PROXY protocol when stream_proxy.tcp is set.
  #   enable_tcp_pp_to_upstream: true  # Enable the PROXY protocol.

I've restarted APISIX pods after making the configuration changes.

Current Behavior:
Despite enabling the Proxy Protocol in the APISIX configuration, the client's real IP address is not being correctly passed through to the application.

Additional Information:

Kubernetes Cluster Provider: OVH
Apisix was setup using the helm chart.

I would appreciate any guidance or assistance on properly configuring APISIX to obtain the client's real IP address behind the load balancer in an OVH Kubernetes cluster using the Proxy Protocol.

Thank you for your help!

Environment

  • APISIX version (run apisix version): 3.8.0
  • Operating system (run uname -a): 5.15.0-101-generic feat: Optimize configuration items, add etcd.prefix and schema #111-Ubuntu SMP Tue Mar 5 20:16:58 UTC 2024 x86_64 GNU/Linux
  • OpenResty / Nginx version (run openresty -V or nginx -V): openresty/1.21.4.2
  • etcd version, if relevant (run curl http://127.0.0.1:9090/v1/server_info): 3.5.0
  • APISIX Dashboard version, if relevant: 3.0.0
  • Plugin runner version, for issues related to plugin runners:
  • LuaRocks version, for installation issues (run luarocks --version):
@adussarps
Copy link
Author

I finally managed to successfully configure Apisix behind the load balancer. Here is a post with the answer to my question.

https://stackoverflow.com/questions/78294247/apisix-real-ip-behind-an-ovh-loadbalancer-kubernetes/78310956#78310956

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant