> ## 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.

# Cluster Configuration Overview

The `config` section in a PulsarCluster specification allows users to configure the features and settings to be used for their Pulsar cluster. This topic aims to provide a comprehensive overview of the available configuration options, helping users tailor their Pulsar clusters to specific requirements and use cases.

## Available Configuration Options

The available settings in `config` section in a PulsarCluster specification can be grouped into the following three categories:

1. **Cluster Features**: These settings control the various features and functionalities of your Pulsar cluster.
2. **Protocols**: This setting allows you to configure the supported protocols for your Pulsar cluster, including Kafka, AMQP, MQTT, and Websocket.
3. **Cluster Settings**: This setting allows you to configure custom cluster settings for your Pulsar cluster.

The detailed descriptions of the available settings are as follows:

The `config` section in a PulsarCluster specification includes the following key components:

| Category  | Configuration Option | Description                                        |
| --------- | -------------------- | -------------------------------------------------- |
| Features  | FunctionEnabled      | Controls whether Pulsar Functions are enabled      |
| Features  | TransactionEnabled   | Controls whether Pulsar Transactions are enabled   |
| Features  | AuditLog             | Configures audit log settings                      |
| Protocols | Protocols            | Configures supported protocols (Kafka, AMQP, MQTT) |
| Protocols | WebsocketEnabled     | Controls whether WebSocket protocol is enabled     |
| Settings  | Custom               | Allows for custom cluster settings                 |

## Update Cluster Configuration

To update the cluster configuration, you can use one of the following methods:

<Tabs>
  <Tab title="Console">
    In the [cluster provision process](/cloud/clusters/manage-clusters/cluster#create-a-cluster), when you select a release channel, you can choose to enable or disable the cluster features and protocols based on your requirements. You can also click the "Add optional custom configuration" to set custom cluster settings for your Pulsar cluster.

    <img src="https://mintcdn.com/streamnative/StrsP_UqTvabul7-/media/cluster-features.png?fit=max&auto=format&n=StrsP_UqTvabul7-&q=85&s=e6a1bdb0e1d1ce1661f77c36b0a4569b" alt="Configure Cluster" width="1874" height="1818" data-path="media/cluster-features.png" />

    After cluster is provisioned, you can view the current cluster configuration through the "Configuration" page of your Pulsar cluster. You can also update the cluster configuration by clicking the "Edit Cluster" button at the top right corner of the page. You will be redirected to the same configuration page you see in the provision process, where you can make the desired changes to the configuration options.

    <img src="https://mintcdn.com/streamnative/StrsP_UqTvabul7-/media/cluster-configuration.png?fit=max&auto=format&n=StrsP_UqTvabul7-&q=85&s=a004ca01fb3c2ac62921b828538837db" alt="Cluster Configuration" width="5098" height="1590" data-path="media/cluster-configuration.png" />
  </Tab>

  <Tab title="snctl">
    To update the cluster configuration using `snctl`:

    1. Ensure you have the latest version of [`snctl`](/tools/cli/snctl/snctl-overview) installed and configured.

    2. Update the PulsarCluster CRD file (e.g., `<cluster-name>.yaml`) with the desired configuration options.

       ```yaml theme={null}
       apiVersion: pulsar.streamnative.cloud/v1beta1
       kind: PulsarCluster
       metadata:
         name: <cluster-name>
       spec:
         config:
           # Add your desired configuration options here
           functionEnabled: true
           transactionEnabled: true
           <...>
       ```

    3. Apply the updated PulsarCluster CRD file to the cluster:

       ```bash theme={null}
       snctl apply -f <cluster-name>.yaml
       ```

    To view the cluster configuration, you can use the following command:

    ```bash theme={null}
    snctl get pulsarcluster <cluster-name> -o yaml
    ```
  </Tab>

  <Tab title="Terraform">
    To update the cluster configuration using the StreamNative Terraform Provider:

    1. Ensure you have the [StreamNative Terraform Provider](https://registry.terraform.io/providers/streamnative/streamnative/latest) configured in your environment.

    2. Use the `streamnative_pulsar_cluster` resource to define or update your cluster configuration.

    3. Specify the desired configuration options within the `config` block.

    Here's an example of how to update the cluster configuration using Terraform:

    ```hcl theme={null}
    resource "streamnative_pulsar_cluster" "example" {
      name = "example"
      config {
        websocket_enabled = true
        transaction_enabled = true
        <...>
      }
    }
    ```

    To apply the changes, run the following command:

    ```bash theme={null}
    terraform apply
    ```

    To view the cluster configuration, you can use the following command:

    ```bash theme={null}
    terraform show
    ```

    For more details, please refer to the [StreamNative Terraform Provider documentation](https://registry.terraform.io/providers/streamnative/streamnative/latest). See [a complete example](https://github.com/streamnative/terraform-provider-streamnative/blob/main/examples/pulsarclusters/hosted.tf) in the StreamNative Terraform Provider GitHub repository.
  </Tab>
</Tabs>

Please note that not all configuration options are modifiable. Some settings are determined by the release channel you selected during the cluster provision process and cannot be changed. Updating the cluster configuration will cause the cluster to roll restart all the brokers. Please make sure to update the cluster configuration during off-peak hours to avoid any disruptions to your service.

## Next Steps

* [Configure Cluster Features](/cloud/clusters/configure-clusters/configure-cluster-features)
* [Configure Protocols](/cloud/clusters/configure-clusters/configure-protocols)
* [Configure Cluster Settings](/cloud/clusters/configure-clusters/configure-cluster-settings)
