Repository navigation
Description
What would you like to be added:
As a cluster admin, I want my Gateway to support, on a single port, different types of routes. As an example, I want the following to be possible:
listeners:
- name: somelistener
port: 443
protocol: TLS
hostname: "*.example.tld"
tls:
mode: Passthrough
- name: httpslistener
port: 443
protocol: HTTPS
hostname: "*.anotherexample.tld"
tls:
mode: Terminate
certificateRefs: ...With the specification above, any request to hostnames on *.example.tld should be attached to TLSRoutes while requests to *.anotherexample.tld are terminated on the Gateway and attached to a HTTPRoute.
The support for Multiplexing on TLS is to be decided between Extended or ImplementationSpecific, and implementations that support this feature MUST announce it on GatewayClass.Status.SupportedFeatures.
Implementations that don't support multiplexing SHOULD mark the violating listeners with a Condition Conflicted=True.
This means that, based on the hostname attribute from a Gateway, I want to select TLSRoute or HTTPRoute and do the proper routing.
Why this is needed:
Supporting Passthrough and non passthrough on the same port is desired. While we can do this with mixed Termination/Passthrough on the listener tls mode, this still disallows us of setting specific rules, filters and matchers on a HTTPRoute as the routing is restricted to TLSRoute, that doesn't have many attributes.
With multiplexing, I can rely on a single gateway for my network, lowering my costs and my management toil while allowing my users to specify the behavior they want.
=====
Some previous art removed from the original TLSRoute GEP:
Requested flow
In the case of TLSRoute + HTTPs multiplexing, it should operate similarly to the mixed TLSRoute, but instead of decrypting and passing the TCP connection as is to the backend, the proper HTTPRoute workflow should happen.
Conflict management
- When a Gateway supports Multiplexing it CAN allow multiple listeners on the same port, as soon as they do not conflict on
hostnamesandtls.mode. - When a Gateway does not support Multiplexing and contains a listener with
protocol=TLS, the Gateway MUST NOT allow any other kind of listener on the same port, and any violating Listener should have a ConditionOverlappingTLSConfig=Truewith the reasonOverlappingProtocols.
Conformance tests
| A Gateway containing a Listener of type TLS/Passthrough and a Listener of type HTTPS/Terminate should be accepted, and should multiplex the requests to TLSRoute and HTTPRoute correctly | Being able to do a request to a HTTP route being terminated on gateway (eg.: terminated.example.tld/xpto) and to a TLS Passthrough route on the same gateway, but different host (passthrough.example.tld) | |
Activity
rikatz commentedon Nov 25, 2025
/kind gep
k8s-triage-robot commentedon Feb 23, 2026
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/staleis appliedlifecycle/stalewas applied,lifecycle/rottenis appliedlifecycle/rottenwas applied, the issue is closedYou can:
/remove-lifecycle stale/closePlease send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
rikatz commentedon Feb 23, 2026
/lifecycle active
k8s-triage-robot commentedon May 24, 2026
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/staleis appliedlifecycle/stalewas applied,lifecycle/rottenis appliedlifecycle/rottenwas applied, the issue is closedYou can:
/remove-lifecycle stale/closePlease send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
youngnick commentedon Jun 11, 2026
/lifecycle active
This one needs to be clarified still.
mikemorris commentedon Jun 12, 2026
Refs #4598, we've made a bit of progress toward clarifying what may be permissible here for multiplexing other route types.
/cc @howardjohn
Femure commentedon Sep 10, 2026
Hi, I'm hoping to see this land at some point. Is there any update, a GEP draft, a PR, or is someone actively working on it?
Since Gateway and ListenerSet listeners are already merged and validated as a single list, I'm assuming multiplexing would apply the same way across both. Just wanted to confirm that's the plan.
youngnick commentedon Sep 14, 2026
This is the extent of the current work on this issue.
But yes, if we did define behaviors for this, they would have to apply across both Gateway and ListenerSet listeners.
lexfrei commentedon Sep 21, 2026
A suite limitation came up in the conformance discussion on #5273, and it lands on whatever this issue settles.
The suite cannot express a test that runs only when a feature is not claimed.
SupportedFeatures.HasAllis the only gate, so a test declaring a feature runs for implementations that have it and is skipped for everyone else, never the other way round.If the outcome here is that an implementation may refuse this pair, conformance can pin what a supporting implementation does and nothing can pin what a refusing one reports. The two existing mixed-termination tests work around it with an early
returnin the test body, which the runner records as a pass rather than a skip.youngnick commentedon Sep 22, 2026
We already have a test that does check this: the tests for
TLSRouteTerminationhave required behavior when the feature is supported, and required behavior when it is not. That's the only other case like this at the moment though. (I know because CIlium does not currently support it, so we had to pass the unsupported tests).I agree that we should handle this better; we should define what the behavior is when supported, and ensure that when it is not supported, the implementation rejects the config. This should be done with conformance tests that work the same as the existing
TLSRouteTerminationtests.lexfrei commentedon Oct 8, 2026
I'd like this to also cover overlapping hostnames: a wildcard HTTPS listener
*.example.comnext to a passthrough listener forapi.example.com, both on 443. The example in the description only has two wildcards that don't overlap.In Cozystack each tenant gets one Gateway with one address, and its apps are served under a wildcard certificate. The Kubernetes API, the KubeVirt export proxy and the CDI upload proxy live under the same domain and have to stay passthrough, since the API authenticates clients by certificate. Today the workarounds are a second load balancer IP per tenant or moving the API to 6443.
The rule I'd want is exact, then wildcard, then catch-all, across both protocols on one port, with equal hostnames still a conflict. Envoy already picks SNI this way. Envoy Gateway and Istio accept this pair today, while Cilium rejects it since 1.19.6 and NGINX Gateway Fabric rejects it too.
For conformance this fits the
TLSRouteTerminationshape you described: required behavior when the feature is supported, and a rejected config when it's not.