Multiple listeners with HTTP routes

The NetScaler Kubernetes Gateway Controller supports multiple listeners within a single Gateway resource, as defined by the Kubernetes Gateway API. This capability provides greater flexibility and control over how external traffic is managed and routed to services within your Kubernetes cluster.

With multiple listener support, you can:

  • Expose multiple ports on the same set of gateway IP addresses, so that different applications or services can be accessed through distinct ports.
  • Support different protocols, such as HTTP and HTTPS, on separate ports while using the same gateway IP address.
  • Apply unique TLS configurations for each listener, enabling secure communication tailored to specific requirements.
  • Define separate routing rules for each listener, allowing you to manage and direct different inbound traffic flows.

This enhanced listener functionality enables advanced traffic management scenarios, such as hosting multiple secure and non-secure applications behind a single Gateway, or segmenting traffic for compliance and security purposes. By using multiple listeners, you can optimize your application delivery and improve the scalability and security of your Kubernetes environment.

Sample configuration

The following sample configuration in Kubernetes results in creating three content switching virtual servers and an ipset for each content switching virtual server.

apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: name: my-gateway-http namespace: default spec: gatewayClassName: my-gateway-class addresses: - type: IPAddress value: <ip1> - type: IPAddress value: <ip2> - type: IPAddress value: <ip3> listeners: - name: http-listener protocol: HTTP port: 80 allowedRoutes: namespaces: from: All - name: http-listener1 protocol: HTTP port: 81 allowedRoutes: namespaces: from: All - name: https protocol: HTTPS port: 443 tls: mode: Terminate certificateRefs: - kind: Secret name: my-secret group: "" allowedRoutes: namespaces: from: All
Multiple listeners with HTTP routes