Upgrade Standalone Kafka

This topic provides steps to start a standalone Kafka cluster in ZooKeeper mode, validate its functionality, and perform a rolling upgrade from Kafka 2.8.2.3.3.6.x-x to Kafka 3.7.2.3.3.6.x-x.

Starting Kafka(2.8.2.3.3.6.x-x) in ZooKeeper Mode

For details about the ODP Standalone Binaries, see Accessing Acceldata Repositories.

  1. Start the ZooKeeper Service using the following command.
Bash
Copy
  1. Start the Kafka Broker Service. Open another terminal session and run the following command.
Bash
Copy

Once all the services are successfully launched, you have a basic Kafka environment ready for use.

Pre-upgrade Validation

Before proceeding with the upgrade, validate the Kafka setup by performing the following steps:

  1. List Topics
Bash
Copy

Example output:

Bash
Copy
  1. Create a Same Topic
Bash
Copy

Example output:

Bash
Copy
  1. Write Events into the Topic
Bash
Copy

Input:

Bash
Copy

Terminate with CTRL+C.

  1. Read Events from the Topic
Bash
Copy

Example output:

Bash
Copy

Rolling Upgrade Steps

To perform a rolling upgrade from Kafka 2.8.2.3.3.6.x-x to Kafka 3.7.2.3.3.6.x-x, follow these steps:

  1. Update server.properties on All Brokers. Edit server.properties and add the following property:
Bash
Copy
  1. Upgrade Brokers One at a Time. On each broker, perform the following steps:

    1. Shut down the broker.
    2. Update the code by replacing the bin and libs directories with kafka_2.12-3.7.1.3.3.6.x-x.
    3. Restart the broker.
  2. Verify Cluster Behavior. Once all brokers are upgraded, ensure that the cluster is functioning correctly by monitoring logs and metrics. Also try to read events from the topic which are written in the above steps:

Bash
Copy

Example output:

Bash
Copy
  1. Update Protocol Version. Once satisfied with the stability, update server.properties:
Bash
Copy
  1. Restart Brokers One After the Other: Restart each broker sequentially for the new protocol version to take effect.

After this step, downgrading to an older Kafka version is no longer possible.

For more details, see Upgrading Apache Kafka.

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard
  Last updated