Upgrading the VerticaDB operator
Vertica supports two separate options to upgrade the VerticaDB operator:
-
OperatorHub.io
-
Helm Charts
Note
You must upgrade the operator with the same option that you selected for installation. For example, you cannot install the VerticaDB operator with Helm charts, and then upgrade the operator in the same environment using OperatorHub.io.Prerequisites
- Complete Installing the VerticaDB operator
OperatorHub.io
Important
VerticaDB operator versions 1.x are namespace-scoped, and versions 2.x are cluster-scoped. To upgrade from version 1.x to 2.x, you must uninstall the operator in each namespace before you upgrade.
For detailed instructions about uninstalling your operator, see the OLM documentation.
The Operator Lifecycle Manager (OLM) operator manages upgrades for OperatorHub.io installations. You can configure the OLM operator to upgrade the VerticaDB operator manually or automatically with the Subscription object's spec.installPlanApproval
parameter.
Automatic upgrade
To configure automatic version upgrades, set spec.installPlanApproval
to Automatic
, or omit the setting entirely. When the OLM operator refreshes the catalog source, it installs the new VerticaDB operator automatically.
Manual upgrade
Upgrade the VerticaDB operator manually to approve version upgrades for specific install plans. To manually upgrade, set spec.installPlanApproval
parameter to Manual
and complete the following:
-
Verify if there is an install plan that requires approval to proceed with the upgrade:
$ kubectl get installplan NAME CSV APPROVAL APPROVED install-ftcj9 verticadb-operator.v1.7.0 Manual false install-pw7ph verticadb-operator.v1.6.0 Manual true
The command output shows that the install plan
install-ftcj9
for VerticaDB operator version 1.7.0 is not approved. -
Approve the install plan with a patch command:
$ kubectl patch installplan install-ftcj9 --type=merge --patch='{"spec": {"approved": true}}' installplan.operators.coreos.com/install-ftcj9 patched
After you set the approval, the OLM operator silently upgrades the VerticaDB operator.
-
Optional. To monitor its progress, inspect the STATUS column of the Subscription object:
$ kubectl describe subscription subscription-object-name
Helm charts
You must have cluster administrator privileges to upgrade the VerticaDB operator with Helm charts.
The Helm chart includes the CRD, but the helm install
command does not overwrite an existing CRD. To upgrade the operator, you must update the CRD with the manifest from the GitHub repository.
Additionally, you must upgrade all custom resource definitions, even if you do deploy them in your environment. These CRDs are installed with the operator and maintained as separate YAML manifests. Upgrading all CRDs ensure that your operator is upgraded completely.
Important
VerticaDB operator versions 1.x are namespace-scoped, and versions 2.x are cluster-scoped. To upgrade from version 1.x to 2.x, you must uninstall the operator in each namespace before you upgrade.
You can uninstall the VerticaDB operator with the helm uninstall command:
$ helm uninstall vdb-op --namespace namespace
You can upgrade the CRDs and VerticaDB operator from GitHub by applying the YAML manifests with the kubectl
command-line tool:
-
Install all Custom resource definitions. Because the size of the CRD is too large for client-side operations, you must use the
server-side=true
and--force-conflicts
options to apply the manifests:kubectl apply --server-side=true --force-conflicts -f https://github.com/vertica/vertica-kubernetes/releases/latest/download/crds.yaml
For additional details about these commands, see Server-Side Apply documentation.
-
Upgrade the Helm chart:
$ helm upgrade operator-name --wait vertica-charts/verticadb-operator