Updating a Cluster
Update the details in a cluster in Streaming with Apache Kafka.
You can make the following changes to a cluster:
- Update the name and description
- Add or remove brokers
- Update mTLS certificate
Important
Updating Subnets with API and CLI: When a cluster uses several subnets, you can update the subnets through API and CLI with the following requirements:
Updating Subnets with API and CLI: When a cluster uses several subnets, you can update the subnets through API and CLI with the following requirements:
- Unique VCNs and same region: Each subnet must be in a different VCN. Providing several subnets from the same VCN results in an error. And all VCNs must be in the same region.
- Enough available IPs: Each subnet must have enough free IP addresses. For example, a 3‑broker cluster requires at least 4 available IPs.
- Important update behavior: Updating a cluster’s subnets is a full replace operation. The list you provide replaces the entire existing configuration. Include any existing subnets that you want to retain.
- Add required policies for all subnets: For example, if the subnet list includes subnet1 and subnet2, and subnet1 is in Compartment A and subnet2 is in Compartment B, ensure the Streaming with Apache Kafka service also has the necessary permissions to create private endpoints in Compartment B (not just Compartment A). See the following policies.
These policies are the ones to include for all subnet compartments:
allow service rawfka to use vnics in compartment <compartment-name>
allow service rawfka to {SUBNET_READ} in compartment <compartment-name>
allow service rawfka to use network-security-groups
in compartment <compartment>
allow service rawfka to use subnets in compartment <compartment-name>
For all required policies, see Required IAM Policies.
- On the Kafka clusters list page, find the cluster that you want to work with. If you need help finding the list page or the cluster, see Listing Clusters.
- From the for the cluster, select Edit cluster.
- (Optional) Update the name, or the description.
- (Optional) Update the number of brokers or OCPU per broker.
- (Optional) Update the mTLS certificate.
- Select Update.
Use the
cluster updatecommand and required parameters to update a cluster:oci kafka cluster update --kafka-cluster-id <kafka- cluster-ocid>If you have several subnets, then include all the subnets OCIDs in the
cluster updatecommand. For example, for two subnets run the following command:oci kafka cluster update --kafka-cluster-id <kafka-cluster-ocid> --access-subnets [ { "subnets": [ "<subnet-1-ocid>", "<subnet-2-ocid>"] } ]For a complete list of flags and variable options for CLI commands, see the CLI Command Reference.
Run the
UpdateKafkaClusteroperation to update a cluster.