Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
* xref:installation.adoc[]
* xref:configuration.adoc[]
* xref:usage.adoc[]

* Concepts
** xref:discovery.adoc[]
39 changes: 39 additions & 0 deletions docs/modules/ROOT/pages/discovery.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
:clusterName: simple-kafka
:namespace: stackable
:brokerPort: 9092

= Discovery

The Stackable Operator for Apache Kafka publishes a discovery https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#configmap-v1-core[`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.

== Example

Given the following Kafka cluster:

[source,yaml,subs="normal,callouts"]
----
apiVersion: kafka.stackable.tech/v1alpha1
kind: KafkaCluster
metadata:
name: {clusterName} # <1>
namespace: {namespace} # <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 `{namespace}/{clusterName}`.

== Contents

The `{namespace}/{clusterName}` discovery `ConfigMap` contains the following fields where `{clusterName}` represents the name and `{namespace}` the namespace of the cluster:

`KAFKA`::
====
Contains the thrift protocol connection string for the Kafka cluster:
[subs="normal"]
{clusterName}.{namespace}.svc.cluster.local:{brokerPort}
====