Chapter 15. AMQ Streams resource upgrades


For this release of AMQ Streams, resources that use the API version kafka.strimzi.io/v1alpha1 must be updated to use kafka.strimzi.io/v1beta1.

The kafka.strimzi.io/v1alpha1 API version is deprecated.

This section describes the upgrade steps for the resources.

Important

The upgrade of resources must be performed after upgrading the Cluster Operator, so the Cluster Operator can understand the resources.

What if the resource upgrade does not take effect?

If the upgrade does not take effect, a warning is given in the logs on reconciliation to indicate that the resource cannot be updated until the apiVersion is updated.

To trigger the update, make a cosmetic change to the custom resource, such as adding an annotation.

Example annotation:

Copy to Clipboard Toggle word wrap
metadata:
  # ...
  annotations:
    upgrade: "Upgraded to kafka.strimzi.io/v1beta1"

15.1. Upgrading Kafka resources

Prerequisites

  • A Cluster Operator supporting the v1beta1 API version is up and running.

Procedure

Execute the following steps for each Kafka resource in your deployment.

  1. Update the Kafka resource in an editor.

    Copy to Clipboard Toggle word wrap
    oc edit kafka my-cluster
  2. Replace:

    Copy to Clipboard Toggle word wrap
    apiVersion: kafka.strimzi.io/v1alpha1

    with:

    Copy to Clipboard Toggle word wrap
    apiVersion:kafka.strimzi.io/v1beta1
  3. If the Kafka resource has:

    Copy to Clipboard Toggle word wrap
    Kafka.spec.topicOperator

    Replace it with:

    Copy to Clipboard Toggle word wrap
    Kafka.spec.entityOperator.topicOperator

    For example, replace:

    Copy to Clipboard Toggle word wrap
    spec:
      # ...
      topicOperator: {}

    with:

    Copy to Clipboard Toggle word wrap
    spec:
      # ...
      entityOperator:
        topicOperator: {}
  4. If present, move:

    Copy to Clipboard Toggle word wrap
    Kafka.spec.entityOperator.affinity
    Copy to Clipboard Toggle word wrap
    Kafka.spec.entityOperator.tolerations

    to:

    Copy to Clipboard Toggle word wrap
    Kafka.spec.entityOperator.template.pod.affinity
    Copy to Clipboard Toggle word wrap
    Kafka.spec.entityOperator.template.pod.tolerations

    For example, move:

    Copy to Clipboard Toggle word wrap
    spec:
      # ...
      entityOperator:
        affinity {}
        tolerations {}

    to:

    Copy to Clipboard Toggle word wrap
    spec:
      # ...
      entityOperator:
        template:
          pod:
            affinity {}
            tolerations {}
  5. If present, move:

    Copy to Clipboard Toggle word wrap
    Kafka.spec.kafka.affinity
    Copy to Clipboard Toggle word wrap
    Kafka.spec.kafka.tolerations

    to:

    Copy to Clipboard Toggle word wrap
    Kafka.spec.kafka.template.pod.affinity
    Copy to Clipboard Toggle word wrap
    Kafka.spec.kafka.template.pod.tolerations

    For example, move:

    Copy to Clipboard Toggle word wrap
    spec:
      # ...
      kafka:
        affinity {}
        tolerations {}

    to:

    Copy to Clipboard Toggle word wrap
    spec:
      # ...
      kafka:
        template:
          pod:
            affinity {}
            tolerations {}
  6. If present, move:

    Copy to Clipboard Toggle word wrap
    Kafka.spec.zookeeper.affinity
    Copy to Clipboard Toggle word wrap
    Kafka.spec.zookeeper.tolerations

    to:

    Copy to Clipboard Toggle word wrap
    Kafka.spec.zookeeper.template.pod.affinity
    Copy to Clipboard Toggle word wrap
    Kafka.spec.zookeeper.template.pod.tolerations

    For example, move:

    Copy to Clipboard Toggle word wrap
    spec:
      # ...
      zookeeper:
        affinity {}
        tolerations {}

    to:

    Copy to Clipboard Toggle word wrap
    spec:
      # ...
      zookeeper:
        template:
          pod:
            affinity {}
            tolerations {}
  7. Save the file, exit the editor and wait for the updated resource to be reconciled.

15.2. Upgrading Kafka Connect resources

Prerequisites

  • A Cluster Operator supporting the v1beta1 API version is up and running.

Procedure

