Upgrading the Autonomous Operator
Download the Operator package for the version that you want to upgrade to, and unpack it on the same computer where you normally run
The Operator package contains the YAML configuration files and command-line tools that you will use to upgrade and manage the Operator.
After you unpack the download, the resulting directory will be titled something like
In the Operator package, you’ll find the updated version of the CRD:
crd.yaml. For minor releases of the Operator, the CRD (which defines acceptable CouchbaseCluster configurations) may undergo small changes that don’t affect backward compatibility, but may add new fields or make changes to the validation code that ensures valid CouchbaseCluster configurations.
To update the CRD, run the following command:
The permissions required by the Operator may also change between minor versions, so it’s good practice to replace existing roles with up-to-date versions. Updates may be specific to the RBAC setup in your Kubernetes environment. The following commands will update the default roles supplied in the Operator distribution:
After updating the CRD, you can move on to upgrading the Operator itself. To upgrade the Operator, all you need to do is change the version field in the Operator Deployment to the version that you’re upgrading to. Once you edit this field and submit the new Deployment configuration, Kubernetes will automatically stop the old Operator pod and then start a new pod running the new version of the Operator software.
Run the following command to open the Operator Deployment in a text editor:
kubectl edit deployment couchbase-operator
oc edit deployment couchbase-operator
Change the Operator container image version to the version that you want to upgrade to. If you’re upgrading to version 1.2.1, the Deployment configuration should look like the following:
... containers: - name: couchbase-operator image: couchbase/operator:1.2.1 ...
... containers: - name: couchbase-operator image: registry.connect.redhat.com/couchbase/operator:1.2.1-1 ...
Once you save and close the text editor, the changes are sent to Kubernetes and the upgrade process begins.
Be aware that command line parameters to the Operator may change between releases. Please review the defaults supplied in the provided YAML manifest. Additionally, consult the Operator configuration guide for command line flags.