---
title: How to connect to a Cluster for Apache Kafka®
description: Learn how to connect to your Scaleway Cluster for Apache Kafka® with Scaleway, and understand how to securely establish a connection using TLS certificates and credentials.
dates:
  validation: 2026-06-19
  posted: 2025-09-15
---
import Requirements from '@macros/iam/requirements.mdx'

You can use different frameworks to connect to your Cluster for Apache Kafka®, and integrate it with your applications.

All clients that want to connect to your cluster must:

- Have downloaded the cluster's [TLS certificate](/clusters-for-kafka/how-to/manage-cluster/) and configured the client to recognize it
- Be attached to a Private Network in the same VPC as the cluster, or connect via a Public Gateway in the VPC
- Know the cluster's username and password

<Requirements />

  - A Scaleway account logged into the [console](https://console.scaleway.com)
  - [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
  - A Cluster for Apache Kafka®

## How to download the TLS certificate

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.

2. Click the cluster you want to connect to. Its **Overview** page displays.

3. In the **Connectivity** panel, click **Download** next to the TLS certificate.

The TLS certificate in `.pem` format 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.

<Message type="note">
TLS is server-side only, and no client certificate is required.
</Message>

## How to ensure clients have network access

Any clients wanting to connect to the cluster must be [attached to a Private Network](/vpc/how-to/attach-resources-to-pn/) in the same VPC as the cluster.

## How to access the username and password

The username and password for a Cluster for Apache Kafka® are defined when [creating the cluster](/clusters-for-kafka/how-to/create-cluster/). Currently, only one user can be created per cluster. The username cannot be modified after creation, but the password can be changed at any time.

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.

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.

2. Click the cluster you want to connect to. Its **Overview** page displays.

3. Click the **Users** tab.

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.

## How to connect to the cluster

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 Kafka-compatible framework of your choice. Code snippets are provided for Go, Python and Java; access them by following the steps below.

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.

2. Click the cluster you want to connect to. Its **Overview** page displays.

3. In the **Connectivity** panel, click **Connect**.

    A pop-up displays, with tabs for each sample framework: **Go**, **Python**, and **Java**.

4. Click the tab of your choice to view the code sample.

