Chapter 7. Upgrading AMQ Streams
AMQ Streams can be upgraded with no cluster downtime. Each version of AMQ Streams supports one or more versions of Apache Kafka. You can upgrade to a higher Kafka version as long as it is supported by your version of AMQ Streams. In some cases, you can also downgrade to a lower supported Kafka version.
Newer versions of AMQ Streams may support newer versions of Kafka, but you need to upgrade AMQ Streams before you can upgrade to a higher supported Kafka version.
If applicable, Resource upgrades must be performed after upgrading AMQ Streams and Kafka.
7.1. AMQ Streams and Kafka upgrades
Upgrading AMQ Streams is a two-stage process. To upgrade brokers and clients without downtime, you must complete the upgrade procedures in the following order:
Update your Cluster Operator to the latest AMQ Streams version.
Upgrade all Kafka brokers and client applications to the latest Kafka version.
7.1.1. Kafka versions
Kafka’s log message format version and inter-broker protocol version specify the log format version appended to messages and the version of protocol used in a cluster. As a result, the upgrade process involves making configuration changes to existing Kafka brokers and code changes to client applications (consumers and producers) to ensure the correct versions are used.
The following table shows the differences between Kafka versions:
Kafka version | Interbroker protocol version | Log message format version | ZooKeeper version |
---|---|---|---|
2.4.0 | 2.4 | 2.4 | 3.5.7 |
2.5.0 | 2.5 | 2.5 | 3.5.8 |
Message format version
When a producer sends a message to a Kafka broker, the message is encoded using a specific format. The format can change between Kafka releases, so messages include a version identifying which version of the format they were encoded with. You can configure a Kafka broker to convert messages from newer format versions to a given older format version before the broker appends the message to the log.
In Kafka, there are two different methods for setting the message format version:
-
The
message.format.version
property is set on topics. -
The
log.message.format.version
property is set on Kafka brokers.
The default value of message.format.version
for a topic is defined by the log.message.format.version
that is set on the Kafka broker. You can manually set the message.format.version
of a topic by modifying its topic configuration.
The upgrade tasks in this section assume that the message format version is defined by the log.message.format.version
.
7.1.2. Upgrading the Cluster Operator
The steps to upgrade your Cluster Operator deployment to use AMQ Streams 1.5 are outlined in this section.
The availability of Kafka clusters managed by the Cluster Operator is not affected by the upgrade operation.
Refer to the documentation supporting a specific version of AMQ Streams for information on how to upgrade to that version.
7.1.2.1. Upgrading the Cluster Operator to a later version
This procedure describes how to upgrade a Cluster Operator deployment to a later version.
Prerequisites
- An existing Cluster Operator deployment is available.
- You have downloaded the installation files for the new version.
Procedure
-
Take note of any configuration changes made to the existing Cluster Operator resources (in the
/install/cluster-operator
directory). Any changes will be overwritten by the new version of the Cluster Operator. Update the Cluster Operator.
Modify the installation files for the new version according to the namespace the Cluster Operator is running in.
On Linux, use:
sed -i 's/namespace: .*/namespace: my-cluster-operator-namespace/' install/cluster-operator/*RoleBinding*.yaml
sed -i 's/namespace: .*/namespace: my-cluster-operator-namespace/' install/cluster-operator/*RoleBinding*.yaml
Copy to Clipboard Copied! On MacOS, use:
sed -i '' 's/namespace: .*/namespace: my-cluster-operator-namespace/' install/cluster-operator/*RoleBinding*.yaml
sed -i '' 's/namespace: .*/namespace: my-cluster-operator-namespace/' install/cluster-operator/*RoleBinding*.yaml
Copy to Clipboard Copied! -
If you modified one or more environment variables in your existing Cluster Operator
Deployment
, edit theinstall/cluster-operator/050-Deployment-cluster-operator.yaml
file to use those environment variables.
When you have an updated configuration, deploy it along with the rest of the installation resources:
oc apply -f install/cluster-operator
oc apply -f install/cluster-operator
Copy to Clipboard Copied! Wait for the rolling updates to complete.
Get the image for the Kafka pod to ensure the upgrade was successful:
oc get po my-cluster-kafka-0 -o jsonpath='{.spec.containers[0].image}'
oc get po my-cluster-kafka-0 -o jsonpath='{.spec.containers[0].image}'
Copy to Clipboard Copied! The image tag shows the new AMQ Streams version followed by the Kafka version. For example,
<New AMQ Streams version>-kafka-<Current Kafka version>
.Update existing resources to handle deprecated custom resource properties.
You now have an updated Cluster Operator, but the version of Kafka running in the cluster it manages is unchanged.
What to do next
Following the Cluster Operator upgrade, you can perform a Kafka upgrade.
7.1.3. Upgrading Kafka
After you have upgraded your Cluster Operator, you can upgrade your brokers to a higher supported version of Kafka.
Kafka upgrades are performed using the Cluster Operator. How the Cluster Operator performs an upgrade depends on the differences between versions of:
- Interbroker protocol
- Log message format
- ZooKeeper
When the versions are the same for the current and target Kafka version, as is typically the case for a patch level upgrade, the Cluster Operator can upgrade through a single rolling update of the Kafka brokers.
When one or more of these versions differ, the Cluster Operator requires two or three rolling updates of the Kafka brokers to perform the upgrade.
Additional resources
7.1.3.1. Kafka version and image mappings
When upgrading Kafka, consider your settings for the STRIMZI_KAFKA_IMAGES
and Kafka.spec.kafka.version
properties.
-
Each
Kafka
resource can be configured with aKafka.spec.kafka.version
. The Cluster Operator’s
STRIMZI_KAFKA_IMAGES
environment variable provides a mapping between the Kafka version and the image to be used when that version is requested in a givenKafka
resource.-
If
Kafka.spec.kafka.image
is not configured, the default image for the given version is used. -
If
Kafka.spec.kafka.image
is configured, the default image is overridden.
-
If
The Cluster Operator cannot validate that an image actually contains a Kafka broker of the expected version. Take care to ensure that the given image corresponds to the given Kafka version.
7.1.3.2. Strategies for upgrading clients
The best approach to upgrading your client applications (including Kafka Connect connectors) depends on your particular circumstances.
Consuming applications need to receive messages in a message format that they understand. You can ensure that this is the case in one of two ways:
- By upgrading all the consumers for a topic before upgrading any of the producers.
- By having the brokers down-convert messages to an older format.
Using broker down-conversion puts extra load on the brokers, so it is not ideal to rely on down-conversion for all topics for a prolonged period of time. For brokers to perform optimally they should not be down converting messages at all.
Broker down-conversion is configured in two ways:
-
The topic-level
message.format.version
configures it for a single topic. -
The broker-level
log.message.format.version
is the default for topics that do not have the topic-levelmessage.format.version
configured.
Messages published to a topic in a new-version format will be visible to consumers, because brokers perform down-conversion when they receive messages from producers, not when they are sent to consumers.
There are a number of strategies you can use to upgrade your clients:
- Consumers first
- Upgrade all the consuming applications.
-
Change the broker-level
log.message.format.version
to the new version. Upgrade all the producing applications.
This strategy is straightforward, and avoids any broker down-conversion. However, it assumes that all consumers in your organization can be upgraded in a coordinated way, and it does not work for applications that are both consumers and producers. There is also a risk that, if there is a problem with the upgraded clients, new-format messages might get added to the message log so that you cannot revert to the previous consumer version.
- Per-topic consumers first
For each topic:
- Upgrade all the consuming applications.
-
Change the topic-level
message.format.version
to the new version. Upgrade all the producing applications.
This strategy avoids any broker down-conversion, and means you can proceed on a topic-by-topic basis. It does not work for applications that are both consumers and producers of the same topic. Again, it has the risk that, if there is a problem with the upgraded clients, new-format messages might get added to the message log.
- Per-topic consumers first, with down conversion
For each topic:
-
Change the topic-level
message.format.version
to the old version (or rely on the topic defaulting to the broker-levellog.message.format.version
). - Upgrade all the consuming and producing applications.
- Verify that the upgraded applications function correctly.
Change the topic-level
message.format.version
to the new version.This strategy requires broker down-conversion, but the load on the brokers is minimized because it is only required for a single topic (or small group of topics) at a time. It also works for applications that are both consumers and producers of the same topic. This approach ensures that the upgraded producers and consumers are working correctly before you commit to using the new message format version.
The main drawback of this approach is that it can be complicated to manage in a cluster with many topics and applications.
-
Change the topic-level
Other strategies for upgrading client applications are also possible.
It is also possible to apply multiple strategies. For example, for the first few applications and topics the "per-topic consumers first, with down conversion" strategy can be used. When this has proved successful another, more efficient strategy can be considered acceptable to use instead.
7.1.3.3. Upgrading Kafka brokers and client applications
This procedure describes how to upgrade a AMQ Streams Kafka cluster to a higher version of Kafka.
Prerequisites
For the Kafka
resource to be upgraded, check:
- The Cluster Operator, which supports both versions of Kafka, is up and running.
-
The
Kafka.spec.kafka.config
does not contain options that are not supported in the version of Kafka that you are upgrading to. Whether the
log.message.format.version
for the current Kafka version needs to be updated for the new version.
Procedure
Update the Kafka cluster configuration in an editor, as required:
oc edit kafka my-cluster
oc edit kafka my-cluster
Copy to Clipboard Copied! If the
log.message.format.version
of the current Kafka version is the same as that of the new Kafka version, proceed to the next step.Otherwise, ensure that
Kafka.spec.kafka.config
has thelog.message.format.version
configured to the default for the current version.For example, if upgrading from Kafka 2.4.1:
kind: Kafka spec: # ... kafka: version: 2.4.1 config: log.message.format.version: "2.4" # ...
kind: Kafka spec: # ... kafka: version: 2.4.1 config: log.message.format.version: "2.4" # ...
Copy to Clipboard Copied! If the
log.message.format.version
is unset, set it to the current version.NoteThe value of
log.message.format.version
must be a string to prevent it from being interpreted as a floating point number.Change the
Kafka.spec.kafka.version
to specify the new version (leaving thelog.message.format.version
as the current version).For example, if upgrading from Kafka 2.4.1 to 2.5.0:
apiVersion: v1alpha1 kind: Kafka spec: # ... kafka: version: 2.5.0 config: log.message.format.version: "2.4" # ...
apiVersion: v1alpha1 kind: Kafka spec: # ... kafka: version: 2.5.0
1 config: log.message.format.version: "2.4"
2 # ...
Copy to Clipboard Copied! If the image for the Kafka version is different from the image defined in
STRIMZI_KAFKA_IMAGES
for the Cluster Operator, updateKafka.spec.kafka.image
.
Save and exit the editor, then wait for rolling updates to complete.
NoteAdditional rolling updates occur if the new version of Kafka has a new ZooKeeper version.
Check the update in the logs or by watching the pod state transitions:
oc logs -f <cluster-operator-pod-name> | grep -E "Kafka version upgrade from [0-9.]+ to [0-9.]+, phase ([0-9]+) of \1 completed"
oc logs -f <cluster-operator-pod-name> | grep -E "Kafka version upgrade from [0-9.]+ to [0-9.]+, phase ([0-9]+) of \1 completed"
Copy to Clipboard Copied! oc get po -w
oc get po -w
Copy to Clipboard Copied! If the current and new versions of Kafka have different interbroker protocol versions, check the Cluster Operator logs for an
INFO
level message:Reconciliation #<num>(watch) Kafka(<namespace>/<name>): Kafka version upgrade from <from-version> to <to-version>, phase 2 of 2 completed
Reconciliation #<num>(watch) Kafka(<namespace>/<name>): Kafka version upgrade from <from-version> to <to-version>, phase 2 of 2 completed
Copy to Clipboard Copied! Alternatively, if the current and new versions of Kafka have the same interbroker protocol version, check for:
Reconciliation #<num>(watch) Kafka(<namespace>/<name>): Kafka version upgrade from <from-version> to <to-version>, phase 1 of 1 completed
Reconciliation #<num>(watch) Kafka(<namespace>/<name>): Kafka version upgrade from <from-version> to <to-version>, phase 1 of 1 completed
Copy to Clipboard Copied! The rolling updates:
- Ensure each pod is using the broker binaries for the new version of Kafka
Configure the brokers to send messages using the interbroker protocol of the new version of Kafka
NoteClients are still using the old version, so brokers will convert messages to the old version before sending them to the clients. To minimize this additional load, update the clients as quickly as possible.
Depending on your chosen strategy for upgrading clients, upgrade all client applications to use the new version of the client binaries.
See Section 7.1.3.2, “Strategies for upgrading clients”
WarningYou cannot downgrade after completing this step. If you need to revert the update at this point, follow the procedure Section 7.1.4.2, “Downgrading Kafka brokers and client applications”.
If required, set the version property for Kafka Connect and MirrorMaker as the new version of Kafka:
-
For Kafka Connect, update
KafkaConnect.spec.version
-
For MirrorMaker, update
KafkaMirrorMaker.spec.version
-
For Kafka Connect, update
If the
log.message.format.version
identified in step 1 is the same as the new version proceed to the next step.Otherwise change the
log.message.format.version
inKafka.spec.kafka.config
to the default version for the new version of Kafka now being used.For example, if upgrading to 2.5.0:
apiVersion: v1alpha1 kind: Kafka spec: # ... kafka: version: 2.5.0 config: log.message.format.version: "2.5" # ...
apiVersion: v1alpha1 kind: Kafka spec: # ... kafka: version: 2.5.0 config: log.message.format.version: "2.5" # ...
Copy to Clipboard Copied! Wait for the Cluster Operator to update the cluster.
The Kafka cluster and clients are now using the new Kafka version.
Additional resources
- See Section 7.1.4.2, “Downgrading Kafka brokers and client applications” for the procedure to downgrade a AMQ Streams Kafka cluster from one version to a lower version.
7.1.3.4. Upgrading consumers and Kafka Streams applications to cooperative rebalancing
You can upgrade Kafka consumers and Kafka Streams applications to use the incremental cooperative rebalance protocol for partition rebalances instead of the default eager rebalance protocol. The new protocol was added in Kafka 2.4.0.
Consumers keep their partition assignments in a cooperative rebalance and only revoke them at the end of the process, if needed to achieve a balanced cluster. This reduces the unavailability of the consumer group or Kafka Streams application.
Upgrading to the incremental cooperative rebalance protocol is optional. The eager rebalance protocol is still supported.
Prerequisites
- You have upgraded Kafka brokers and client applications to Kafka 2.5.0.
Procedure
To upgrade a Kafka consumer to use the incremental cooperative rebalance protocol:
-
Replace the Kafka clients
.jar
file with the new version. -
In the consumer configuration, append
cooperative-sticky
to thepartition.assignment.strategy
. For example, if therange
strategy is set, change the configuration torange, cooperative-sticky
. - Restart each consumer in the group in turn, waiting for the consumer to rejoin the group after each restart.
-
Reconfigure each consumer in the group by removing the earlier
partition.assignment.strategy
from the consumer configuration, leaving only thecooperative-sticky
strategy. - Restart each consumer in the group in turn, waiting for the consumer to rejoin the group after each restart.
To upgrade a Kafka Streams application to use the incremental cooperative rebalance protocol:
-
Replace the Kafka Streams
.jar
file with the new version. -
In the Kafka Streams configuration, set the
upgrade.from
configuration parameter to the Kafka version you are upgrading from (for example, 2.3). - Restart each of the stream processors (nodes) in turn.
-
Remove the
upgrade.from
configuration parameter from the Kafka Streams configuration. - Restart each consumer in the group in turn.
Additional resources
- Notable changes in 2.4.0 in the Apache Kafka documentation.
7.1.4. Downgrading Kafka
Kafka version downgrades are performed using the Cluster Operator.
Whether and how the Cluster Operator performs a downgrade depends on the differences between versions of:
- Interbroker protocol
- Log message format
- ZooKeeper
7.1.4.1. Target downgrade version
How the Cluster Operator handles a downgrade operation depends on the log.message.format.version
.
-
If the target downgrade version of Kafka has the same
log.message.format.version
as the current version, the Cluster Operator downgrades by performing a single rolling restart of the brokers. If the target downgrade version of Kafka has a different
log.message.format.version
, downgrading is only possible if the running cluster has always hadlog.message.format.version
set to the version used by the downgraded version.This is typically only the case if the upgrade procedure was aborted before the
log.message.format.version
was changed. In this case, the downgrade requires:- Two rolling restarts of the brokers if the interbroker protocol of the two versions is different
- A single rolling restart if they are the same
7.1.4.2. Downgrading Kafka brokers and client applications
This procedure describes how you can downgrade a AMQ Streams Kafka cluster to a lower (previous) version of Kafka, such as downgrading from 2.5.0 to 2.4.1.
Downgrading is not possible if the new version has ever used a log.message.format.version
that is not supported by the previous version, including when the default value for log.message.format.version
is used. For example, this resource can be downgraded to Kafka version 2.4.1 because the log.message.format.version
has not been changed:
apiVersion: v1alpha1 kind: Kafka spec: # ... kafka: version: 2.5.0 config: log.message.format.version: "2.4" # ...
apiVersion: v1alpha1
kind: Kafka
spec:
# ...
kafka:
version: 2.5.0
config:
log.message.format.version: "2.4"
# ...
The downgrade would not be possible if the log.message.format.version
was set at "2.5"
or a value was absent (so that the parameter took the default value for a 2.5.0 broker of 2.5).
Prerequisites
For the Kafka
resource to be downgraded, check:
- The Cluster Operator, which supports both versions of Kafka, is up and running.
-
The
Kafka.spec.kafka.config
does not contain options that are not supported in the version of Kafka you are downgrading to. -
The
Kafka.spec.kafka.config
has alog.message.format.version
that is supported by the version being downgraded to.
Procedure
Update the Kafka cluster configuration in an editor, as required:
Use
oc edit
:oc edit kafka my-cluster
oc edit kafka my-cluster
Copy to Clipboard Copied! Change the
Kafka.spec.kafka.version
to specify the previous version.For example, if downgrading from Kafka 2.5.0 to 2.4.1:
apiVersion: v1alpha1 kind: Kafka spec: # ... kafka: version: 2.4.1 config: log.message.format.version: "2.4" # ...
apiVersion: v1alpha1 kind: Kafka spec: # ... kafka: version: 2.4.1
1 config: log.message.format.version: "2.4"
2 # ...
Copy to Clipboard Copied! NoteYou must format the value of
log.message.format.version
as a string to prevent it from being interpreted as a floating point number.If the image for the Kafka version is different from the image defined in
STRIMZI_KAFKA_IMAGES
for the Cluster Operator, updateKafka.spec.kafka.image
.
Save and exit the editor, then wait for rolling updates to complete.
Check the update in the logs or by watching the pod state transitions:
oc logs -f <cluster-operator-pod-name> | grep -E "Kafka version downgrade from [0-9.]+ to [0-9.]+, phase ([0-9]+) of \1 completed"
oc logs -f <cluster-operator-pod-name> | grep -E "Kafka version downgrade from [0-9.]+ to [0-9.]+, phase ([0-9]+) of \1 completed"
Copy to Clipboard Copied! oc get po -w
oc get po -w
Copy to Clipboard Copied! If the previous and current versions of Kafka have different interbroker protocol versions, check the Cluster Operator logs for an
INFO
level message:Reconciliation #<num>(watch) Kafka(<namespace>/<name>): Kafka version downgrade from <from-version> to <to-version>, phase 2 of 2 completed
Reconciliation #<num>(watch) Kafka(<namespace>/<name>): Kafka version downgrade from <from-version> to <to-version>, phase 2 of 2 completed
Copy to Clipboard Copied! Alternatively, if the previous and current versions of Kafka have the same interbroker protocol version, check for:
Reconciliation #<num>(watch) Kafka(<namespace>/<name>): Kafka version downgrade from <from-version> to <to-version>, phase 1 of 1 completed
Reconciliation #<num>(watch) Kafka(<namespace>/<name>): Kafka version downgrade from <from-version> to <to-version>, phase 1 of 1 completed
Copy to Clipboard Copied! Downgrade all client applications (consumers) to use the previous version of the client binaries.
The Kafka cluster and clients are now using the previous Kafka version.
7.2. AMQ Streams resource upgrades
The kafka.strimzi.io/v1alpha1
API version is deprecated. Resources that use the API version kafka.strimzi.io/v1alpha1
must be updated to use kafka.strimzi.io/v1beta1
.
This section describes the upgrade steps for the resources.
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:
metadata: # ... annotations: upgrade: "Upgraded to kafka.strimzi.io/v1beta1"
metadata:
# ...
annotations:
upgrade: "Upgraded to kafka.strimzi.io/v1beta1"
7.2.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.
Update the
Kafka
resource in an editor.oc edit kafka my-cluster
oc edit kafka my-cluster
Copy to Clipboard Copied! Replace:
apiVersion: kafka.strimzi.io/v1alpha1
apiVersion: kafka.strimzi.io/v1alpha1
Copy to Clipboard Copied! with:
apiVersion:kafka.strimzi.io/v1beta1
apiVersion:kafka.strimzi.io/v1beta1
Copy to Clipboard Copied! If the
Kafka
resource has:Kafka.spec.topicOperator
Kafka.spec.topicOperator
Copy to Clipboard Copied! Replace it with:
Kafka.spec.entityOperator.topicOperator
Kafka.spec.entityOperator.topicOperator
Copy to Clipboard Copied! For example, replace:
spec: # ... topicOperator: {}
spec: # ... topicOperator: {}
Copy to Clipboard Copied! with:
spec: # ... entityOperator: topicOperator: {}
spec: # ... entityOperator: topicOperator: {}
Copy to Clipboard Copied! If present, move:
Kafka.spec.entityOperator.affinity
Kafka.spec.entityOperator.affinity
Copy to Clipboard Copied! Kafka.spec.entityOperator.tolerations
Kafka.spec.entityOperator.tolerations
Copy to Clipboard Copied! to:
Kafka.spec.entityOperator.template.pod.affinity
Kafka.spec.entityOperator.template.pod.affinity
Copy to Clipboard Copied! Kafka.spec.entityOperator.template.pod.tolerations
Kafka.spec.entityOperator.template.pod.tolerations
Copy to Clipboard Copied! For example, move:
spec: # ... entityOperator: affinity {} tolerations {}
spec: # ... entityOperator: affinity {} tolerations {}
Copy to Clipboard Copied! to:
spec: # ... entityOperator: template: pod: affinity {} tolerations {}
spec: # ... entityOperator: template: pod: affinity {} tolerations {}
Copy to Clipboard Copied! If present, move:
Kafka.spec.kafka.affinity
Kafka.spec.kafka.affinity
Copy to Clipboard Copied! Kafka.spec.kafka.tolerations
Kafka.spec.kafka.tolerations
Copy to Clipboard Copied! to:
Kafka.spec.kafka.template.pod.affinity
Kafka.spec.kafka.template.pod.affinity
Copy to Clipboard Copied! Kafka.spec.kafka.template.pod.tolerations
Kafka.spec.kafka.template.pod.tolerations
Copy to Clipboard Copied! For example, move:
spec: # ... kafka: affinity {} tolerations {}
spec: # ... kafka: affinity {} tolerations {}
Copy to Clipboard Copied! to:
spec: # ... kafka: template: pod: affinity {} tolerations {}
spec: # ... kafka: template: pod: affinity {} tolerations {}
Copy to Clipboard Copied! If present, move:
Kafka.spec.zookeeper.affinity
Kafka.spec.zookeeper.affinity
Copy to Clipboard Copied! Kafka.spec.zookeeper.tolerations
Kafka.spec.zookeeper.tolerations
Copy to Clipboard Copied! to:
Kafka.spec.zookeeper.template.pod.affinity
Kafka.spec.zookeeper.template.pod.affinity
Copy to Clipboard Copied! Kafka.spec.zookeeper.template.pod.tolerations
Kafka.spec.zookeeper.template.pod.tolerations
Copy to Clipboard Copied! For example, move:
spec: # ... zookeeper: affinity {} tolerations {}
spec: # ... zookeeper: affinity {} tolerations {}
Copy to Clipboard Copied! to:
spec: # ... zookeeper: template: pod: affinity {} tolerations {}
spec: # ... zookeeper: template: pod: affinity {} tolerations {}
Copy to Clipboard Copied! - Save the file, exit the editor and wait for the updated resource to be reconciled.
7.2.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.
Update the
KafkaConnect
resource in an editor.oc edit kafkaconnect my-connect
oc edit kafkaconnect my-connect
Copy to Clipboard Copied! Replace:
apiVersion: kafka.strimzi.io/v1alpha1
apiVersion: kafka.strimzi.io/v1alpha1
Copy to Clipboard Copied! with:
apiVersion:kafka.strimzi.io/v1beta1
apiVersion:kafka.strimzi.io/v1beta1
Copy to Clipboard Copied! If present, move:
KafkaConnect.spec.affinity
KafkaConnect.spec.affinity
Copy to Clipboard Copied! KafkaConnect.spec.tolerations
KafkaConnect.spec.tolerations
Copy to Clipboard Copied! to:
KafkaConnect.spec.template.pod.affinity
KafkaConnect.spec.template.pod.affinity
Copy to Clipboard Copied! KafkaConnect.spec.template.pod.tolerations
KafkaConnect.spec.template.pod.tolerations
Copy to Clipboard Copied! For example, move:
spec: # ... affinity {} tolerations {}
spec: # ... affinity {} tolerations {}
Copy to Clipboard Copied! to:
spec: # ... template: pod: affinity {} tolerations {}
spec: # ... template: pod: affinity {} tolerations {}
Copy to Clipboard Copied! - Save the file, exit the editor and wait for the updated resource to be reconciled.
7.2.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.
Update the
KafkaConnectS2I
resource in an editor.oc edit kafkaconnects2i my-connect
oc edit kafkaconnects2i my-connect
Copy to Clipboard Copied! Replace:
apiVersion: kafka.strimzi.io/v1alpha1
apiVersion: kafka.strimzi.io/v1alpha1
Copy to Clipboard Copied! with:
apiVersion:kafka.strimzi.io/v1beta1
apiVersion:kafka.strimzi.io/v1beta1
Copy to Clipboard Copied! If present, move:
KafkaConnectS2I.spec.affinity
KafkaConnectS2I.spec.affinity
Copy to Clipboard Copied! KafkaConnectS2I.spec.tolerations
KafkaConnectS2I.spec.tolerations
Copy to Clipboard Copied! to:
KafkaConnectS2I.spec.template.pod.affinity
KafkaConnectS2I.spec.template.pod.affinity
Copy to Clipboard Copied! KafkaConnectS2I.spec.template.pod.tolerations
KafkaConnectS2I.spec.template.pod.tolerations
Copy to Clipboard Copied! For example, move:
spec: # ... affinity {} tolerations {}
spec: # ... affinity {} tolerations {}
Copy to Clipboard Copied! to:
spec: # ... template: pod: affinity {} tolerations {}
spec: # ... template: pod: affinity {} tolerations {}
Copy to Clipboard Copied! - Save the file, exit the editor and wait for the updated resource to be reconciled.
7.2.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.
Update the
KafkaMirrorMaker
resource in an editor.oc edit kafkamirrormaker my-connect
oc edit kafkamirrormaker my-connect
Copy to Clipboard Copied! Replace:
apiVersion: kafka.strimzi.io/v1alpha1
apiVersion: kafka.strimzi.io/v1alpha1
Copy to Clipboard Copied! with:
apiVersion:kafka.strimzi.io/v1beta1
apiVersion:kafka.strimzi.io/v1beta1
Copy to Clipboard Copied! If present, move:
KafkaConnectMirrorMaker.spec.affinity
KafkaConnectMirrorMaker.spec.affinity
Copy to Clipboard Copied! KafkaConnectMirrorMaker.spec.tolerations
KafkaConnectMirrorMaker.spec.tolerations
Copy to Clipboard Copied! to:
KafkaConnectMirrorMaker.spec.template.pod.affinity
KafkaConnectMirrorMaker.spec.template.pod.affinity
Copy to Clipboard Copied! KafkaConnectMirrorMaker.spec.template.pod.tolerations
KafkaConnectMirrorMaker.spec.template.pod.tolerations
Copy to Clipboard Copied! For example, move:
spec: # ... affinity {} tolerations {}
spec: # ... affinity {} tolerations {}
Copy to Clipboard Copied! to:
spec: # ... template: pod: affinity {} tolerations {}
spec: # ... template: pod: affinity {} tolerations {}
Copy to Clipboard Copied! - Save the file, exit the editor and wait for the updated resource to be reconciled.
7.2.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.
Update the
KafkaTopic
resource in an editor.oc edit kafkatopic my-topic
oc edit kafkatopic my-topic
Copy to Clipboard Copied! Replace:
apiVersion: kafka.strimzi.io/v1alpha1
apiVersion: kafka.strimzi.io/v1alpha1
Copy to Clipboard Copied! with:
apiVersion:kafka.strimzi.io/v1beta1
apiVersion:kafka.strimzi.io/v1beta1
Copy to Clipboard Copied! - Save the file, exit the editor and wait for the updated resource to be reconciled.
7.2.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.
Update the
KafkaUser
resource in an editor.oc edit kafkauser my-user
oc edit kafkauser my-user
Copy to Clipboard Copied! Replace:
apiVersion: kafka.strimzi.io/v1alpha1
apiVersion: kafka.strimzi.io/v1alpha1
Copy to Clipboard Copied! with:
apiVersion:kafka.strimzi.io/v1beta1
apiVersion:kafka.strimzi.io/v1beta1
Copy to Clipboard Copied! - Save the file, exit the editor and wait for the updated resource to be reconciled.