Skip to content

Instantly share code, notes, and snippets.

@jmrobles
Last active December 17, 2021 10:42
Show Gist options
  • Save jmrobles/909f8c3aa2f6614d58e81a81579d510d to your computer and use it in GitHub Desktop.
Save jmrobles/909f8c3aa2f6614d58e81a81579d510d to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: Service
metadata:
annotations:
load-balancer.hetzner.cloud/health-check-port: "<YOUR-INGRESS-HEALTH-PORT: i.e 31902>"
load-balancer.hetzner.cloud/name: "<YOUR-LB-NAME>"
spec:
clusterIP: <Internal-IP>
externalTrafficPolicy: Local
healthCheckNodePort: 30787
ports:
- name: http
nodePort: 31902
port: 80
protocol: TCP
targetPort: http
- name: https
nodePort: 30193
port: 443
protocol: TCP
targetPort: https
selector:
app.kubernetes.io/component: controller
app.kubernetes.io/instance: ingress-nginx
app.kubernetes.io/name: ingress-nginx
sessionAffinity: None
type: LoadBalancer
@jmrobles
Copy link
Author

I'm sorry guys, updated with the "full" version (minimum required for the service).

@yoplait
Copy link

yoplait commented Dec 17, 2021

Thanks for that!

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