Skip to main content
Version: Next 🚧

Terminate TLS at an external ingress or proxy

This is a How-to for operators.

Introduction​

By default Epinio manages TLS itself. It creates a cert-manager Certificate for its own hosts and for every application route, and each Ingress references the resulting secret in its tls: block.

Some clusters already terminate TLS somewhere else, for example a Traefik instance that serves a trusted wildcard *.<domain> certificate as its default. In that setup the Epinio-managed certificates get in the way: the ingress controller serves them instead of the trusted wildcard.

Setting ingress.tls.enabled to false hands TLS to the external edge.

Disable Epinio-managed TLS​

Set the value when installing or upgrading Epinio:

helm upgrade --install epinio epinio/epinio \
--namespace epinio \
--set global.domain=<your-domain> \
--set ingress.tls.enabled=false

Or in a values file:

ingress:
tls:
enabled: false

The default is true, which keeps today's behavior.

What changes​

The Ingress resources are still created and routing is unchanged. Only the TLS parts are left out.

Resourceingress.tls.enabled: true (default)ingress.tls.enabled: false
Epinio API, UI and Dex Ingresstls: block with an Epinio-managed secretNo tls: block, no cert-manager issuer annotation
Application route CertificateCreated for each routeNot created
Application route Ingresstls: block with the route's secretNo tls: block
Gateway API application chartHTTPS listener when httpsRedirect is setHTTP listener only, httpsRedirect is ignored
Routing secretsUsed for matching routesNot used

Without a tls: block the ingress controller presents its own default certificate. The Traefik annotations router.entrypoints: websecure and router.tls: "true" stay in place, so Traefik still serves those hosts over HTTPS with its default certificate.

The internal certificates are unaffected. The registry and Dex certificates are still issued from the epinio-ca PKI, so components that mount them, such as epinio-server, keep working.

note

Application routes follow this setting from Epinio 1.14.4, with the application charts epinio-application 0.1.27, epinio-application-gateway-api 0.1.27 and epinio-application-stateful 0.1.25. Earlier versions apply the setting to Epinio's own hosts only.

Existing applications​

Changing the value doesn't touch applications that are already running. Each application picks up the change the next time it's deployed, for example with epinio push.

When that deployment also moves the application to a newer chart version, the pods restart, because the chart version is part of their labels.

Turning TLS off removes the route Certificate resources on the next deployment. cert-manager doesn't delete the secrets those certificates created, so you can remove them by hand once nothing references them.

Custom application charts​

Epinio passes the setting to application charts as epinio.tls. A custom application chart has to read it to skip its own Certificate and tls: block. A chart that ignores epinio.tls keeps creating certificates. Treat a missing value as true, the way the built-in charts do:

{{- if ne $.Values.epinio.tls false }}
tls:
...
{{- end }}

Check the result​

After pushing an application, confirm that no Certificate exists for it and that its Ingress has no tls: block:

kubectl get certificates --namespace <workspace>
kubectl get ingress --namespace <workspace> \
--output jsonpath='{range .items[*]}{.metadata.name}{" tls="}{.spec.tls}{"\n"}{end}'

Then open the application URL in a browser and check that the certificate presented is the edge's.

See also​