Skip to content

Instantly share code, notes, and snippets.

@janeczku
Created April 29, 2019 19:41
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save janeczku/2a091bb5f1909b47985c44f39e4f47fa to your computer and use it in GitHub Desktop.
Nginx ingress with AWS ELB TCP proxy

$ kubectl apply -f aws-elb-service.yaml -n ingress-nginx

$ kubectl apply -f nginx-configmap.yml -n ingress-nginx

apiVersion: v1
kind: Service
metadata:
name: ingress-nginx
namespace: ingress-nginx
annotations:
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: "tcp"
service.beta.kubernetes.io/aws-load-balancer-proxy-protocol: "*"
service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout: "60"
# service.beta.kubernetes.io/aws-load-balancer-internal: 0.0.0.0/0
spec:
type: LoadBalancer
ports:
- port: 80
targetPort: 80
protocol: TCP
name: http
- port: 443
targetPort: 443
protocol: TCP
name: https
selector:
app: ingress-nginx
apiVersion: v1
kind: ConfigMap
metadata:
labels:
app: ingress-nginx
name: nginx-configuration
data:
use-proxy-protocol: "true"
@scudelletti
Copy link

For anyone arriving here and using the helm chart this thread might help.
kubernetes/ingress-nginx#3857

BTW Thanks for posting this gist. :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment