Upgrade Confluent Platform

When you upgrade Confluent Platform from one version to another, we recommend that you perform the upgrade process separate from making other changes to your clusters, such as scaling up, changing configuration, or rotating credentials.

Note that there are certain configurations that cannot be updated on deployed clusters. See Upgrades and updates for this list.

Upgrade notes

The ZooKeeper dependency has been upgraded to 3.8.1 due to 3.6 reaching end-of-life. To bring both your Kafka and ZooKeeper clusters to the latest versions:

(Case A) If upgrading from a Kafka version 2.4 (Confluent Platform version 5.4) or later:

  1. Kafka clusters can be updated directly.
  2. ZooKeeper clusters that are running binaries bundled with Kafka versions 2.4 or later can be updated normally as specified in Upgrade Confluent Platform.

(Case B) If upgrading from a Kafka version older than 2.4 (Confluent Platform version older than 5.4):

  1. Kafka clusters first need to be upgraded to a version 2.4 or later, and earlier than 3.6.
  2. ZooKeeper clusters that are running binaries bundled with a Kafka version that are older than 2.4 need to be updated to the binaries bundled with Kafka versions later than 2.4 and earlier than 3.6.
  3. You could then continue following the steps in Case A above.

Upgrade Confluent Platform

Upgrade Confluent Platform components in the following order:

  1. ZooKeeper
  2. Kafka
  3. Other Confluent Platform components, excluding Control Center, in any order
  4. Control Center

Upgrade each Confluent Platform component as below:

  1. In the component CR, update the component image tag. The tag is the Confluent Platform release you want to upgrade to.

    spec:
      image:
        application: <component image>:<tag>
    

    For example, to upgrade Kafka to 7.5.4:

    spec:
      image:
        application: confluentinc/cp-server:7.5.4
    
  2. In the same component CR, verify that the CFK init container image tag has been updated during the CFK upgrade process. The image tag should be the current version of CFK, 2.7.5.

    spec:
      image:
        init: confluentinc/confluent-init-container:2.7.5
    
  3. When upgrading Control Center:

    If you migrated from Operator 1.x to CFK 2.3.0 or lower, and then you are upgrading to CFK 2.4.0 or higher with Confluent Platform version 7.1 or lower, set the following property in the Control Center CR:

    configOverrides:
      server:
        - confluent.controlcenter.internal.topics.partitions=4
    
  4. When upgrading ZooKeeper-based Kafka:

    1. Set the following properties in the Kafka CR to the broker protocol version of the currently installed Confluent Platform version. To get the broker protocol version, refer to the table in Kafka upgrade documentation.

      If you are upgrading from Confluent Platform version 6.2.x or earlier, set log.message.format.version to the version you are upgrading from as shown below.

      If you are upgrading from Confluent Platform version 7.0 or later, you do not need to set log.message.format.version.

      spec:
        configOverrides:
          server:
            - inter.broker.protocol.version=<current Kafka broker protocol version>
            - log.message.format.version=<current Kafka broker protocol version>
      
    2. Upgrade Kafka:

      kubectl apply -f <Kafka CR> --name <namespace>
      
    3. After the Kafka brokers have been upgraded, set the properties in the Kafka CR to the target Kafka broker protocol version, 3.5:

      spec:
        configOverrides:
          server:
            - inter.broker.protocol.version=3.5
      
  5. Upgrade the component.

    kubectl apply -f <component CR> --name <namespace>
    

Upgrade Kafka in the KRaft-mode

Upgrade Kafka that is deployed in the KRaft mode to the latest version in the following steps:

  1. In the Kafka CR, update the component image tag. The tag is the Confluent Platform release you want to upgrade to.

    kind: Kafka
    spec:
      image:
        application: confluentinc/cp-server:<tag>
    

    For example, to upgrade Kafka to 7.5.4:

    kind: Kafka
    spec:
      image:
        application: confluentinc/cp-server:7.5.4
    
  2. In the same Kafka CR, verify that the CFK init container image tag has been updated during the CFK upgrade process. The image tag should be the current version of CFK, 2.7.5.

    spec:
      image:
        init: confluentinc/confluent-init-container:2.7.5
    
  3. Upgrade Kafka.

    kubectl apply -f <Kafka CR> --name <namespace>
    
  4. After verifying that the cluster behavior and performance meet your expectations, increment the metadata.version for the controllers and brokers by running the kafka-features tool with the upgrade argument:

    ./bin/kafka-features upgrade --bootstrap-server <server:port> --metadata 3.5
    

    For information about the metadata version, see Upgrade Kafka brokers in the KRaft-mode.