liveBook · Manning

Passthrough

As explained in Kubernetes in Action, Second Edition

TLS passthrough is a traffic-handling technique in which an ingress component forwards encrypted TLS connections to a backend instead of terminating TLS itself.

TLS passthrough forwards an encrypted TLS connection through an ingress component or gateway to a backend, which terminates TLS. The gateway does not decrypt HTTP requests; it can identify the destination hostname from TLS SNI. section 13.4 section 13.4.2

Passthrough changes what the gateway can do and which routing resources are required:

  • Preserves encryption from the client to the backend; unencrypted HTTP need not cross the network. section 13.4.2
  • Limits gateway knowledge to the TLS destination hostname, so HTTPRoutes cannot inspect or route the encrypted HTTP traffic. section 13.4 section 13.4.2
  • Requires a TLSRoute for backend routing when configured through the Gateway API. section 13.4.2

With the Gateway API, configure a port-443 listener with protocol TLS and tls.mode set to Passthrough, then attach a TLSRoute that names the hostname and backend service. The backend service listens on TLS, while the gateway forwards the connection without terminating it. section 13.4.2

Gateway API configuration

A listener uses protocol TLS on port 443 with tls.mode: Passthrough. A TLSRoute then references the gateway, matches kiada.example.com, and forwards traffic to the kiada-stable Service on port 443. Without the TLSRoute, the gateway accepts no usable backend route and the connection is refused.

Listing 12.7 Enabling SSL passthrough when using the Nginx ingress controller
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: kiada-ssl-passthrough
  annotations:
    nginx.ingress.kubernetes.io/ssl-passthrough: "true"     #1
spec:
  ...

Ingress controllers may expose passthrough through controller-specific configuration rather than a standard Ingress field. Nginx requires the ssl-passthrough annotation and must be started with --enable-ssl-passthrough. section 12.3.1

How Kubernetes in Action, Second Edition covers it

How deep it goes
Explains gateway visibility, listener configuration, TLSRoutes, and controller-specific Ingress setup without detailing controller internals.
Examples
Uses Nginx annotations, a Passthrough Gateway listener, a TLSRoute, and curl results showing an unrouted connection refused.
What it assumes
Assumes familiarity with encrypted TLS connections, backend services, Ingress, and Gateway API routing resources.
What you can do after
Configure it via a Gateway listener and TLSRoute, or enable it through controller-specific Ingress settings.
How it connects
Connects TLS termination, Ingress, Gateway API, SNI, TLSRoute, and HTTPRoute.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Kubernetes in Action, Second Edition. The section links point to the parts of the book it draws on.