Upgrade Percona Everest using the CLI¶
Percona Everest regularly releases updates that contain bug fixes, security improvements, and other enhancements to improve the overall performance of your database.
Before you upgrade¶
Percona Everest and CLI version compatibility¶
- For most cases, we recommend installing the latest version of the Percona Everest CLI before attempting an upgrade.
- If you’re working with older versions, you must use CLI versions 1.2 and 1.3 for Percona Everest 1.2 and 1.3, respectively. However, starting with Percona Everest 1.4, use CLI version 1.4 or higher.
Upgrade constraints¶
You can only upgrade one minor version at a time. For instance, you can upgrade from version 1.4.0 to version 1.5.0 but you cannot directly upgrade from version 1.4.0 to version 1.6.0.
Upgrade instructions¶
Upgrade to Percona Everest 1.3.0+¶
To upgrade Percona Everest, run the following command:
everestctl upgrade
Example: Upgrade from version 1.4.0 to 1.5.0
Install Percona Everest version 1.4.0
everestctl install --version 1.4.0
❓ Provide database namespaces to be managed by Everest: everest
❓ Which operators do you want to install?
[X] MySQL
[X] MongoDB
> [X] PostgreSQL
ℹ️ Installing Everest version 1.4.0
✅ Installing Everest Helm chart
✅ Ensuring Everest API deployment is ready
✅ Ensuring Everest operator deployment is ready
✅ Ensuring OLM components are ready
✅ Ensuring Everest CatalogSource is ready
✅ Ensuring monitoring stack is ready
✅ Provisioning database namespace 'everest'
🚀 Thank you for installing Everest (v1.4.0)!
Now, upgrade to Percona Everest version 1.5.0
everestctl upgrade
ℹ️ Upgrading Everest to version 1.5.0
✅ Upgrading Custom Resource Definitions
✅ Upgrading Helm chart
✅ Ensuring Everest API deployment is ready
✅ Ensuring Everest operator deployment is ready
✅ Ensuring Everest CatalogSource is ready
🚀 Everest has been upgraded to version 1.5.0
Upgrade to Percona Everest 1.2.0¶
When upgrading to 1.2.0 using the CLI command everestctl upgrade
, all your existing backup storages and monitoring instances will be automatically migrated to the namespaces specified in their .spec.allowedNamespaces
fields.
Following the upgrade, your databases should not experience any downtime. Your backup, restore, and monitoring functionalities should continue to operate normally.
In the unlikely event that your upgrade fails, and you need to manually migrate these resources, follow the steps in how to resolve upgrade failures in Percona Everest 1.2.0 section.
Upgrade to versions older than 1.2.0¶
Note
It is recommended that you create backups of your databases prior to upgrading Percona Everest.
During the upgrade of Percona Everest, only Percona Everest and Everest operator are upgraded, whereas the database operators, database clusters and backups remain unchanged.
-
If you are using
everestctl
v1.1.0 or newer to upgrade from a version prior to v1.0.0, you need to execute the following command:kubectl get deployments everest-operator-controller-manager -n everest-system -o jsonpath='{.spec.template.spec.containers[?(@.name=="manager")].env[?(@.name=="DB_NAMESPACES")].value}' | tr ',' '\n' | xargs -I {} kubectl label namespaces {} app.kubernetes.io/managed-by=everest
-
To upgrade Percona Everest, use the following command:
everestctl upgrade
Expected output
everestctl upgrade 2024-05-03T12:06:47Z info upgrade/upgrade.go:156 Current Everest version is 0.9.1 {"component": "upgrade"} 2024-05-03T12:06:47Z info upgrade/upgrade.go:164 Found available upgrade to Everest version 0.10.0 {"component": "upgrade"} 2024-05-03T12:06:47Z info upgrade/upgrade.go:167 Checking requirements for upgrade to Everest 0.10.0 {"component": "upgrade"} 2024-05-03T12:06:47Z info upgrade/upgrade.go:310 Checking cli version requirements {"component": "upgrade"} 2024-05-03T12:06:47Z info upgrade/upgrade.go:339 Checking operator requirements in namespace n1 {"component": "upgrade"} 2024-05-03T12:06:47Z info upgrade/upgrade.go:121 Upgrading Percona Catalog to 0.10.0 {"component": "upgrade"} 2024-05-03T12:06:47Z info upgrade/upgrade.go:130 Waiting for install plan for Everest operator {"component": "upgrade"} 2024-05-03T12:07:14Z info upgrade/upgrade.go:139 Upgrading Everest to 0.10.0 in namespace everest-system {"component": "upgrade"} 2024-05-03T12:07:26Z info upgrade/upgrade.go:400 Approving install plan install-nv76r for Everest operator {"component": "upgrade"} 2024-05-03T12:07:26Z info upgrade/upgrade.go:406 Waiting for install plan installation of Everest operator to finish {"component": "upgrade"} 2024-05-03T12:07:28Z info upgrade/upgrade.go:148 Everest has been upgraded to version 0.10.0 {"component": "upgrade"}
How to address a failed upgrade¶
If the upgrade fails, you can attempt it again. If the issue persists, create a GitHub issue.
Resolving upgrade failures due to the breaking API changes
Percona Everest 1.2.0 includes some breaking API changes. While all your resources will be migrated automatically, in the unlikely event that your upgrade fails and you need to manually migrate these resources, follow the steps below:
-
List the existing backup-storages:
kubectl get backupstorages -n everest-system -oyaml > new-backupstorages.yaml
-
Check whether the backup storage has been retrieved.
cat new-backupstorages.yaml apiVersion: everest.percona.com/v1alpha1 kind: BackupStorage metadata: name: s3 namespace: everest-system spec: allowedNamespaces: - my-cool-namespace - another-cool-namespace bucket: my-cool-bucket credentialsSecretName: s3 description: s3 endpointURL: https://s3.us-west-2.amazonaws.com forcePathStyle: false region: us-west-2 type: s3 verifyTLS: true
Note
You may see more than one object, depending on the number of objects created.
-
Edit
new-backupstorages.yaml
as follows:-
For each
BackupStorage
retrieved, create a copy in each namespace specified under.spec.allowedNamespaces
. -
Remove (or unset)
.spec.allowedNamespaces
in each copy of theBackupStorages
object. -
Ensure that
.metadata
contains onlyname
andnamespace
.
Example
apiVersion: everest.percona.com/v1alpha1 kind: BackupStorage metadata: name: s3 namespace: my-cool-namespace spec: allowedNamespaces: [] bucket: my-cool-bucket credentialsSecretName: s3 description: s3 endpointURL: https://s3.us-west-2.amazonaws.com forcePathStyle: false region: us-west-2 type: s3 verifyTLS: true --- apiVersion: everest.percona.com/v1alpha1 kind: BackupStorage metadata: name: s3 namespace: another-cool-namespace spec: allowedNamespaces: [] bucket: my-cool-bucket credentialsSecretName: s3 description: s3 endpointURL: https://s3.us-west-2.amazonaws.com forcePathStyle: false region: us-west-2 type: s3 verifyTLS: true
-
-
Create your new backup storages:
kubectl apply -f new-backupstorages.yaml
A similar set of steps can also be followed for monitoring configs as well:
kubectl get monitoringconfigs -n everest-monitoring > new-monitoringconfigs.yaml
After your upgrade is complete¶
After upgrading your Percona Everest version, follow the instructions in step 3 and step 4 of the installation section to reset the admin password and expose the Percona Everest service.