// This module is included in:
//
// assembly-overview.adoc

[id="configuration-points-listeners-{context}"]
= Listener configuration

Listeners are used to connect to Kafka brokers.

Strimzi provides a generic `GenericKafkaListener` schema with properties to configure listeners through the `Kafka` resource.

The `GenericKafkaListener` provides a flexible approach to listener configuration.

You can specify properties to configure _internal_ listeners for connecting within the Kubernetes cluster, or _external_ listeners for connecting outside the Kubernetes cluster.

.Generic listener configuration

Each listener is xref:proc-config-kafka-{context}[defined as an array in the `Kafka` resource].

For more information on listener configuration, see the xref:type-GenericKafkaListener-reference[`GenericKafkaListener` schema reference].

Generic listener configuration replaces the previous approach to listener configuration using the xref:type-KafkaListeners-reference[`KafkaListeners` schema reference],
which is *deprecated*.
However, you can xref:property-listener-bwc-reference[convert the old format into the new format] with backwards compatibility.

The `KafkaListeners` schema uses sub-properties for `plain`, `tls` and `external` listeners, with fixed ports for each.
Because of the limits inherent in the architecture of the schema, it is only possible to configure three listeners, with configuration options limited to the type of listener.

With the `GenericKafkaListener` schema, you can configure as many listeners as required,
as long as their names and ports are unique.

You might want to configure multiple external listeners, for example, to handle access from networks that require different authentication mechanisms.
Or you might need to join your Kubernetes network to an outside network.
In which case, you can configure internal listeners (using the `useServiceDnsDomain` property) so that the Kubernetes service DNS domain (typically `.cluster.local`) is not used.

.Configuring listeners to secure access to Kafka brokers
You can configure listeners for secure connection using authentication.
For more information on securing access to Kafka brokers, see xref:assembly-securing-kafka-str[Managing access to Kafka].

.Configuring external listeners for client access outside Kubernetes
You can configure external listeners for client access outside a Kubernetes environment using a specified connection mechanism, such as a loadbalancer.
For more information on the configuration options for connecting an external client, see xref:assembly-configuring-external-listeners-str[Configuring external listeners].

.Listener certificates
You can provide your own server certificates, called _Kafka listener certificates_, for TLS listeners or external listeners which have TLS encryption enabled.
For more information, see xref:kafka-listener-certificates-str[Kafka listener certificates].
