Skip to content

TLSRoute/HTTPRoute multiplexing #4271

Open

Description

@rikatz

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 hostnames and tls.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 Condition OverlappingTLSConfig=True with the reason OverlappingProtocols.

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

  1. added
    kind/featureCategorizes issue or PR as related to a new feature.
    on Nov 24, 2025
  2. rikatz commented on Nov 25, 2025

    @rikatz
    MemberAuthor

    /kind gep

  3. k8s-triage-robot commented on Feb 23, 2026

    @k8s-triage-robot

    The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

    This bot triages un-triaged issues according to the following rules:

    • After 90d of inactivity, lifecycle/stale is applied
    • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
    • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

    You can:

    • Mark this issue as fresh with /remove-lifecycle stale
    • Close this issue with /close
    • Offer to help out with Issue Triage

    Please send feedback to sig-contributor-experience at kubernetes/community.

    /lifecycle stale

  4. added
    lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.
    on Feb 23, 2026
  5. rikatz commented on Feb 23, 2026

    @rikatz
    MemberAuthor

    /lifecycle active

  6. added
    lifecycle/activeIndicates that an issue or PR is actively being worked on by a contributor.
    and removed
    lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.
    on Feb 23, 2026
  7. k8s-triage-robot commented on May 24, 2026

    @k8s-triage-robot

    The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

    This bot triages un-triaged issues according to the following rules:

    • After 90d of inactivity, lifecycle/stale is applied
    • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
    • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

    You can:

    • Mark this issue as fresh with /remove-lifecycle stale
    • Close this issue with /close
    • Offer to help out with Issue Triage

    Please send feedback to sig-contributor-experience at kubernetes/community.

    /lifecycle stale

  8. added
    lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.
    and removed
    lifecycle/activeIndicates that an issue or PR is actively being worked on by a contributor.
    on May 24, 2026
  9. youngnick commented on Jun 11, 2026

    @youngnick
    Contributor

    /lifecycle active

    This one needs to be clarified still.

  10. added
    lifecycle/activeIndicates that an issue or PR is actively being worked on by a contributor.
    and removed
    lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.
    on Jun 11, 2026
  11. mikemorris commented on Jun 12, 2026

    @mikemorris
    Contributor

    Refs #4598, we've made a bit of progress toward clarifying what may be permissible here for multiplexing other route types.

    /cc @howardjohn

  12. Femure commented on Sep 10, 2026

    @Femure

    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.

  13. youngnick commented on Sep 14, 2026

    @youngnick
    Contributor

    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.

  14. lexfrei commented on Sep 21, 2026

    @lexfrei
    Contributor

    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.HasAll is 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 return in the test body, which the runner records as a pass rather than a skip.

  15. youngnick commented on Sep 22, 2026

    @youngnick
    Contributor

    We already have a test that does check this: the tests for TLSRouteTermination have 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 TLSRouteTermination tests.

  16. lexfrei commented on Oct 8, 2026

    @lexfrei
    Contributor

    I'd like this to also cover overlapping hostnames: a wildcard HTTPS listener *.example.com next to a passthrough listener for api.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 TLSRouteTermination shape you described: required behavior when the feature is supported, and a rejected config when it's not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.kind/gepPRs related to Gateway Enhancement Proposal(GEP)lifecycle/activeIndicates that an issue or PR is actively being worked on by a contributor.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions