When we moved from Ingress to Gateway API, I expected the usual migration pain: new resource kinds, different annotations, a few broken routes. What I didn’t expect was losing something so basic that I hadn’t even thought about it as a feature.

With Ingress, a developer dropped a manifest in their namespace, added cert-manager.io/cluster-issuer: letsencrypt, and walked away. cert-manager saw it, issued a certificate, done. The developer never talked to the platform team.

With Gateway API, that certificate lives on the Gateway object, in the platform namespace, managed by the platform team. Want a cert for paste.k8s.one? Open a ticket, wait for a merge, and hope nobody fat-fingers the shared Gateway config while they’re at it.

I’ve been the platform team fielding those tickets. It’s not fun for anyone.

Three eras of “who owns the certificate”#

In the diagrams below, green is what the application team owns, amber is what the platform team owns and blue is cert-manager; thick lines carry traffic, and dashed lines are control (who allows, issues or creates what).

Ingress: everything in one namespace#

%%{init: {"flowchart": {"nodeSpacing": 30, "rankSpacing": 40, "padding": 10, "wrappingWidth": 260, "subGraphTitleMargin": {"top": 6, "bottom": 10}}}}%% flowchart TB accTitle: With Ingress, the developer owns everything accDescr: The application namespace holds the Ingress for app.example.com, the Service, the app-tls Secret and the Certificate. cert-manager, outside the namespace, watches the Ingress annotation and creates the Certificate, which produces the Secret. The Ingress references the Secret and routes traffic to the Service. subgraph NS["Application namespace"] ING["Ingress
host: app.example.com
tls: app-tls"] SVC["Service"] SEC["Secret: app-tls
(created by cert-manager)"] CERT["Certificate
(created by cert-manager)"] end CM["cert-manager"] CM -.->|watches annotation| ING CM -.->|creates| CERT CERT -.->|produces| SEC ING -->|references| SEC ING ==>|routes to| SVC classDef app fill:#343621,stroke:#a8c373,stroke-width:1.5px,color:#eceae5 classDef cm fill:#2d3128,stroke:#83a598,stroke-width:1.5px,color:#eceae5 class ING,SVC,SEC,CERT app class CM cm style NS fill:#1f1d16,stroke:#a8c373,stroke-width:1.5px,color:#a8c373 linkStyle 0,1,2 stroke:#83a598,stroke-width:1.5px,stroke-dasharray:5 4,color:#83a598 linkStyle 3 stroke:#b8b5ad,stroke-width:1.5px,color:#b8b5ad linkStyle 4 stroke:#a8c373,stroke-width:3.5px,color:#a8c373

Simple: the developer owns everything. But Ingress had real limits: no TCP/UDP, no traffic splitting, no header matching, and every controller extended the API differently with its own annotations.

Gateway API: better architecture, worse self-service#

Gateway API fixed the infrastructure problems with a clean split: the platform team manages the Gateway, developers manage HTTPRoutes. It’s a good model, except that the TLS termination point moved to the Gateway:

%%{init: {"flowchart": {"nodeSpacing": 30, "rankSpacing": 40, "padding": 10, "subGraphTitleMargin": {"top": 6, "bottom": 10}}}}%% flowchart TB accTitle: Gateway API moves TLS to the platform namespace accDescr: The platform namespace holds the Gateway, with an HTTPS listener on port 443 that terminates TLS with the wildcard-cert Secret, also in the platform namespace. The application namespace holds an HTTPRoute for app.example.com, which attaches to the Gateway and routes traffic to the Service. subgraph PLATFORM["Platform namespace"] GW["Gateway
listener: HTTPS :443
tls: wildcard-cert"] SEC["Secret: wildcard-cert"] end subgraph APP["Application namespace"] HR["HTTPRoute
host: app.example.com
parentRef: Gateway"] SVC["Service"] end GW -->|terminates TLS with| SEC HR -->|attaches to| GW HR ==>|routes to| SVC classDef platform fill:#40361d,stroke:#eec35e,stroke-width:1.5px,color:#eceae5 classDef app fill:#343621,stroke:#a8c373,stroke-width:1.5px,color:#eceae5 class GW,SEC platform class HR,SVC app style PLATFORM fill:#231e12,stroke:#eec35e,stroke-width:1.5px,color:#eec35e style APP fill:#1f1d16,stroke:#a8c373,stroke-width:1.5px,color:#a8c373 linkStyle 0,1 stroke:#b8b5ad,stroke-width:1.5px,color:#b8b5ad linkStyle 2 stroke:#a8c373,stroke-width:3.5px,color:#a8c373

The developer can create HTTPRoutes, but can’t bind hostnames, configure TLS or touch certificates. In an org with dozens of teams, the platform team becomes a human certificate vending machine.

ListenerSets: self-service is back#

GEP-1713 introduced ListenerSets, which let developers attach their own listeners to an existing Gateway from their own namespace. The platform team controls who can attach (with allowedListeners on the Gateway), and developers control what they attach.

%%{init: {"flowchart": {"nodeSpacing": 26, "rankSpacing": 36, "padding": 10, "subGraphTitleMargin": {"top": 6, "bottom": 10}}}}%% flowchart TB accTitle: ListenerSets give TLS back to the application teams accDescr: The Gateway, on ports 80 and 443 with allowedListeners set to All, allows a ListenerSet in the Team A namespace and one in the Team B namespace. The Team A ListenerSet for paste.example.com uses the paste-tls Secret and sends traffic to its HTTPRoute and Service. The Team B ListenerSet for api.example.com does the same with the api-tls Secret. cert-manager issues both Secrets. GW["Gateway
:80 + :443
allowedListeners: All"] CM["cert-manager"] subgraph ns1["Team A namespace"] SEC1["Secret
paste-tls"] LS1["ListenerSet
paste.example.com"] HR1["HTTPRoute"] SVC1["Service"] end subgraph ns2["Team B namespace"] SEC2["Secret
api-tls"] LS2["ListenerSet
api.example.com"] HR2["HTTPRoute"] SVC2["Service"] end SEC1 --> LS1 LS1 ==> HR1 HR1 ==> SVC1 SEC2 --> LS2 LS2 ==> HR2 HR2 ==> SVC2 GW -.->|allows| LS1 GW -.->|allows| LS2 CM -.->|issues| SEC1 CM -.->|issues| SEC2 classDef platform fill:#40361d,stroke:#eec35e,stroke-width:1.5px,color:#eceae5 classDef app fill:#343621,stroke:#a8c373,stroke-width:1.5px,color:#eceae5 classDef cm fill:#2d3128,stroke:#83a598,stroke-width:1.5px,color:#eceae5 class GW platform class LS1,SEC1,HR1,SVC1,LS2,SEC2,HR2,SVC2 app class CM cm style ns1 fill:#1f1d16,stroke:#a8c373,stroke-width:1.5px,color:#a8c373 style ns2 fill:#1f1d16,stroke:#a8c373,stroke-width:1.5px,color:#a8c373 linkStyle 0,3 stroke:#b8b5ad,stroke-width:1.5px,color:#b8b5ad linkStyle 1,2,4,5 stroke:#a8c373,stroke-width:3.5px,color:#a8c373 linkStyle 6,7 stroke:#eec35e,stroke-width:1.5px,stroke-dasharray:5 4,color:#eec35e linkStyle 8,9 stroke:#83a598,stroke-width:1.5px,stroke-dasharray:5 4,color:#83a598

Each team’s TLS secrets stay in its own namespace, and a ReferenceGrant on the Gateway doesn’t leak to ListenerSets, or the other way around, which keeps the blast radius small.

Which versions work together#

ListenerSet changed name on its way to GA. The experimental version was XListenerSet under gateway.networking.x-k8s.io/v1alpha1; with Gateway API v1.5 it graduated to ListenerSet under gateway.networking.k8s.io/v1. If you search for issues and find references to XListenerSet, that’s the old experimental API: same concept, different name.

Your gateway controller and cert-manager don’t necessarily speak the same variant:

ComponentXListenerSet (experimental)ListenerSet (GA)
Envoy Gateway v1.7.xYes (opt-in)No
Envoy Gateway v1.8.0+DeprecatedYes
cert-manager v1.20+NoYes (opt-in)

If you’re on Envoy Gateway v1.7.x and cert-manager v1.20, you have a version mismatch: one speaks experimental, the other speaks GA. Save yourself the headache and upgrade Envoy Gateway to v1.8.0+. That’s what I did, and it’s what this guide assumes.

Setting it up: Envoy Gateway, cert-manager and podinfo#

This is the full working stack. I’m using podinfo as the sample app because it’s lightweight and has a health endpoint, and a self-signed ClusterIssuer to keep things simple. Swap it for Let’s Encrypt or any ACME issuer when you’re ready for production.

Same colors as above: blue is the cert-manager namespace, amber is the platform’s, green is the application’s.

%%{init: {"flowchart": {"nodeSpacing": 30, "rankSpacing": 36, "padding": 10, "wrappingWidth": 320, "subGraphTitleMargin": {"top": 6, "bottom": 10}}}}%% flowchart TB accTitle: The full stack: Envoy Gateway, cert-manager and podinfo accDescr: The cert-manager namespace holds the selfsigned ClusterIssuer and cert-manager, started with the ListenerSets feature gate. The envoy-gateway-system namespace holds Envoy Gateway v1.8.0 or later, which manages the Gateway on ports 80 and 443 with allowedListeners set to All. The podinfo namespace holds a ListenerSet for podinfo.example.com with the cluster-issuer annotation, a Certificate that produces the podinfo-tls Secret used by the ListenerSet, and the traffic path from the ListenerSet to the HTTPRoute, the Service on port 9898 and the podinfo pod. cert-manager watches the ListenerSet and creates the Certificate, the ClusterIssuer signs it, and the Gateway allows the ListenerSet. subgraph CM_NS["cert-manager namespace"] CI["ClusterIssuer
selfsigned"] CM["cert-manager
--feature-gates=ListenerSets=true"] end subgraph GW_NS["envoy-gateway-system namespace"] EG["Envoy Gateway
v1.8.0+"] GW["Gateway
:80 + :443
allowedListeners: All"] end subgraph APP_NS["podinfo namespace"] LS["ListenerSet
podinfo.example.com
annotation: cluster-issuer"] CERT["Certificate
podinfo-tls"] SEC["Secret
podinfo-tls"] HR["HTTPRoute"] SVC["Service
:9898"] POD["podinfo"] end EG -.-> GW CERT -.->|produces| SEC SEC --> LS LS ==> HR HR ==> SVC SVC ==> POD CM -.->|watches ListenerSet
creates Certificate| CERT CI -.->|signs| CERT GW -.->|allows| LS classDef platform fill:#40361d,stroke:#eec35e,stroke-width:1.5px,color:#eceae5 classDef app fill:#343621,stroke:#a8c373,stroke-width:1.5px,color:#eceae5 classDef cm fill:#2d3128,stroke:#83a598,stroke-width:1.5px,color:#eceae5 class EG,GW platform class LS,CERT,SEC,HR,SVC,POD app class CI,CM cm style CM_NS fill:#1f1d16,stroke:#83a598,stroke-width:1.5px,color:#83a598 style GW_NS fill:#231e12,stroke:#eec35e,stroke-width:1.5px,color:#eec35e style APP_NS fill:#1f1d16,stroke:#a8c373,stroke-width:1.5px,color:#a8c373 linkStyle 0,8 stroke:#eec35e,stroke-width:1.5px,stroke-dasharray:5 4,color:#eec35e linkStyle 1,6,7 stroke:#83a598,stroke-width:1.5px,stroke-dasharray:5 4,color:#83a598 linkStyle 2 stroke:#b8b5ad,stroke-width:1.5px,color:#b8b5ad linkStyle 3,4,5 stroke:#a8c373,stroke-width:3.5px,color:#a8c373

1. Envoy Gateway#

GA ListenerSet support landed in Envoy Gateway v1.8.0. The chart bundles all Gateway API CRDs, including listenersets.gateway.networking.k8s.io, so you don’t need to install them separately.

helm install envoy-gateway oci://docker.io/envoyproxy/gateway-helm \
  --version v1.8.0 \
  --namespace envoy-gateway-system \
  --create-namespace

2. cert-manager and the ClusterIssuer#

cert-manager v1.20 has a ListenerSet controller, but it’s disabled by default. It needs both the enableGatewayAPIListenerSet config flag and the ListenerSets feature gate:

helm install cert-manager cert-manager \
  --repo https://charts.jetstack.io \
  --version v1.20.2 \
  --namespace cert-manager \
  --create-namespace \
  --set crds.enabled=true \
  --set featureGates="ListenerSets=true" \
  --set config.enableGatewayAPI=true \
  --set config.enableGatewayAPIListenerSet=true

Warning: featureGates must be a top-level Helm value. If you put it inside the config block as a ControllerConfiguration field, it gets silently ignored, with no error and no warning. cert-manager just starts without the ListenerSet controller, and you’ll stare at skipping disabled controller: listenerset in the logs wondering what went wrong.

cert-manager also crashes on startup if you enable the feature gate before the ListenerSet CRD exists. Install Envoy Gateway (which bundles the CRD) before cert-manager, or install the CRD manually first.

Now create a self-signed ClusterIssuer. In production you’d use Let’s Encrypt or your corporate CA, but this keeps the example self-contained:

apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
  name: selfsigned
spec:
  selfSigned: {}

3. The Gateway#

The Gateway needs allowedListeners to accept ListenerSets from other namespaces. Without it, ListenerSets are rejected:

apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
  name: external-gateway
  namespace: envoy-gateway-system
spec:
  gatewayClassName: envoy-gateway
  allowedListeners:
    namespaces:
      from: All
  listeners:
    - name: http
      port: 80
      protocol: HTTP
      allowedRoutes:
        namespaces:
          from: All
    - name: https
      port: 443
      protocol: HTTPS
      allowedRoutes:
        namespaces:
          from: All
      tls:
        mode: Terminate
        certificateRefs:
          - name: default-gateway-cert

from: All opens ListenerSet creation to every namespace. In production, you’ll probably want from: Selector with a label like gateway-listeners: enabled to restrict which teams can attach.

4. The application: podinfo, ListenerSet and HTTPRoute#

This is the part the developer owns. Everything goes in their namespace, and the platform team isn’t involved:

helm install podinfo oci://ghcr.io/stefanprodan/charts/podinfo \
  --namespace podinfo --create-namespace \
  --set service.type=ClusterIP
apiVersion: gateway.networking.k8s.io/v1
kind: ListenerSet
metadata:
  name: podinfo
  namespace: podinfo
  annotations:
    cert-manager.io/cluster-issuer: selfsigned
spec:
  parentRef:
    name: external-gateway
    namespace: envoy-gateway-system
  listeners:
    - name: https
      hostname: podinfo.example.com
      port: 443
      protocol: HTTPS
      tls:
        mode: Terminate
        certificateRefs:
          - name: podinfo-tls
    - name: http
      hostname: podinfo.example.com
      port: 80
      protocol: HTTP
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: podinfo
  namespace: podinfo
spec:
  parentRefs:
    - name: podinfo
      kind: ListenerSet
      namespace: podinfo
  hostnames:
    - podinfo.example.com
  rules:
    - matches:
        - path:
            type: PathPrefix
            value: /
      backendRefs:
        - name: podinfo
          port: 9898

The HTTPRoute’s parentRef points to the ListenerSet, not the Gateway. The hostname lives on the ListenerSet now, so if your route references the Gateway directly you’ll get a NoMatchingListenerHostname error and a 404.

Apply the manifests and cert-manager takes over: it sees the cert-manager.io/cluster-issuer annotation on the ListenerSet, creates a Certificate, signs it with the self-signed issuer, and populates the podinfo-tls Secret. Envoy Gateway programs the listener with TLS termination, and the HTTPRoute attaches and routes traffic to podinfo.

The developer never touched the Gateway, and the platform team never touched the application namespace. Just like in the Ingress days, with better infrastructure under the hood.

5. Verify it works#

Wait a few seconds for cert-manager to issue the certificate, then check:

# Verify the certificate is ready
kubectl get certificate -n podinfo
# NAME          READY   SECRET        AGE
# podinfo-tls   True    podinfo-tls   30s

# Extract the CA cert for curl (self-signed, so we need to trust it)
kubectl get secret podinfo-tls -n podinfo \
  -o jsonpath='{.data.tls\.crt}' | base64 -d > /tmp/podinfo.crt

# Get the gateway's external IP
GATEWAY_IP=$(kubectl get gateway external-gateway \
  -n envoy-gateway-system \
  -o jsonpath='{.status.addresses[0].value}')

# Hit the endpoint
curl --cacert /tmp/podinfo.crt \
  --resolve podinfo.example.com:443:${GATEWAY_IP} \
  https://podinfo.example.com
{
  "hostname": "podinfo-5d76864db6-7n2jl",
  "version": "6.7.1",
  "revision": "",
  "color": "#34577c",
  "logo": "https://raw.githubusercontent.com/stefanprodan/podinfo/gh-pages/cuddle_clap.gif",
  "message": "greetings from podinfo v6.7.1"
}

That’s a self-signed certificate issued by cert-manager and served by Envoy Gateway, all triggered by a single annotation on the ListenerSet. Replace selfsigned with your ACME ClusterIssuer and the flow is identical, just with a real certificate.

Things that will bite you#

SymptomWhat’s wrongFix
Waiting for controller on ListenerSetEnvoy Gateway too old or not configuredUpgrade to v1.8.0+. On v1.7.x you need gatewayAPI.enabled: [XListenerSet] but then cert-manager won’t cooperate
skipping disabled controller: listenersetcert-manager feature gate in the wrong placefeatureGates is a top-level Helm value, not inside config
cert-manager CrashLoopBackOffListenerSet CRD not installedDeploy Envoy Gateway first (it bundles the CRD), then cert-manager
NoMatchingListenerHostname / 404HTTPRoute points to Gateway instead of ListenerSetChange parentRef to kind: ListenerSet
cert-manager ignores your XListenerSetcert-manager v1.20 only supports the GA APIUpgrade Envoy Gateway to v1.8.0+ or install the GA CRD from upstream

Why I’ve been waiting for this#

ListenerSets bring back what made Kubernetes networking practical in the Ingress days: developers can deploy an application end to end without waiting on another team.

The platform team still controls ports, namespaces and infrastructure, while developers control their hostname, their certificate and their routing. That’s the separation of concerns Gateway API promised from day one, and ListenerSets are what finally deliver it.

References#