Skip to content

Instantly share code, notes, and snippets.

@danehans
Last active December 20, 2017 18:49
Show Gist options
  • Save danehans/f39c7bf23436d2177bf1ae089b0862a0 to your computer and use it in GitHub Desktop.
Save danehans/f39c7bf23436d2177bf1ae089b0862a0 to your computer and use it in GitHub Desktop.
istio tls ingress
  1. Generate TLS assets (openssl):
$ openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /tmp/tls.key -out /tmp/tls.crt -subj "/CN=foo.bar.com"
  1. Create a secret object that uses the TLS assets. Note: The name must be istio-ingress-certs:
$ kubectl create -n istio-system secret tls istio-ingress-certs --key /tmp/tls.key --cert /tmp/tls.crt
  1. Add thw following for the tls: field of the Ingress object spec:
secretName: istio-ingress-certs # currently ignored
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: secure-ingress
annotations:
kubernetes.io/ingress.class: istio
spec:
tls:
- secretName: istio-ingress-certs # currently ignored
rules:
- http:
paths:
- path: /status/.*
backend:
serviceName: httpbin
servicePort: 8000
- path: /delay/.*
backend:
serviceName: httpbin
servicePort: 8000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment