Skip to content

Instantly share code, notes, and snippets.

@kasunbg
Last active June 28, 2019 14:10
Show Gist options
  • Save kasunbg/60a4508fc5df8f19dcd03cc59c39f33f to your computer and use it in GitHub Desktop.
Save kasunbg/60a4508fc5df8f19dcd03cc59c39f33f to your computer and use it in GitHub Desktop.
Ingress kubernetes resource to expose your HTTPS application
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: my-app-ingress
namespace: YOUR-OPTIONAL-NAMESPACE
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS" # the annotation that made this all possible
spec:
tls:
- hosts:
- my-app.example.com # YOUR DOMAIN HERE
secretName: my-custom-tls-cert
rules:
- host: my-app.example.com # AGAIN, YOUR DOMAIN HERE
http:
paths:
- backend:
serviceName: S1 # the service name
servicePort: 9443 # the HTTPS port
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment