Enabling PROXY Protocol between Vultr Load Balancer and NGINX Ingress Controller to preserve client connection information
PROXY Protocol preserves a client’s connection information (such as IP address) when traffic passes through a PROXY. When a Vultr Load Balancer sits in front of an NGINX Ingress Controller, enabling PROXY protocol ensures the controller sees the client’s original IP and protocol, which is necessary for accurate logging, rate-limiting, and any IP-dependent application logic.
To enable the PROXY protocol in Vultr Kubernetes Engine, follow these steps:
Identify the ConfigMap used by your NGINX Ingress Controller. If deployed via Helm, you can list ConfigMaps in all namespaces to locate it:
Edit the ConfigMap to enable PROXY protocol and forwarded headers:
Update the Ingress Controller’s ConfigMap to include use-PROXY-protocol: 'true', use-forwarded-headers: 'true', and compute-full-forwarded-for: 'true' under the data section so that NGINX correctly interprets the PROXY protocol headers.
Next, edit the Service of type LoadBalancer that exposes the NGINX Ingress Controller. Use the namespace and service-name where your controller is deployed:
In the Service manifest, add the annotation service.beta.kubernetes.io/vultr-loadbalancer-PROXY-protocol: 'true' and set externalTrafficPolicy: Local to ensure the client IP is preserved.
If you are editing live resources with kubectl edit, changes take effect immediately. If you are modifying local manifest files, apply them with:
After applying, the Ingress Controller will see the original client IP and protocol, allowing applications to handle traffic based on the real client connection.
If you are using Cert-Manager for TLS certificates, prefer the DNS01 challenge to avoid conflicts with PROXY protocol handling.
0 Comments
Be the first to comment and share your perspective with the community.