Generate Kafka credentials to connect to Event Streams Cluster.

Mohamed Hassan
3 min readMar 13, 2021

Learning objectives

In this tutorial, you will learn how to generate Kafka credentials to connect to Event Streams Cluster.

Prerequisites

To complete this tutorial, you need

· Red Hat OpenShift cluster in your preferred Cloud. In this tutorial, I’m using IBM Red Hat OpenShift Cluster.

· Cloud Pak for Integration in you preferred Cloud. In this tutorial, I’m using Cloud Pak for Integration in IBM Cloud.

· Event Streams Cluster. (To Setup your Cluster. Please refer to this tutorial.)

. OpenShift CLI.

Steps

  1. Log in to your Cloud Pak for Intgration Cluster. Click on the cluster name to open you cluster dashboard.

2. To generate Kafka Credentials to Connect to your cluster. Click on Connect to this cluster tile in the dashboard.

3. Copy the broker hostname and the port then save it in your note because will need it later when you connect to your cluster.

4. Click on Generate SCRAM credentials button to create user and set the needed permissions.

5. Enter the username that you prefer.

6. I select the last option because I need the user to Produce messages, consume messages and create topics and schemas.

7. Click Next.

8. You can grant access to the user to specific topic, topics with prefix or All topics. I will select All topics in this tutorial to give the Kafka user full access to All topics.

9. Click Next.

10. You can grant access to the user to specific consumer group, consumer groups with prefix or All consumer group. I will select All consumer group in this tutorial to give the Kafka user full access to All consumer group.

11. Click Next.

12. You can grant access to the user to specific transaction ID, transaction ID with prefix or All transaction IDs. I will select All transaction IDs in this tutorial to give the Kafka user full access to All transaction IDs.

13. Click Next.

14. New secret will be created in your OpenShift cluster with the same username that you entered. The secret will be created in same project that it is used to install your Cloud Pak.

15. Copy the username and password for any feature use and keep them in your secure notes.

16. You can retrieve the password any time by login to your Openshift cluster and extract the password from the secret the blow commands.

oc login --token= YOUR_TOKEN --server=YOUR_CLUSTER_URLoc get secret YOUR_USERNAME -n NAME_SPASE -o jsonpath="{.data.password}" | base64 --decode

Next: To Learn how to Set up a Kafka Connect Cluster in IBM Cloud Pak for Integration, you can refer to this tutorial.

--

--