1.5. Rolling back an Operator upgrade
To roll back an Operator upgrade, you must perform the steps described in one of the following sections. You can roll back an Operator upgrade by using the CLI or the OpenShift Container Platform web console.
If you are rolling back from RHACS 4.0, you can only roll back to the latest patch release version of RHACS 3.74.
1.5.1. Rolling back an Operator upgrade by using the CLI 复制链接链接已复制到粘贴板!
You can roll back the Operator version by using command-line interface (CLI) commands.
Procedure
Delete the Operator Lifecycle Manager (OLM) subscription and cluster service version (CSV):
注意If you use Kubernetes, enter
kubectlinstead ofoc.To delete the OLM subscription, run the following command:
$ oc -n rhacs-operator delete subscription rhacs-operatorExample output
subscription.operators.coreos.com "rhacs-operator" deletedTo delete the CSV, run the following command:
$ oc -n rhacs-operator delete csv -l operators.coreos.com/rhacs-operator.rhacs-operatorExample output
clusterserviceversion.operators.coreos.com "rhacs-operator.v4.8.4" deleted
Install the previous version of the RHACS Operator:
- In the OpenShift web console, click OperatorHub.
- Search for Advanced Cluster Security for Kubernetes.
Select and install the previous version of the Operator.
注意Installing the previous Operator version rolls back RHACS to the same version as the Operator.
You can roll back the Operator version by using the OpenShift Container Platform web console.
Prerequisites
-
You have access to an OpenShift Container Platform cluster web console using an account with
cluster-adminpermissions.
Procedure
-
In the OpenShift web console, click Operators
Installed Operators. - From the list of projects, select rhacs-operator.
Locate the Advanced Cluster Security for Kubernetes Operator:
Click the overflow menu
Uninstall Operator. The uninstall Operator dialog is displayed.
- Ensure that the Delete all operand instances for this operator checkbox is clear to avoid uninstallation of Red Hat Advanced Cluster Security for Kubernetes (RHACS).
- Click Uninstall.
Install the previous version of RHACS Operator:
- In the OpenShift web console, click OperatorHub.
- Search for Advanced Cluster Security for Kubernetes.
Select and install the previous version of the Operator.
注意Installing the previous Operator version rolls back RHACS to the same version as the Operator.