Updated on 2025-08-21 GMT+08:00

Upgrading the Kafka Instance Kernel

Upgrade your Kafka instance kernel to use the latest kernel version. A kernel upgrade adds certain new features and resolves certain earlier issues. For example, new features may include consumer group creation on the console and topic details viewing.

Kafka instance kernel upgrades have no impact on the Kafka version. For example, if you use Kafka 2.7, you will still be using it after a kernel upgrade.

Impact of Kernel Upgrades

  • Single-replica topics do not support message production and consumption during an upgrade, which will cause service interruptions.
  • If a topic has multiple replicas, upgrades do not interrupt services. Brokers are restarted in sequence and workload is born on remaining brokers. Evaluate this impact and avoid peak hours.
  • Brokers will be upgraded one by one. The software package and data of each broker will be updated. Upgrading the software package takes about 5 minutes. Synchronizing the data takes longer as the data volume of other brokers' leader replica becomes larger. Total upgrade duration = Software package upgrade duration of each broker + Data synchronization duration
  • The monitoring process is restarted and the monitoring data is lost for each broker during the upgrade. The monitoring continues after the restart is complete.
  • During an upgrade, broker restarts will cause partition leader switches, interrupting connections in seconds. The switch takes less than a minute when networks are stable. For multi-replica topics, configure retries on the producer client. To do so:
    • Open-source Kafka client: Set the retries parameter to 3, 4, or 5.
    • Flink: Configure the retry policy by referring to the following code:
      StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
      env.setRestartStrategy(RestartStrategies.fixedDelayRestart(3, Time.seconds(20)));

Prerequisites

The instance must be in the Running state.

Procedure

  1. Log in to the Kafka console.
  2. Click in the upper left corner to select the region where your instance is located.
  3. Upgrade a Kafka instance using either of the following methods:

    • Choose More > Upgrade in the row containing the desired instance.
    • Click the name of the Kafka instance to go to the instance details page. Choose > Upgrade in the upper right corner.

  4. Set Execute to Now or As scheduled.

    If you select As scheduled, specify date and time.

  5. In the Risk Check area, check whether the items are normal.

    If any risk is found, handle it as prompted and click Recheck. If the risk does not need to be handled, select I understand the risks.

  6. Click OK.

    The method of checking the upgrade result depends on when the upgrade is executed.

    Table 1 Checking the upgrade result

    Execution

    Check Method

    Now

    1. Click an instance name to go to the instance details page.
    2. Choose Instance > Background Tasks in the navigation pane.
    3. Check the upgrade task status on the Current Tasks tab page.
      • The upgrade is complete when the task is in the Successful state.
      • The upgrade failed when the task is in the Failed state. Contact customer service.

    As scheduled

    1. Click an instance name to go to the instance details page.
    2. Choose Instance > Background Tasks in the navigation pane.
    3. On the Scheduled tasks tab page, check whether the upgrade task is started.
      • The task has not been started when it is in the Pending state.
      • The task has been started when it is in the Successful state.
    4. Check the upgrade task status on the Current Tasks tab page.
      • The upgrade is complete when the task is in the Successful state.
      • The upgrade failed when the task is in the Failed state. Contact customer service.

Modifying Scheduled Upgrade Tasks

  1. Go to the Scheduled tasks tab page on the Instance > Background Tasks page, click the drop-down box in the upper left corner and select a period. Enter "upgrade" in the search box and press Enter.
  2. Click Modify in the row containing the desired task.
  3. In the Change Schedule dialog box, reschedule or cancel the task.

    • To reschedule: Specify a new time and click OK.
    • To cancel: Select Cancel and click OK.

Related Document

To upgrade the kernel version of a Kafka instance by calling an API, see Upgrading an Instance.