Fields
A human-readable name for this listener. Used in logs and metrics to identify the listener. Not required, but recommended for complex configurations with multiple listeners.
The namespace this listener belongs to. Used when agentgateway is managed by a control plane (XDS) to scope resources. For local configurations, this can generally be omitted.
The hostname this listener matches. Incoming requests are matched against this value using the HTTP
Host header (or SNI for TLS connections).Accepts wildcard prefixes: "*.example.com" matches api.example.com and admin.example.com, but not example.com.When omitted, the listener matches all hostnames not claimed by another listener on the same port.The protocol to expect on this listener. Accepted values:
HTTP— Plain HTTP/1.1 or HTTP/2 cleartext.HTTPS— HTTP over TLS. Requirestlsto be configured.
HTTP is the typical choice.TLS configuration for this listener. Required when
protocol is HTTPS. Agentgateway terminates TLS and forwards plaintext to the upstream backend.The list of routes this listener forwards traffic to. Routes are evaluated in order; the first match wins.See Routes for the full field reference.
Examples
Plain HTTP listener
HTTPS listener with TLS termination
Mutual TLS (mTLS)
Supply aroot CA to require and verify client certificates.
TLS with restricted cipher suites and version
Wildcard hostname matching
Use wildcard hostnames to capture all subdomains with one listener.Named listeners for observability
Naming listeners makes them easier to identify in logs and distributed traces.Hostname matching precedence
When multiple listeners exist on the same port, agentgateway selects the most specific match:- Exact hostname match (e.g.,
api.example.com) - Wildcard prefix match (e.g.,
*.example.com) - Global wildcard (
*) or no hostname specified
If two listeners share the same hostname on the same port, the behavior is undefined. Ensure each listener on a port has a distinct hostname.