第 26 章 Downgrading Streams for Apache Kafka
If you are encountering issues with the version of Streams for Apache Kafka you upgraded to, you can revert your installation to the previous version.
If you used the YAML installation files to install Streams for Apache Kafka, you can use the YAML installation files from the previous release to perform the downgrade procedures. You can downgrade Streams for Apache Kafka by updating the Cluster Operator and the version of Kafka you are using. Kafka version downgrades are performed by the Cluster Operator.
The following downgrade instructions are only suitable if you installed Streams for Apache Kafka using the installation files. If you installed Streams for Apache Kafka using another method, like OperatorHub, downgrade may not be supported by that method unless specified in their documentation. To ensure a successful downgrade process, it is essential to use a supported approach.
If you are encountering issues with Streams for Apache Kafka, you can revert your installation.
This procedure describes how to downgrade a Cluster Operator deployment to a previous version.
Prerequisites
- An existing Cluster Operator deployment is available.
- You have downloaded the installation files for the previous version.
Before you begin
Check the downgrade requirements of the Streams for Apache Kafka feature gates. If a feature gate is permanently enabled, you may need to downgrade to a version that allows you to disable it before downgrading to your target version.
Procedure
-
Take note of any configuration changes made to the existing Cluster Operator resources (in the
/install/cluster-operatordirectory). Any changes will be overwritten by the previous version of the Cluster Operator. - Revert your custom resources to reflect the supported configuration options available for the version of Streams for Apache Kafka you are downgrading to.
Update the Cluster Operator.
Modify the installation files for the previous 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*.yamlOn MacOS, use:
sed -i '' 's/namespace: .*/namespace: my-cluster-operator-namespace/' install/cluster-operator/*RoleBinding*.yaml-
If you modified one or more environment variables in your existing Cluster Operator
Deployment, edit theinstall/cluster-operator/060-Deployment-strimzi-cluster-operator.yamlfile to use those environment variables.
When you have an updated configuration, deploy it along with the rest of the installation resources:
oc replace -f install/cluster-operatorWait for the rolling updates to complete.
Get the image for the Kafka pod to ensure the downgrade was successful:
oc get pod my-cluster-kafka-0 -o jsonpath='{.spec.containers[0].image}'The image tag shows the new Streams for Apache Kafka version followed by the Kafka version. For example,
<strimzi_version>-kafka-<kafka_version>.You can also check the downgrade has completed successfully from the status of the
Kafkaresource.