TLS termination
This example demonstrates how to terminate TLS through the nginx Ingress controller.
Prerequisites
You need a TLS cert and a test HTTP service for this example.
Deployment
Create a values.yaml file.
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: nginx-test
spec:
tls:
- hosts:
- foo.bar.com
# This assumes tls-secret exists and the SSL
# certificate contains a CN for foo.bar.com
secretName: tls-secret
rules:
- host: foo.bar.com
http:
paths:
- path: /
backend:
# This assumes http-svc exists and routes to healthy endpoints
serviceName: http-svc
servicePort: 80The following command instructs the controller to terminate traffic using the provided TLS cert, and forward un-encrypted HTTP traffic to the test HTTP service.
Validation
You can confirm that the Ingress works.
Last updated
Was this helpful?