Enable the PROXY protocol
What the PROXY protocol does
A load balancer in front of the cluster sends each request to an ingress controller. The ingress controller then sees the address of the load balancer, not the address of the client. The PROXY protocol adds the client address to the connection, so that the ingress controller and your applications can see it.
The load balancer and the ingress controller must use the same setting. If only one of them uses the PROXY protocol, the requests fail.
With the EKSCluster provider, SD enables the PROXY protocol on the AWS load balancers and in the NGINX and HAProxy ingress controllers. You do not have to do the steps on this page.
Enable the PROXY protocol in the ingress controller
SD has no configuration field for the PROXY protocol. Add it to the configuration of the ingress controller with a custom patch.
-
Enable the PROXY protocol on your load balancer. See the documentation of your load balancer.
-
Create a patch file for the ConfigMap of your ingress controller. The name of the ConfigMap changes with the type of the controller:
singlehas one ConfigMap,dualhas one for the internal and one for the external controller. Fordual, create one patch file for each ConfigMap.- HAProxy
- NGINX
The
proxy-protocolkey accepts the PROXY protocol only from the addresses in the list. Write the addresses of your load balancers. See the HAProxy documentation.proxy-protocol-patch.yamlapiVersion: v1kind: ConfigMapmetadata:name: haproxy-ingress # dual: haproxy-ingress-internal and haproxy-ingress-externalnamespace: ingress-haproxydata:proxy-protocol: "10.0.0.10, 10.0.0.11" # the addresses of your load balancersSee the NGINX Ingress documentation. The Ingress NGINX Controller project is retired: see Migrate from NGINX to HAProxy.
proxy-protocol-patch.yamlapiVersion: v1kind: ConfigMapmetadata:name: ingress-nginx-controller # dual: ingress-nginx-controller-internal and ingress-nginx-controller-externalnamespace: ingress-nginxdata:use-proxy-protocol: "true" -
Add the patch files to the
customPatchessection of yourfuryctl.yaml:furyctl.yamlspec:distribution:customPatches:patchesStrategicMerge:- ./proxy-protocol-patch.yaml -
Apply the configuration:
furyctl apply
The ingress controller now accepts the PROXY protocol from the load balancer, and gets the address of each client.