Discovery

The Stackable Operator for Apache Kafka publishes a service discovery ConfigMap which exposes a client configuration bundle that allows access to the Apache Kafka cluster.

The bundle includes a thrift connection string to access the Kafka broker service. This string may be used by other operators or tools to configure their products with access to Kafka. This is limited to internal cluster access.

The operator also creates a deprecated secondary discovery ConfigMap named {clusterName}-nodeport. In 24.7 and older, this ConfigMap was used to access the Kafka installation from outside the Kubernetes cluster. In 24.11, this was replaced by Listener-based exposition, and the -nodeport ConfigMap was made equivalent to the primary one. This behaviour is deprecated as of 25.3, and will be removed in the next release. Any existing uses of the -nodeport ConfigMap should be migrated to the primary. See the deprecation issue for more details.

Example

Given the following Kafka cluster:

apiVersion: kafka.stackable.tech/v1alpha1
kind: KafkaCluster
metadata:
  name: simple-kafka  (1)
  namespace: stackable (2)
spec:
  […​]
1 The name of the Kafka cluster, which is also the name of the created discovery ConfigMap.
2 The namespace of the discovery ConfigMap.

The resulting discovery ConfigMap is stackable/simple-kafka.

Contents

The stackable/simple-kafka discovery ConfigMap contains the following fields where simple-kafka represents the name and stackable the namespace of the cluster:

KAFKA

Contains the thrift protocol connection string for the Kafka cluster:

simple-kafka.stackable.svc.cluster.local:9092