Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
42 lines (34 sloc) 725 Bytes
description
Terminate SSL via an ingress resource with the certificates from a secret.

Ingress + TLS Termination

Create TLS Secret

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

Create Ingress Resource

{% code-tabs %} {% code-tabs-item title="ingress.yaml" %}

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: $HOST
  annotations:
    kubernetes.io/ingress.class: "nginx"   
spec:
  tls:
  - hosts:
    - $HOST
    secretName: tls-$HOST
  rules:
  - host: $HOST
    http:
      paths:
      - path: /
        backend:
          serviceName: $SERVICE_NAME
          servicePort: $SERVICE_PORT

{% endcode-tabs-item %} {% endcode-tabs %}

You can’t perform that action at this time.