:_mod-docs-content-type: REFERENCE

// Module included in the following assemblies:
//
// assembly-deploying.adoc

[id='ref-kafka-connect-clusters-{context}']
= Adding Kafka Connect clusters

[role="_abstract"]
Integrate Kafka Connect clusters with the console to view available connectors and their configurations.  
You can associate one or more Kafka Connect clusters with one or more Kafka clusters that are already defined in the console configuration.  
The console displays Connect cluster and connector information but does not allow modification.

A placeholder for adding Connect clusters is provided in: `examples/console/010-Console-example.yaml`.

You can define Connect clusters globally as part of the console configuration using the `kafkaConnectClusters` property.

`kafkaConnectClusters`:: Defines one or more Kafka Connect clusters that the console can connect to in order to retrieve connector information.  
Each entry includes a `name`, an endpoint `url`, and a list of Kafka clusters with which the Connect cluster is associated.

`kafkaClusters`:: Lists the Kafka clusters associated with the Kafka Connect cluster.  
Each Kafka cluster is referenced by its `<namespace>/<name>` combination as defined in the `kafkaClusters` configuration.  
For standalone Kafka clusters without a namespace, specify only the cluster name.

.Example Kafka Connect cluster configuration
[source,yaml]
----
apiVersion: console.streamshub.github.com/v1alpha1
kind: Console
metadata:
  name: my-console
spec:
  hostname: my-console.<cluster_domain>
  kafkaClusters:
    - name: console-kafka
      namespace: kafka
      listener: secure
      metricsSource: my-ocp-prometheus
      credentials:
        kafkaUser:
          name: console-kafka-user1
  kafkaConnectClusters:
    - name: my-connect-cluster
      url: http://my-connect-cluster.example.com/
      kafkaClusters:
        - kafka/console-kafka
    - name: my-mm2-cluster
      url: http://my-mm2-cluster.example.com/
      kafkaClusters:
        - ns1/kafka1
        - ns2/kafka2
  # ...
----

* `kafkaConnectClusters.name` defines a unique name for the Kafka Connect cluster.
* `kafkaConnectClusters.url` specifies the base URL of the Kafka Connect REST API endpoint.
* `kafkaConnectClusters.kafkaClusters` associates the Kafka Connect cluster with one or more Kafka clusters configured in the console.
* The second `kafkaConnectClusters` entry shows an example MirrorMaker 2 Connect cluster.
* The second `kafkaConnectClusters.kafkaClusters` entry shows how to associate a Kafka Connect cluster with multiple Kafka clusters in different namespaces.

When the console is deployed with these settings, Connect clusters and connector details can be viewed from the **Kafka Connect** page of the console.
