Skip to content

Instantly share code, notes, and snippets.

@danehans
Created February 1, 2018 17:57
Show Gist options
  • Save danehans/e89058d058eb6e3781f8077101c8de02 to your computer and use it in GitHub Desktop.
Save danehans/e89058d058eb6e3781f8077101c8de02 to your computer and use it in GitHub Desktop.
istio sni ingress example
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: secure-gateway
annotations:
kubernetes.io/ingress.class: "istio"
spec:
tls:
# TLS configuration. Currently the Ingress only supports a single TLS port, 443.
# If multiple members of this list specify different hosts, they will be multiplexed
# on the same port according to the hostname specified through the SNI TLS extension,
# if the ingress controller fulfilling the ingress supports SNI.
#- hosts:
# Hosts are a list of hosts included in the TLS certificate. The values in this list
# must match the name/s used in the tlsSecret. Defaults to the wildcard host setting
# for the loadbalancer controller fulfilling this Ingress, if left unspecified.
#- productpage.default.svc.cluster.local
#- httpbin.default.svc.cluster.local
- secretName:
#secretName: istio-ingress-certs
# SecretName is the name of the secret used to terminate SSL traffic on 443.
# Field is left optional to allow SSL routing based on SNI hostname alone.
# If the SNI host in a listener conflicts with the "Host" header field used by an IngressRule,
# the SNI host is used for termination and value of the Host header is used for routing.
#- hosts:
#- httpbin.default.svc.cluster.local
#secretName: httpbin-cert
rules:
- http:
paths:
- path: /productpage
backend:
serviceName: productpage
servicePort: 9080
- path: /login
backend:
serviceName: productpage
servicePort: 9080
- path: /logout
backend:
serviceName: productpage
servicePort: 9080
- path: /api/v1/products.*
backend:
serviceName: productpage
servicePort: 9080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment