> ## Documentation Index
> Fetch the complete documentation index at: https://docs.streamnative.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Manage Serverless Clusters on StreamNative Cloud

## Create a cluster

<Tabs>
  <Tab title="Console">
    You can follow the steps in [Create a Serverless Instance](/cloud/clusters/manage-instances/manage-serverless-instances#create-an-instance) to create a Serverless instance and its first cluster in it.
  </Tab>

  <Tab title="Terraform">
    Creating a serverless cluster is straightforward. You just need to select a region and define the cluster in the Terraform configuration file.

    ```hcl theme={null}
    resource "streamnative_pulsar_instance" "test-serverless" {
      ...
    }

    resource "streamnative_pulsar_cluster" "test-serverless" {
      depends_on      = [streamnative_pulsar_instance.test-serverless]
      organization    = streamnative_pulsar_instance.test-serverless.organization
      display_name    = "<your-cluster-name>"
      instance_name   = streamnative_pulsar_instance.test-serverless.name
      location        = "us-central1"
    }
    ```

    * `organization`: The organization ID.
    * `display_name`: The display name of the cluster. Replace `<your-cluster-name>` with the actual name.
    * `instance_name`: The name of the instance where the cluster is created.
    * `location`: The location of the cluster. In this example, it is `us-central1`.

    See [PulsarCluster](https://registry.terraform.io/providers/streamnative/streamnative/latest/docs/resources/pulsar_cluster) for more information.
  </Tab>
</Tabs>

## View cluster details

<Tabs>
  <Tab title="Console">
    Navigate to the **Clusters Dashboard** page.

    * On the **Dashboard** tab, you can view some metrics about the cluster, including the number of topics, subscriptions, consumers, producers, throughput, storage size, and backlog size.
    * On the **Details** tab, you can view the details about the cluster, including the cluster name, location, availability mode, cloud provider, cluster type, service URLs, the features enabled on the cluster, and your Pulsar, BookKeeper, and ZooKeeper versions.
  </Tab>

  <Tab title="snctl">
    To list all the clusters available for an organization, run the following command:

    ```bash theme={null}
    snctl get pulsarclusters -O <your-org-id>
    ```

    If you want to get more details about a cluster, you can run the following command:

    ```bash theme={null}
    snctl get pulsarcluster <your-cluster-name> -O <your-org-id>
    ```
  </Tab>

  <Tab title="Terraform">
    If you want to get more details about a cluster, you can define a data source in the Terraform configuration file.

    ```hcl theme={null}
    data "streamnative_pulsar_cluster" "test-cluster" {
      organization = "<your-organization>"
      name = "<your-cluster-name>"
    }
    ```

    You can checkout [PulsarCluster](https://registry.terraform.io/providers/streamnative/streamnative/latest/docs/data-sources/pulsar_cluster) for more information.
  </Tab>
</Tabs>

## Update a cluster

**Serverless clusters** are fully autonomous and automatically scaled. You don't need to manually update them.

## Delete a cluster

<Note title="Note">
  You cannot delete a cluster if there are resources associated with the cluster.
</Note>

<Tabs>
  <Tab title="Console">
    1. Navigate to the **Clusters** page.

    2. Click the ellipsis at the top right corner of the cluster card that you want to delete, and then click **Delete**.

    3. In the **Are you sure you want to delete this?** dialog, enter the cluster name and then click **Confirm**.
  </Tab>

  <Tab title="snctl">
    There are two ways to delete a cluster.

    * Delete the cluster by the cluster name.

      ```bash theme={null}
      snctl delete pulsarcluster <your-cluster-name>
      ```

    * Delete the cluster by the cluster manifest file `cluster.yaml`.

      ```bash theme={null}
      snctl delete -f cluster.yaml
      ```
  </Tab>

  <Tab title="Terraform">
    Remove the cluster resource from the Terraform configuration file and run `terraform apply` to delete the cluster.
  </Tab>
</Tabs>