Execute the following steps for each KafkaConnect resource in your deployment.

  1. Update the KafkaConnect resource in an editor.

    Copy to Clipboard Toggle word wrap
    oc edit kafkaconnect my-connect
  2. Replace:

    Copy to Clipboard Toggle word wrap
    apiVersion: kafka.strimzi.io/v1alpha1

    with:

    Copy to Clipboard Toggle word wrap
    apiVersion:kafka.strimzi.io/v1beta1
  3. If present, move:

    Copy to Clipboard Toggle word wrap
    KafkaConnect.spec.affinity
    Copy to Clipboard Toggle word wrap
    KafkaConnect.spec.tolerations

    to:

    Copy to Clipboard Toggle word wrap
    KafkaConnect.spec.template.pod.affinity
    Copy to Clipboard Toggle word wrap
    KafkaConnect.spec.template.pod.tolerations

    For example, move:

    Copy to Clipboard Toggle word wrap
    spec:
      # ...
      affinity {}
      tolerations {}

    to:

    Copy to Clipboard Toggle word wrap
    spec:
      # ...
      template:
        pod:
          affinity {}
          tolerations {}
  4. Save the file, exit the editor and wait for the updated resource to be reconciled.

15.3. Upgrading Kafka Connect S2I resources

Prerequisites

  • A Cluster Operator supporting the v1beta1 API version is up and running.

Procedure

Execute the following steps for each KafkaConnectS2I resource in your deployment.

  1. Update the KafkaConnectS2I resource in an editor.

    Copy to Clipboard Toggle word wrap
    oc edit kafkaconnects2i my-connect
  2. Replace:

    Copy to Clipboard Toggle word wrap
    apiVersion: kafka.strimzi.io/v1alpha1

    with:

    Copy to Clipboard Toggle word wrap
    apiVersion:kafka.strimzi.io/v1beta1
  3. If present, move:

    Copy to Clipboard Toggle word wrap
    KafkaConnectS2I.spec.affinity
    Copy to Clipboard Toggle word wrap
    KafkaConnectS2I.spec.tolerations

    to:

    Copy to Clipboard Toggle word wrap
    KafkaConnectS2I.spec.template.pod.affinity
    Copy to Clipboard Toggle word wrap
    KafkaConnectS2I.spec.template.pod.tolerations

    For example, move:

    Copy to Clipboard Toggle word wrap
    spec:
      # ...
      affinity {}
      tolerations {}

    to:

    Copy to Clipboard Toggle word wrap
    spec:
      # ...
      template:
        pod:
          affinity {}
          tolerations {}
  4. Save the file, exit the editor and wait for the updated resource to be reconciled.

15.4. Upgrading Kafka MirrorMaker resources

Prerequisites

  • A Cluster Operator supporting the v1beta1 API version is up and running.

Procedure

Execute the following steps for each KafkaMirrorMaker resource in your deployment.

  1. Update the KafkaMirrorMaker resource in an editor.

    Copy to Clipboard Toggle word wrap
    oc edit kafkamirrormaker my-connect
  2. Replace:

    Copy to Clipboard Toggle word wrap
    apiVersion: kafka.strimzi.io/v1alpha1

    with:

    Copy to Clipboard Toggle word wrap
    apiVersion:kafka.strimzi.io/v1beta1
  3. If present, move:

    Copy to Clipboard Toggle word wrap
    KafkaConnectMirrorMaker.spec.affinity
    Copy to Clipboard Toggle word wrap
    KafkaConnectMirrorMaker.spec.tolerations

    to:

    Copy to Clipboard Toggle word wrap
    KafkaConnectMirrorMaker.spec.template.pod.affinity
    Copy to Clipboard Toggle word wrap
    KafkaConnectMirrorMaker.spec.template.pod.tolerations

    For example, move:

    Copy to Clipboard Toggle word wrap
    spec:
      # ...
      affinity {}
      tolerations {}

    to:

    Copy to Clipboard Toggle word wrap
    spec:
      # ...
      template:
        pod:
          affinity {}
          tolerations {}
  4. Save the file, exit the editor and wait for the updated resource to be reconciled.

15.5. Upgrading Kafka Topic resources

Prerequisites

  • A Topic Operator supporting the v1beta1 API version is up and running.

Procedure

Execute the following steps for each KafkaTopic resource in your deployment.

  1. Update the KafkaTopic resource in an editor.

    Copy to Clipboard Toggle word wrap
    oc edit kafkatopic my-topic
  2. Replace:

    Copy to Clipboard Toggle word wrap
    apiVersion: kafka.strimzi.io/v1alpha1

    with:

    Copy to Clipboard Toggle word wrap
    apiVersion:kafka.strimzi.io/v1beta1
  3. Save the file, exit the editor and wait for the updated resource to be reconciled.

15.6. Upgrading Kafka User resources

Prerequisites

  • A User Operator supporting the v1beta1 API version is up and running.

Procedure

Execute the following steps for each KafkaUser resource in your deployment.

  1. Update the KafkaUser resource in an editor.

    Copy to Clipboard Toggle word wrap
    oc edit kafkauser my-user
  2. Replace:

    Copy to Clipboard Toggle word wrap
    apiVersion: kafka.strimzi.io/v1alpha1

    with:

    Copy to Clipboard Toggle word wrap
    apiVersion:kafka.strimzi.io/v1beta1
  3. Save the file, exit the editor and wait for the updated resource to be reconciled.
Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2025 Red Hat, Inc.