DataHub provides the ability to easily leverage Confluent Cloud as your Kafka provider. To do so, you'll need to configure DataHub to talk to a broker and schema registry hosted by Confluent.
Doing this is a matter of configuring the Kafka Producer and Consumers used by DataHub correctly. There are 2 places where Kafka configuration should be provided: the metadata server (GMS) and the frontend server (datahub-frontend). Follow the steps below to configure these components for your deployment.
## **Step 1: Create topics in Confluent Control Center**
First, you'll need to create following new topics in the [Confluent Control Center](https://docs.confluent.io/platform/current/control-center/index.html). By default they have the following names:
## Step 2: Configure DataHub Container to use Confluent Cloud Topics
### Docker Compose
If you are deploying DataHub via docker compose, enabling connection to Confluent is a matter of a) creating topics in the Confluent Control Center and b) changing the default container environment variables.
First, configure GMS to connect to Confluent Cloud by changing `docker/gms/env/docker.env`:
Note that this step is only required if DATAHUB_ANALYTICS_ENABLED is not set to false.
If you're deploying with Docker Compose, you do not need to deploy the Zookeeper, Kafka Broker, or Schema Registry containers that ship by default.
### Helm
If you're deploying to K8s using Helm, you can simply change the `datahub-helm` values.yml to point to Confluent Cloud and disable some default containers:
First, disable the `cp-schema-registry` service:
```
cp-schema-registry:
enabled: false
```
Next, disable the `kafkaSetupJob` service:
```
kafkaSetupJob:
enabled: false
```
Then, update the `kafka` configurations to point to your Confluent Cloud broker and schema registry instance, along with the topics you've created in Step 1:
Next, you'll want to create 2 new Kubernetes secrets, one for the JaaS configuration which contains the username and password for Confluent,
and another for the user info used for connecting to the schema registry. You'll find the values for each within the Confluent Control Center. Specifically,
select "Clients" -> "Configure new Java Client". You should see a page like the following:

You'll want to generate both a Kafka Cluster API Key & a Schema Registry key. Once you do so,you should see the config
automatically populate with your new secrets:

You'll need to copy the values of `sasl.jaas.config` and `basic.auth.user.info`
for the next step.
The next step is to create K8s secrets containing the config values you've just generated. Specifically, you'll run the following commands:
Finally, we'll configure our containers to pick up the Confluent Kafka Configs by changing two config blocks in our values.yaml file. You
should see these blocks commented at the bottom of the template. You'll want to uncomment them and set them to the following values:
```
credentialsAndCertsSecrets:
name: confluent-secrets
secureEnv:
sasl.jaas.config: sasl_jaas_config
basic.auth.user.info: basic_auth_user_info
springKafkaConfigurationOverrides:
security.protocol: SASL
sasl.mechanism: PLAIN
client.dns.lookup: use_all_dns_ips
basic.auth.credentials.source: USER_INFO
```
Then simply apply the updated `values.yaml` to your K8s cluster via `kubectl apply`.
## Contribution
Accepting contributions for a setup script compatible with Confluent Cloud!
Currently the kafka-setup-job container we ship with is only compatible with a distribution of Kafka wherein ZooKeeper
is exposed and available. A version of the job using the [Confluent CLI](https://docs.confluent.io/confluent-cli/current/command-reference/kafka/topic/confluent_kafka_topic_create.html)