Skip to content

KAFKA-19184; Add documentation for upgrading the kraft version #20071

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 9, 2025

Conversation

jsancio
Copy link
Member

@jsancio jsancio commented Jun 30, 2025

Update the documentation to describe how to upgrade the kraft feature
version from 0 to 1.

Reviewers: Mickael Maison [email protected], Alyssa Huang
[email protected]

@github-actions github-actions bot added docs small Small PRs labels Jun 30, 2025
Copy link
Contributor

@ahuang98 ahuang98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good overall, just left a few nits

docs/ops.html Outdated
@@ -3948,6 +3948,40 @@ <h4 class="anchor-heading"><a id="others_monitoring" class="anchor-link"></a><a

<h3 class="anchor-heading"><a id="kraft" class="anchor-link"></a><a href="#kraft">6.8 KRaft</a></h3>

<h4 class="anchor-heading"><a id="kraft_upgrade" class="anchor-link"></a><a href="#kraft_upgrade">Upgrade</a></h4>

Apache Kafka 4.1 added support for upgrading cluster from a static controller configuration to a dynamic controller configuration. This feature upgrade is done by upgrading the kraft feature version and updating the nodes configuration.
Copy link
Contributor

@ahuang98 ahuang98 Jun 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nits:
upgrading cluster -> upgrading a cluster

updating the nodes -> updating the nodes'

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

docs/ops.html Outdated

<h5 class="anchor-heading"><a id="kraft_upgrade_describe" class="anchor-link"></a><a href="#kraft_upgrade_describe">Describe KRaft Version</a></h5>

<p>Dynamic controller cluster was added in <code>kraft.version=1</code> or <code>release-version 4.1</code>. To determine which kraft feature version the cluster is using you can execute the following CLI command:</p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: in case it's not self-explanatory, should we got into a bit of detail on what dynamic controller configuration means?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

docs/ops.html Outdated

<p>KRaft version 1 deprecated the <code>controller.quorum.voters</code> property and added the <code>controller.quorum.bootstrap.servers</code> property. After checking that the kraft version has been successfully upgrade to at least version <code>1</code>. Remove the <code>controller.quorum.voters</code> property and add the <code>controller.quorum.bootstrap.servers</code> to all of the nodes (controllers and brokers) in the cluster.</p>

<pre><code class="language-bash">process.roles=...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will it be confusing that we mention these configurations before the Configuration section of the docs? have you considered moving this new section below the Configuration section?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I wonder if putting this in , or near, the existing Controller membership changes section would make more sense.

Copy link
Member Author

@jsancio jsancio Jul 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure. Let me see what I can do. I wanted to document the steps needed to upgrade the KRaft feature version without the user having to jump/read other sections.

It is interesting that you both suggest different sections.

I think we can solve this issue by moving the configuration section first. Above the upgrade the section. The upgrade section can repeat this information by saying that they need to remove controller.quorum.voters and added controller.quorum.bootstrap.servers.

Let me make that change and you can tell me what you think.

Copy link
Member

@mimaison mimaison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! I left a few suggestions.

docs/ops.html Outdated
@@ -3948,6 +3948,40 @@ <h4 class="anchor-heading"><a id="others_monitoring" class="anchor-link"></a><a

<h3 class="anchor-heading"><a id="kraft" class="anchor-link"></a><a href="#kraft">6.8 KRaft</a></h3>

<h4 class="anchor-heading"><a id="kraft_upgrade" class="anchor-link"></a><a href="#kraft_upgrade">Upgrade</a></h4>

Apache Kafka 4.1 added support for upgrading cluster from a static controller configuration to a dynamic controller configuration. This feature upgrade is done by upgrading the kraft feature version and updating the nodes configuration.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kraft -> KRaft
Same below

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

docs/ops.html Outdated

<h5 class="anchor-heading"><a id="kraft_upgrade_config" class="anchor-link"></a><a href="#kraft_upgrade_config">Update KRaft Config</a></h5>

<p>KRaft version 1 deprecated the <code>controller.quorum.voters</code> property and added the <code>controller.quorum.bootstrap.servers</code> property. After checking that the kraft version has been successfully upgrade to at least version <code>1</code>. Remove the <code>controller.quorum.voters</code> property and add the <code>controller.quorum.bootstrap.servers</code> to all of the nodes (controllers and brokers) in the cluster.</p>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

upgrade -> upgraded

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

docs/ops.html Outdated

<p>KRaft version 1 deprecated the <code>controller.quorum.voters</code> property and added the <code>controller.quorum.bootstrap.servers</code> property. After checking that the kraft version has been successfully upgrade to at least version <code>1</code>. Remove the <code>controller.quorum.voters</code> property and add the <code>controller.quorum.bootstrap.servers</code> to all of the nodes (controllers and brokers) in the cluster.</p>

<pre><code class="language-bash">process.roles=...
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I wonder if putting this in , or near, the existing Controller membership changes section would make more sense.

<li><a href="#kraft_config">Configuration</a>
<li><a href="#kraft_storage">Storage Tool</a>
<li><a href="#kraft_nodes">Provisioning Nodes</a>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also add Controller membership changes?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I missed that. Done.

docs/ops.html Outdated
Feature: kraft.version SupportedMinVersion: 0 SupportedMaxVersion: 1 FinalizedVersionLevel: 0 Epoch: 7
Feature: metadata.version SupportedMinVersion: 3.3-IV3 SupportedMaxVersion: 4.0-IV3 FinalizedVersionLevel: 4.0-IV3 Epoch: 7</code></pre>

<p>If the <code>FinalizedVersionLevel</code> for <code>Feature: kraft.version</code> is <code>0</code>, the version need to be upgraded to at least <code>1</code> to support a dynamic controller cluster.</p>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need -> needs

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Member

@mimaison mimaison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mimaison mimaison merged commit e42e01e into apache:trunk Jul 9, 2025
28 checks passed
mimaison pushed a commit that referenced this pull request Jul 9, 2025
Update the documentation to describe how to upgrade the kraft feature
version from 0 to 1.

Reviewers: Mickael Maison <[email protected]>, Alyssa Huang
<[email protected]>
@mimaison
Copy link
Member

mimaison commented Jul 9, 2025

Applied to 4.1 too: b0ff9ba

@jsancio jsancio deleted the kafka-19184-kraft-upgrade-doc branch July 9, 2025 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs small Small PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants