<a id="complete-registration"></a>

# Complete the Cluster Registration

To complete the registration, enter your Confluent Platform cluster ID in the
Confluent Cloud Console wizard. This links the deployed USM Agent
to your Confluent Platform cluster so that Confluent Cloud can receive its metadata and
metrics.

## Before you begin

* You must have the cluster ID for your Confluent Platform cluster. To get the ID, log in to your cluster by using
  the Confluent Platform CLI and run the command `confluent cluster list`.
* Ensure that your Confluent Cloud environment has the Advanced Governance package, which is required for USM.
  To upgrade your environment, see the [upgrade instructions](../../stream-governance/packages.md#stream-gov-packages).

### Confluent Cloud Console

1. Log in to your Confluent Platform cluster by using the Confluent Platform CLI.
2. Get your cluster ID by listing the available clusters:
   ```bash
   confluent cluster list
   ```
3. Return to the registration wizard in the Confluent Cloud Console and enter the Confluent Platform cluster ID.
   The **Metadata** region is automatically selected based on your private network
   configuration. You cannot change this setting.
4. Enter a descriptive **Cluster name** to be used in the Confluent Cloud Console.
5. Click **Register cluster**.

   After the registration succeeds, click **Close Wizard**. The **Clusters** page opens and displays your newly registered cluster.

### Confluent CLI

(Optional) If you haven’t upgraded your environment to include the Advanced Governance package, run the following command.

```shell
confluent environment update <environment-ID> --governance-package advanced
```

For example, to upgrade an environment with the ID `env-abc123`:

```text
confluent environment update env-abc123 --governance-package advanced

The command returns a confirmation similar to this:
+---------------------------+------------+
| Current                   | false      |
| ID                        | env-abc123 |
| Name                      | env-name   |
| Stream Governance Package | ADVANCED   |
+---------------------------+------------+
```

To register a Confluent Platform cluster with the Confluent CLI, use the following command. Replace the placeholders with your own values:

```shell
confluent usm kafka-cluster register <cluster-ID> --name <cluster-name> --cloud <cloud-type> --region <region-name>
```

For `--cloud`, specify `aws` or `azure`, and for `--region`, specify a region
from [Configure AWS Private Networking for USM Agents](usm-network.md#usm-network) (AWS) or [Configure Azure Private Networking for USM Agents](usm-network-azure.md#usm-network-azure) (Azure).

For example, to register a Kafka cluster with ID `4k0R9d1GTS5tI9f4Y2xZ0Q` in AWS region `us-east-1`:

```text
confluent usm kafka-cluster register 4k0R9d1GTS5tI9f4Y2xZ0Q --name my-kafka-cluster --cloud aws --region us-east-1

The command returns a confirmation similar to the following:

+--------------------------------+--------------------------+
| ID                             | usmkc-global-abcdef12345 |
| Name                           | my-kafka-cluster         |
| Confluent Platform Kafka       | 4k0R9d1GTS5tI9f4Y2xZ0Q   |
| Cluster ID                     |                          |
| Cloud                          | AWS                      |
| Region                         | us-east-1                |
| Environment                    | env-abc123               |
+--------------------------------+--------------------------+
```

To register a Kafka cluster with ID `9f4Y2xZ0Q4k0R9d1GTS5tI`
in Azure region `centralus`:

```bash
confluent usm kafka-cluster register 9f4Y2xZ0Q4k0R9d1GTS5tI --name my-kafka-cluster --cloud azure --region centralus
```

The command returns a confirmation similar to the following:

```text
+--------------------------------+--------------------------+
| ID                             | usmkc-global-fedcba54321 |
| Name                           | my-kafka-cluster         |
| Confluent Platform Kafka       | 9f4Y2xZ0Q4k0R9d1GTS5tI   |
| Cluster ID                     |                          |
| Cloud                          | AZURE                    |
| Region                         | centralus                |
| Environment                    | env-abc123               |
+--------------------------------+--------------------------+
```

For a complete reference of related commands, see the [confluent usm documentation](https://docs.confluent.io/confluent-cli/current/command-reference/usm/index.html#confluent-usm).

## Register additional clusters

To register additional clusters:

1. In the Confluent Cloud Console, navigate to the **Environments** page.
2. Select your environment.
3. In the navigation menu, click **Clusters**.
4. On the **Clusters** page, click **Register platform cluster**.
   ![image](images/usm-additional-cluster.png)
5. Choose **New agent** or **Existing agent**, then click **Get started**.

![image](images/usm-agent-choice-dialog.png)

The registration dialog provides two options:

* **New agent**: Deploy a new USM Agent in the Confluent Platform environment where the
  Kafka cluster resides to create a fresh agent deployment for the cluster.
* **Existing agent**: Reuse an already deployed USM Agent in the Confluent Platform environment where
  the Kafka cluster resides to register additional clusters.

After you make your selection, click **Get started** to continue the registration process.

<a id="usm-deregister-kafka"></a>

## Deregister a Kafka cluster

When you deregister a Kafka cluster, the cluster is removed as a USM entity
from Confluent Cloud. The USM Agent continues to run in your Confluent Platform environment
and emits events, but Confluent Cloud rejects them because the Confluent Platform cluster no longer has
a corresponding mapping in Confluent Cloud.

To stop these events, remove the USM-specific configuration
from the Kafka cluster. After you remove the configuration, you can
remove the USM Agent entirely, provided that no other Kafka or Connect cluster
is using the agent.

You can deregister a Kafka cluster from USM using the Confluent Cloud Console or the Confluent CLI.

### Confluent Cloud Console

In the Confluent Cloud Console, you can deregister a Kafka cluster using one of the following methods:

- From the Environments overview page
- From the Clusters list
- From the Cluster settings

### From Environments overview

1. In the Confluent Cloud Console, navigate to the **Environments** page and select your environment.
2. On the **Environment overview** page, locate the **Recently created platform clusters** section.
3. On the cluster card for the cluster you want to remove, click the **More** icon (three vertical dots).
4. Click **Deregister cluster**.
   ![Environment overview page showing the Deregister cluster option in the More menu](images/usm-kafka-deregister-env-overview.png)
5. In the **Deregistering Confluent Platform Kafka cluster** dialog, enter the cluster name exactly as shown.
   ![Deregistering Confluent Platform Kafka cluster confirmation dialog](images/usm-kafka-deregister-dialog.png)
6. Click **Deregister**.

The cluster is removed from the Confluent Cloud Console.

### From Clusters list

1. In the Confluent Cloud Console, navigate to the **Environments** page and select your environment.
2. In the left navigation menu, click **Clusters**.
3. On the **Clusters** page, select the **Confluent Platform** tab.
4. Locate the cluster you want to deregister and click the **More** icon (three vertical dots).
5. Click **Deregister cluster**.
   ![Clusters page showing the Deregister cluster option in the More menu](images/usm-kafka-deregister-clusters-list.png)
6. In the **Deregistering Confluent Platform Kafka cluster** dialog, enter the cluster name exactly as shown.
7. Click **Deregister**.

The cluster is removed from the Confluent Cloud Console.

### From Cluster settings

1. In the Confluent Cloud Console, navigate to the **Environments** page and select your environment.
2. On the **Clusters** page, click the name of the cluster you want to deregister.
3. Click the **Settings** tab.
4. Click **Deregister cluster** at the bottom of the page.
   ![Cluster settings page showing the Deregister cluster button at the bottom](images/usm-kafka-deregister-settings.png)
5. In the **Deregistering Confluent Platform Kafka cluster** dialog, enter the cluster name exactly as shown.
6. Click **Deregister**.

The cluster is removed from the Confluent Cloud Console.

### Confluent CLI

1. Log in to the Confluent CLI.
   ```bash
   confluent login
   ```
2. Get your environment ID. To find the environment ID:
   1. In the Confluent Cloud Console, navigate to the **Environments** page and select your environment.
   2. Click the **Details** tab and then copy the ID from the **About** section.
3. List the clusters in your environment to find the `USM_KAFKA_CLUSTER_ID` of the cluster that you want to deregister:
   ```bash
   confluent usm kafka-cluster list --environment <YOUR_ENVIRONMENT_ID>
   ```

   From the output, identify the cluster that you want to deregister and copy its ID. The `USM_KAFKA_CLUSTER_ID` starts with the prefix `usmkc-`.
4. Deregister the cluster:
   ```bash
   confluent usm kafka-cluster deregister <USM_KAFKA_CLUSTER_ID> --environment <YOUR_ENVIRONMENT_ID>
   ```

   For example, to deregister a cluster with the ID `usmkc-abc123`:
   ```bash
   confluent usm kafka-cluster deregister usmkc-abc123 --environment env-12345
   ```
5. When prompted, enter `y` to confirm.
   ```text
   Are you sure you want to deregister USM Kafka cluster "usmkc-abc123"? (y/n): y
   Deregistered USM Kafka cluster "usmkc-abc123".
   ```

The cluster is removed from the Confluent Cloud Console.

For more information about related commands, see the [confluent usm CLI documentation](https://docs.confluent.io/confluent-cli/current/command-reference/usm/index.html#confluent-usm).

## Related content

* [Unified Stream Manager in Confluent Cloud](../overview.md#cloud-usm-overview)
* [Register Your Confluent Platform Cluster](overview.md#cloud-usm-register)
* [Set Up a Payment Method](payment-method.md#usm-payment)
* [Configure AWS Private Networking for USM Agents](usm-network.md#usm-network)
* [Configure Azure Private Networking for USM Agents](usm-network-azure.md#usm-network-azure)
* [Configure a Service Account for the USM Agent](usm-service-account.md#usm-sa)
* [Deploy the USM Agent](deploy-agent.md#usm-agent)
* [Remove the USM Agent](../remove-agent.md#usm-remove-agent)
