Creating a Cluster Configuration

Create a reusable cluster configuration that defines broker property settings for Kafka clusters in Streaming with Apache Kafka.

When creating a Kafka cluster in the Console, you select an existing cluster configuration and configuration version. If you need different broker property settings, you must create a new configuration or configuration version before you can select it for the cluster.

To create a new configuration version, see Updating a Cluster Configuration.

  • Create a reusable configuration before selecting it during cluster creation.

    1. Navigate to the Cluster configurations list page. If you need help finding the list page, see Listing Cluster Configurations.
    2. Select Create configuration.
    3. Enter a Configuration name and select the Compartment for the configuration.
    4. Under Configuration preset, select a preset to populate the configuration.
      • Custom: Selected by default. The configuration text box is empty.
      • Single-broker compatible: Sets replication factors and minimum in-sync replicas to 1.
      • High availability (3+ brokers): Sets replication factors to 3 and minimum in-sync replicas to 2.
    5. In Configuration, review and edit the broker properties.
    6. Select Create.
  • Use the cluster-config create command and required parameters to create the configuration for a Kafka cluster:

    oci kafka cluster-config create 
    -c <compartment-ocid>  
    --latest-config '{"properties":{"<key1>":"<value1>","<key2>":"<value2>"}}'

    As a best practice, you can create a configuration config_name.properties with all the required property key-value pairs and then provide this file to the cluster-config create command:

    oci kafka cluster-config create -c <compartment-ocid> --latest-config <file-name>
                            

    For a complete list of parameters and values for CLI commands, see the CLI Command Reference.

  • Run the CreateKafkaClusterConfig operation to create a cluster configuration.