Performing the upgrade using HELM charts

Typical upgrade steps

A lot of the upgrade steps can be performed without impact on your users. Basically, the deployment or upgrade of components is split in two actions:

  1. Configuration changes, such as added or changed configuration parameters, including the new component’s version

  2. Deployment of the upgraded component, using the helm upgrade command.

Performing the upgrade

Step 1 - Upgrade Axual Platform

Verify in your values.yaml, the global configurations for replicationFactor, minISR & nodes are set to correct values.

Example:

global:
  # Properties defined for cluster services
  cluster:
    enabled: true
    kafka:
      nodes: 3
      replicationFactor: 3
      minIsr: 2

Perform the upgrade with the helm upgrade command, as follows:

helm upgrade --install platform axual-stable/platform -f values.yaml --version=0.7.0 -n kafka

Verify below services pod should restart with following versions:

  • Cluster API: 2.1.1

  • Cluster Browse: 1.3.0

  • Instance API: 3.3.0

  • Stream Browse: 1.2.1

  • Schema Registry Slave: 5.3.0

  • Schema Registry Master: 5.3.0

  • Operation Manager: 1.2.0

  • Mgmt API: 6.8.1

  • Mgmt UI: 6.1.0

Before continuing to the next step, make sure services are running without any error.

Step 2 - Prepare the CRDs

The Custom Resource Definitions (CRDs) need to support the v1beta2 version of the API. To achieve that, we use the API Conversion tool, provided by the Strimzi maintainers on version 0.24.0.

Download the compressed directory containing the conversion tool (api-conversion-0.24.0) from the release page and expand it in your file system.

Step 2a - Perform the conversion

The following step requires certain admin permissions. Once confirmed that those permissions are in place you can proceed.

Run the API conversion tool with the crd-upgrade command. The command along with the expected output should look like the following:

$ bin/api-conversion.sh crd-upgrade

Changing stored version in all Strimzi CRDs to v1beta2:
Updating KafkaConnector CRD
...
Updating KafkaConnectS2I CRD

Updating all Strimzi CRs to be stored under v1beta2:
Updating Kafka local to be stored as v1beta2

Changing stored version in statuses of all Strimzi CRDs to v1beta2:
Updating KafkaConnector CRD
...
Updating KafkaConnectS2I CRD

Verify that the CRDs have been upgraded so that v1beta2 is the storage version before continuing. The following command will check the above for CRD kafkas.kafka.strimzi.io:

kubectl get crd kafkas.kafka.strimzi.io -o jsonpath='{.status.storedVersions}'

Step 3 - Upgrade Axual Operator to 0.4.0

Step 3a - Upgrade Axual Operator

  1. Update the Axual helm repository to download the latest charts available

    helm repo update
  2. Verify the kafka version is set to 2.7.0 in core.kafka.kafka.version

  3. Upgrade Axual Operator

    helm upgrade --install strimzi --set watchAnyNamespace=true axual-stable/axual-operator --version=0.4.0 -n kafka

This command will restart the strimzi-cluster-operator, zookeeper and kafka pods.

Verify the upgrade by checking the pods and their images:

  • strimzi-cluster-operator pod uses image: docker.axual.io/axual/strimzi/operator:0.25.0

  • zookeeper pod uses image: docker.axual.io/axual/strimzi/kafka:0.25.0-kafka-2.7.0

  • kafka pod uses image: docker.axual.io/axual/strimzi/kafka:0.25.0-kafka-2.7.0

Once restarted, verify everything is running fine before moving to next step.

Step 4 - Upgrade Axual Operator CRDs

You can skip this step if deploying via ArgoCD as it automatically includes the CRDs.

  1. Download CRDs

    helm pull axual-stable/axual-operator --version 0.4.0
  2. Extract the downloaded tar file

    tar xvzf axual-operator-0.4.0.tgz
  3. Upgrade CRDs using kubectl as there is no support at this time for upgrading CRDs using Helm

    kubectl replace -f ./axual-operator/crds/

Step 5 - Upgrade Kafka to 2.8.0

After Axual Operator has been upgraded, Kafka can be upgraded to version 2.8.0. The upgrade of Kafka is executed in two steps: upgrading the Kafka binaries and upgrading the inter.broker.protocol.version and log.format.version. For both steps, a rolling restart of all the brokers is executed.

  1. Modify the Kafka version in your values.yaml file

    Example:

    platform:
      core:
        kafka:
          kafka:
            version: 2.8.0
            ...
            config:
              inter.broker.protocol.version: "2.7"
              log.message.format.version: "2.7"
              ...
  2. Upgrade Axual platform using the above modified values.yaml.

    helm upgrade --install platform axual-stable/platform -f values.yaml --version=0.7.0 -n kafka

    Verify:

    • Zookeeper will perform a rolling restart with a new docker image (0.25.0-kafka-2.8.0).

    • Kafka brokers will perform a rolling restart with a new docker image (0.25.0-kafka-2.8.0).

    • Verify everything is running fine.

  3. Edit your values.yaml again and update broker config inter.broker.protocol.version & log.message.format.version to 2.8.

    Example:

    platform:
      core:
        kafka:
          kafka:
            version: 2.8.0
            ...
            config:
              inter.broker.protocol.version: "2.8"
              log.message.format.version: "2.8"
              ...

    Apply above changes:

    helm upgrade --install platform axual-stable/platform -f values.yaml --version=0.7.0 -n kafka

    Verify

    • Kafka brokers will perform a rolling restart with a new docker image (0.25.0-kafka-2.8.0). Once restarted verify everything is running fine.

That’s it!

No other steps are required to upgrade or configure the platform components. You can read through the release blog to find out what has changed since the last release and forward it to your colleagues.