Skip to content

Instantly share code, notes, and snippets.

@eagleusb
Created September 26, 2019 19:00
Show Gist options
  • Save eagleusb/c60b84e197bd3ad48fb445530757f85a to your computer and use it in GitHub Desktop.
Save eagleusb/c60b84e197bd3ad48fb445530757f85a to your computer and use it in GitHub Desktop.
AWS NLB Service
---
kind: Service
apiVersion: v1
metadata:
name: ingress-nginx
namespace: ingress-nginx
labels:
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
annotations:
# by default the type is elb (classic load balancer).
service.beta.kubernetes.io/aws-load-balancer-type: nlb
spec:
# this setting is to make sure the source IP address is preserved.
externalTrafficPolicy: Local
type: LoadBalancer
selector:
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
ports:
- name: http
port: 80
targetPort: http
- name: https
port: 443
targetPort: https
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment