You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<h5class="anchor-heading"><aid="kraft_storage_standalone"class="anchor-link"></a><ahref="#kraft_storage_standalone">Bootstrap a Standalone Controller</a></h5>
3796
3796
The recommended method for creating a new KRaft controller cluster is to bootstrap it with one voter and dynamically <ahref="#kraft_reconfig_add">add the rest of the controllers</a>. Bootstrapping the first controller can be done with the following CLI command:
3797
3797
3798
-
<pre><codeclass="language-bash">$ bin/kafka-storage format --cluster-id <cluster-id> --standalone --config controller.properties</code></pre>
3798
+
<pre><codeclass="language-bash">$ bin/kafka-storage.sh format --cluster-id <cluster-id> --standalone --config controller.properties</code></pre>
3799
3799
3800
3800
This command will 1) create a meta.properties file in metadata.log.dir with a randomly generated directory.id, 2) create a snapshot at 00000000000000000000-0000000000.checkpoint with the necessary control records (KRaftVersionRecord and VotersRecord) to make this Kafka node the only voter for the quorum.
<h5class="anchor-heading"><aid="kraft_storage_observers"class="anchor-link"></a><ahref="#kraft_storage_observers">Formatting Brokers and New Controllers</a></h5>
3820
3820
When provisioning new broker and controller nodes that we want to add to an existing Kafka cluster, use the <code>kafka-storage.sh format</code> command without the --standalone or --initial-controllers flags.
3821
3821
3822
-
<pre><codeclass="language-bash">$ bin/kafka-storage format --cluster-id <cluster-id> --config server.properties</code></pre>
3822
+
<pre><codeclass="language-bash">$ bin/kafka-storage.sh format --cluster-id <cluster-id> --config server.properties</code></pre>
After starting the controller, the replication to the new controller can be monitored using the <code>kafka-metadata-quorum describe --replication</code> command. Once the new controller has caught up to the active controller, it can be added to the cluster using the <code>kafka-metadata-quorum add-controller</code> command.
3830
3830
3831
3831
When using broker endpoints use the --bootstrap-server flag:
If the KRaft Controller cluster already exists, the cluster can be shrunk using the <code>kafka-metadata-quorum remove-controller</code> command. Until KIP-996: Pre-vote has been implemented and released, it is recommended to shutdown the controller that will be removed before running the remove-controller command.
3839
3839
3840
3840
When using broker endpoints use the --bootstrap-server flag:
0 commit comments