|
| 1 | +--- |
| 2 | +title: How to connect to a Cluster for Apache Kafka® |
| 3 | +description: Learn how to connect to your Scaleway Cluster for Apache Kafka® wih Scaleway, and understand how to securely establish a connection using TLS certificates and credentials. |
| 4 | +dates: |
| 5 | + validation: 2025-08-20 |
| 6 | + posted: 2025-08-20 |
| 7 | +noindex: true |
| 8 | +--- |
| 9 | +import Requirements from '@macros/iam/requirements.mdx' |
| 10 | + |
| 11 | +<Message type="note"> |
| 12 | +Clusters for Apache Kafka® is currently in [Private Beta](https://www.scaleway.com/en/betas/) and available to selected testers only. |
| 13 | +</Message> |
| 14 | + |
| 15 | +You can use different frameworks to connect to your Cluster for Apache Kafka®, and integrate it with your applications. |
| 16 | + |
| 17 | +All clients that want to connect to your cluster must: |
| 18 | + |
| 19 | +- Have downloaded the cluster's [TLS certificate](TODO) and configured the client to recognize it |
| 20 | +- Be attached to a Private Network in the same VPC as the cluster, or connect via a Public Gateway in the VPC |
| 21 | +- Know the cluster's username and password |
| 22 | + |
| 23 | +<Requirements /> |
| 24 | + |
| 25 | + - A Scaleway account logged into the [console](https://console.scaleway.com) |
| 26 | + - [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization |
| 27 | + - A Cluster for Apache Kafka® |
| 28 | + |
| 29 | +## How to download the TLS certificate |
| 30 | + |
| 31 | +1. Click **Apache Kafka®** in the **Data and Analytics** section of the [console](https://console.scaleway.com/) side menu. A list of your clusters displays. |
| 32 | + |
| 33 | +2. Click the cluster you want to connect to. Its **Overview** page displays. |
| 34 | + |
| 35 | +3. In the **Connectivity** panel, click **Download** next to the TLS certificate. |
| 36 | + |
| 37 | +The TLS certificate is downloaded to your local device. If using Java, import it into a truststore and configure your `client.properties` appropriately. For other types of client (e.g. Python, Go, CLI), you may be able to use the certificate directly by setting its location in your Kafka consumer configuration code (e.g. `'ssl.ca.location': '/path/to/ca.crt'`). |
| 38 | + |
| 39 | +TODO CHECK: |
| 40 | +- Check all of the info above |
| 41 | +- Add more info for |
| 42 | +- Server side TLS only? (no client cert needed?) |
| 43 | +- What CA is used? Is it well known or private? Is the TLS cert in crt or pem format? |
| 44 | + |
| 45 | +## How to ensure clients have network access |
| 46 | + |
| 47 | +Any clients wanting to connect to the cluster must either be attached to a Private Network in the same VPC as the cluster, or connect via a Public Gateway in the VPC. |
| 48 | + |
| 49 | +TODO set up static NAT to map ports/IP address? |
| 50 | + |
| 51 | +See the following pages for help: |
| 52 | +- [How to attach a resource to a Private Network](/vpc/how-to/attach-resources-to-pn/) |
| 53 | +- [How to create a Public Gateway](/public-gateways/how-to/create-a-public-gateway/) |
| 54 | +- [Getting the most from Private Networks](/vpc/reference-content/getting-most-private-networks/) |
| 55 | + |
| 56 | +## How to access the username and password |
| 57 | + |
| 58 | +The username and password for a Cluster for Apache Kafka® are defined when [creating the cluster](/clusters-for-kafka/how-to/create-cluster/). During Private Beta, only one user can be created per cluster. The username cannot be modified after creation, but the password can be changed at any time. |
| 59 | + |
| 60 | +If you need a reminder of the username after creating the cluster, follow the steps below. You cannot view the password you set, but you can change it to a new one. |
| 61 | + |
| 62 | +1. Click **Apache Kafka®** in the **Data and Analytics** section of the [console](https://console.scaleway.com/) side menu. A list of your clusters displays. |
| 63 | + |
| 64 | +2. Click the cluster you want to connect to. Its **Overview** page displays. |
| 65 | + |
| 66 | +3. Click the **Users** tab. |
| 67 | + |
| 68 | +The username displays in the list of users. Click **Change password** if you have forgotten the password and need to change it to a new one. |
| 69 | + |
| 70 | +## How to connect to the cluster |
| 71 | + |
| 72 | +Once you have ensured that the client in question has the cluster's TLS certificate, appropriate network access and the correct username and password, you can facilitate connection via the framework of your choice. Code snippets are provided for Go, Python and Java; access them by following the steps below. |
| 73 | + |
| 74 | +1. Click **Apache Kafka®** in the **Data and Analytics** section of the [console](https://console.scaleway.com/) side menu. A list of your clusters displays. |
| 75 | + |
| 76 | +2. Click the cluster you want to connect to. Its **Overview** page displays. |
| 77 | + |
| 78 | +3. In the **Connectivity** panel, click **Connect**. |
| 79 | + |
| 80 | + A pop-up displays, with tabs for each sample framework: **Go**, **Python** and **Java**. |
| 81 | + |
| 82 | +4. Click the tab of your choice to view the code sample. |
0 commit comments