Enable SSL Termination

EnRoute HowTos

SSL Termination

SSL Termination can be configured for EnRoute. SSL secret can be specified in a GatewayHost to perform the termination

Creating a SSL Secret

For SSL Termination, it is first essential to create a SSL TLS certificate

kubectl create secret tls tlssecret --cert=fullchain.pem --key=privkey.pem

Where fullchain.pem is the certificate and privkey.pem is the private key in PEM format

The above command creates a secret that can be used in a GatewayHost

Create a GatewayHost with this secret

apiVersion: enroute.saaras.io/v1
kind: GatewayHost
metadata:
  annotations:
  labels:
    app: productpage
    app.kubernetes.io/managed-by: Helm
  name: productpage-9080-gatewayhost
  namespace: default
spec:
  routes:
  - conditions:
    - prefix: /
    services:
    - name: productpage
      port: 9080
  virtualhost:
    fqdn: 'product.saaraslab.com'
    tls:
      secretName: tlssecret