Upgrading and rolling back Cloudera Streams Messaging - Kubernetes Operator
Learn about upgrading and rolling back Cloudera Streams Messaging - Kubernetes Operator.
Upgrades
Upgrading Cloudera Streams Messaging - Kubernetes Operator consists of upgrading Strimzi, Kafka, and Kafka Connect.
Upgrading Strimzi involves upgrading the Strimzi Custom Resource Definitions (CRD) and upgrading the Strimzi Cluster Operator using Helm.
- Strongly recommended by Cloudera after every Strimzi upgrade.
- Mandatory if you are upgrading from a maintenance version or if you are using a custom Kafka image.
Upgrading Strimzi might affect the Kafka and KafkaConnect resources in the cluster. All Kafka and Kafka Connect clusters that specify the version of the cluster but not the image are restarted when you upgrade Strimzi. This is due to the fact that the default image of all versions changes with the Strimzi upgrade, triggering a restart. This restart is safe, that is, all healthy topics with a proper replication factor and minimum ISR are kept online during the restart.
Rollbacks
A rollback involves rolling back Kafka and Kafka Connect as well as Strimzi to a previous version.
A rollback is only possible if the Kafka version you are upgrading from is still supported by the Cloudera Streams Messaging - Kubernetes Operator version you are upgrading to. If the Kafka version is not supported, upgrading is possible, but rollback is not. If you are upgrading to a version that does not support your current Kafka version and you want to have the ability to roll back, you might need to carry out multiple upgrades.
Upgrading Cloudera Streams Messaging - Kubernetes Operator
To upgrade Cloudera Streams Messaging - Kubernetes Operator, you upgrade Strimzi as well as your Kafka and Kafka Connect clusters.
-
Ensure that your Kubernetes environment meets requirements listed in System requirements.
-
Ensure that you have access to your Cloudera credentials (username and password). Credentials are required to access the Cloudera Archive and Cloudera Docker registry where upgrade artifacts are hosted.
-
If you are upgrading from a maintenance version, check that the bug fixes provided in the maintenance version are available in the newer Kafka supported by Cloudera Streams Messaging - Kubernetes Operator. If certain fixes are not available, be aware that upgrading will result in regressed functionality.
-
If you are using a custom Kafka image, build new custom images that are based on the Kafka images shipped with the Cloudera Streams Messaging - Kubernetes Operator version you are upgrading to.
Cloudera Streams Messaging - Kubernetes Operator ships with two Kafka images, one for the latest supported version of Kafka, and one for the previously supported version of Kafka. Build new custom images based on both.
The custom image based on the latest supported version is required for the upgrade. The custom image based on the previously supported version is required for rollbacks. -
The following steps instruct you to set
inter.broker.protocol.version
during the upgrade to keep Kafka in backward compatible state during the upgrade. This is only necessary if the protocol version differs between your current and new versions.If there is no change in the protocol version, you also do not finalize the upgrade. This means that for these types of upgrades, a rollback is possible even after you completed the upgrade.
You can find the Kafka protocol version in Component versions.
Rolling back Cloudera Streams Messaging - Kubernetes Operator
To roll back Cloudera Streams Messaging - Kubernetes Operator to a previous version, you roll back your Kafka and Kafka Connect clusters as well as Strimzi.
- Rollbacks are only possible if:
-
The Kafka version you upgraded from is still supported by the Cloudera Streams Messaging - Kubernetes Operator version that you upgraded to.
-
The Kafka upgrade is not finalized. A Kafka upgrade is finalized if
inter.broker.protocol.version
for the Kafka cluster is set to the current protocol version. That is, the protocol version matches the version of Kafka.
-
- If you are using a custom Kafka image:
-
Ensure that you have a custom Kafka image that is based on the latest base image with the previous Kafka version. This image is only set and used temporarily during the rollback.
For example, Cloudera Streams Messaging - Kubernetes Operator 1.3 ships two Kafka base images. One for Kafka 3.9.0.1.3 (latest/current) and one for Kafka 3.8.0.1.2 (previous). In order to rollback, you need a custom image based on the 3.8.0.1.2 image shipped with 1.3.
The base image used to build the custom image must be an image shipped in the Cloudera Streams Messaging - Kubernetes Operator version you upgraded to. Even though earlier Cloudera Streams Messaging - Kubernetes Operator versions might have shipped the same Kafka version, you cannot use a base image from a previous Cloudera Streams Messaging - Kubernetes Operator release even if the Kafka version is the same.
-
Ensure that you have access to the original custom image that you used before you upgraded. You will be rolling back your clusters to use this image.
-
If you are rolling back to a maintenance version, it can happen that during the rollback your cluster temporarily runs with a Kafka image that does not have all fixes included in the maintenance version.
This is because a rollback is done in two stages. First, you roll back Kafka and Kafka Connect, then you roll back Strimzi. After rolling back Kafka or Kafka Connect your clusters are automatically restarted and use a Kafka image that includes the previous version of Kafka. However, that image might not contain all fixes that are in the maintenance version you are rolling back to. This is only temporary, once you rollback Strimzi, your cluster will fully revert to using the initial maintenance version you upgraded from.
-