Ingress + TLS Termination

Create TLS Secret

1
kubectl create secret tls foo-secret --key /tmp/tls.key --cert /tmp/tls.crt
Copied!

Create Ingress Resource

ingress.yaml
1
apiVersion: extensions/v1beta1
2
kind: Ingress
3
metadata:
4
name: $HOST
5
annotations:
6
kubernetes.io/ingress.class: "nginx"
7
spec:
8
tls:
9
- hosts:
10
- $HOST
11
secretName: tls-$HOST
12
rules:
13
- host: $HOST
14
http:
15
paths:
16
- path: /
17
backend:
18
serviceName: $SERVICE_NAME
19
servicePort: $SERVICE_PORT
20
Copied!
Last modified 3yr ago