Per-listener configuration with
GATEWAY_LISTENER_<NAME>_* variables is available from Gateway 3.20.0. On earlier versions, networking is configured with the global variables described in Legacy network configuration. To move an existing deployment over, see Migrate to listener configuration.When to use multiple listeners
Typical cases:- Internal and external endpoints with different security. For example,
PLAINTEXTfor internal services on a private network,SASL_SSLfor external clients over the public internet. - Kubernetes deployments with separate services. A
ClusterIPservice for in-cluster traffic and aLoadBalancerservice for external traffic, each mapped to a different listener. - Distinct client populations with different security requirements. For example, a legacy fleet on
SASL_PLAINTEXTmigrating gradually to a newSASL_SSLlistener.
Configure two listeners
Add each listener with its ownGATEWAY_LISTENER_<NAME>_* block. The example below defines an EXTERNAL listener with SNI routing and SASL_SSL, and an INTERNAL listener with port routing and PLAINTEXT.
Listener names have to start with a letter and contain only alphanumeric characters. Underscores are reserved as delimiters in
GATEWAY_LISTENER_<NAME>_<PROPERTY>, so a name like MY_LISTENER would be ambiguous. Gateway only recognizes variables whose <NAME> matches this pattern — variables using any other name are ignored, and the listener is silently not created.Enable TLS for SSL and SASL_SSL listeners in the helm chart
The example above usesSASL_SSL on the external listener. On the Conduktor Gateway Helm chart, any listener that uses SSL or SASL_SSL requires tls.enable: true (or tls.certManager.enabled: true), otherwise the chart fails validation:
GATEWAY_SSL_KEY_STORE_PATH through gateway.env alone does not satisfy this — it works at runtime but not at chart render time.
tls.keystore.secretRef set, tls.enable: true generates these container env vars and mounts the keystore secret at /etc/gateway/tls/:
These are explicit container env vars, so they override any same-named value from
gateway.env.
Under tls.enable: true, the chart generates GATEWAY_SSL_KEY_STORE_PASSWORD only when tls.keystore.passwordSecretRef is set. Without it, supply the GATEWAY_SSL_KEY_STORE_PASSWORD environment variable yourself through gateway.env or extraSecretEnvVars.
Use cert-manager instead
To source the keystore from cert-manager rather than a static secret, settls.certManager.enabled: true. This also satisfies the SSL/SASL_SSL requirement. tls.enable and tls.certManager.enabled are mutually exclusive — the chart fails validation if both are true.
Unlike tls.enable, cert-manager always supplies the keystore password from its password secret, so the chart also generates GATEWAY_SSL_KEY_STORE_PASSWORD and GATEWAY_SSL_KEY_PASSWORD — you don’t set them yourself.
Constraints
Some configuration stays global across all listeners:- Shared SSL keystore and truststore. All listeners share the same keystore and truststore. To serve different certificates per listener, include all of them in the global keystore — Gateway selects the right one based on SNI during the TLS handshake.
- Shared SASL mechanisms. All SASL listeners share the same set of enabled SASL mechanisms. You can’t enable different mechanisms per listener (for example,
OAUTHBEARER-only for external,PLAIN-only for internal). - Global security mode. All listeners share the same
GATEWAY_SECURITY_MODE. You can’t mixGATEWAY_MANAGEDandKAFKA_MANAGEDacross listeners. If your use case requires both modes, deploy separate Gateway instances. - Internal load balancing is global. Internal load balancing is a global setting. When enabled, all listeners have to share the same advertised host. If listeners have different advertised hosts, disable internal load balancing or Gateway will fail to start.
Verify the configuration
Gateway logs the computed configuration at startup, including all registered listeners, their ports and routing mechanisms. Check the startup logs:Computed configuration output. For the example above, the block lists both listeners (this output is from Gateway 3.20.0 and may change in later versions):
GATEWAY_LISTENER_<NAME>_<PROPERTY> naming pattern and that the listener name contains only alphanumeric characters.
Run a Kafka client against each listener to confirm the metadata response advertises the expected hostnames and ports for that listener.