liveBook · Manning

TLS termination

As explained in Kubernetes for Developers

TLS termination is the process of ending a TLS connection at an intermediary that handles encryption and certificate processing before forwarding the request.

TLS termination ends a client’s HTTPS connection at an intermediary, usually an Ingress load balancer. The intermediary handles certificates and TLS processing, then forwards the request to an internal Service instead of making the application server manage the client-facing TLS connection. section 7.0 section 7.2.1

An Ingress can handle the connection in three ways:

  • Terminate TLS and forward traffic to the backend over HTTP, typically across a secured cloud or cluster network. This can reduce application configuration and CPU overhead. section 7.2.1 section 7.3
  • Terminate TLS and re-encrypt traffic before connecting to the backend over HTTPS. section 7.2.1
  • Pass encrypted traffic through unchanged only with a Service of type LoadBalancer; Ingress does not provide TLS passthrough. section 7.2.1 section 7.2

Configure TLS termination with Kubernetes

Create or obtain a private key and certificate, store them as a Kubernetes Secret with `kubectl create secret tls`, and reference that Secret from the Ingress `tls.secretName` field. The Ingress can then terminate HTTPS while routing requests by hostname or path to internal Services. A self-signed certificate provides encryption for testing but does not provide identity verification. section 7.2.1

Figure 7.5 The Ingress terminates HTTPS (TLS) traffic and can forward it to the serving Pods over plain HTTP or HTTPS connections.
07-05

Shows the client-to-Ingress HTTPS connection and the Ingress-to-Pod HTTP or HTTPS alternatives. section 7.2.1

How Kubernetes for Developers covers it

How deep it goes
Explains termination, re-encryption, passthrough limits, Secrets, and Ingress configuration, but stops short of certificate-authority procedures.
Examples
Uses OpenSSL commands, a Kubernetes TLS Secret, an Ingress manifest, and an example.com HTTPS endpoint.
What it assumes
Assumes basic Kubernetes Services and Ingress concepts while explaining certificate files and Kubernetes Secrets.
What you can do after
Configure TLS termination with Kubernetes Ingress, a TLS Secret, and certificate and key files.
How it connects
Connects TLS termination with Ingress, HTTPS, Kubernetes Secrets, Services, LoadBalancer Services, and path-based routing.

Also explained in

Compare how 4 books explain TLS termination →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Kubernetes for Developers. The section links point to the parts of the book it draws on.