ingress-nginx-helm/controllers/nginx/examples/proxy-protocol
Manuel de Brito Fontes 0b031b9894 Update examples
2016-06-02 17:39:12 -04:00
..
nginx-configmap.yaml Add docs/examples for proxy_protocol 2016-05-06 09:27:30 +01:00
nginx-rc.yaml Update examples 2016-06-02 17:39:12 -04:00
nginx-svc.yaml Add docs/examples for proxy_protocol 2016-05-06 09:27:30 +01:00
README.md Add docs/examples for proxy_protocol 2016-05-06 09:27:30 +01:00

Nginx ingress controller using Proxy Protocol

For using the Proxy Protocol in a load balancing solution, both the load balancer and its backend need to enable Proxy Protocol.

To enable it for NGINX you have to setup a configmap option.

HAProxy

This HAProxy snippet would forward HTTP(S) traffic to a two worker kubernetes cluster, with NGINX running on the node ports, like defined in this example's service.

listen kube-nginx-http
        bind :::80 v6only
        bind 0.0.0.0:80
        mode tcp
        option tcplog
        balance leastconn
        server node1 <node-ip1>:32080 check-send-proxy inter 10s send-proxy
        server node2 <node-ip2>:32080 check-send-proxy inter 10s send-proxy

listen kube-nginx-https
        bind :::443 v6only
        bind 0.0.0.0:443
        mode tcp
        option tcplog
        balance leastconn
        server node1 <node-ip1>:32443 check-send-proxy inter 10s send-proxy
        server node2 <node-ip2>:32443 check-send-proxy inter 10s send-proxy

ELBs in AWS

See this documentation how to enable Proxy Protocol in ELBs