This topic describes how to upgrade the VMware Tanzu™ SQL with MySQL for Kubernetes Operator.

NOTE: Upgrading the MySQL Operator does not automatically upgrade any existing MySQL instances. Any instance upgrades require user intervention. The owners of the instances might be encouraged to upgrade or update their instances to a later supported version.

Upgrade the Operator using Helm CLI

To upgrade Tanzu MySQL for Kubernetes, you must download the resources, and upgrade the Tanzu MySQL for Kubernetes Operator using Helm.

These instructions assume your Operator is installed in the Operator namespace tanzu-mysql-for-kubernetes-system as described in Operator Installation documentation. If your Operator is installed in a different namespace, replace tanzu-mysql-for-kubernetes-system with that namespace in the below commands.

  1. Set the environment variable to enable OCI support in the Helm v3 client by running:


    If you skip this step, the following error message might appear: Error: this feature has been marked as experimental and is not enabled by default.

  2. Use Helm to log in to the Tanzu Network Registry by running:

    helm registry login

    Follow the prompts to enter the email address and password for your VMware Tanzu Network account.

  3. Verify that you have a running Tanzu MySQL for Kubernetes Operator by running:

    helm ls -n tanzu-mysql-for-kubernetes-system

    For example:

    helm ls -n tanzu-mysql-for-kubernetes-system
    NAME                    NAMESPACE                               REVISION        UPDATED                                 STATUS          CHART                                   APP VERSION
    tanzu-mysql-operator    tanzu-mysql-for-kubernetes-system       1               2022-09-11 12:15:07.16966 -0500 CDT     deployed        tanzu-sql-with-mysql-operator-1.6.0     1.6.0
  4. Create a temporary working directory to export the chart into by running:

    CHART_DIR=$(mktemp -d /tmp/tanzu-mysql-operator-chart:1.6.0.XXXXX)
  5. Download the Helm chart to your temporary working directory on your local machine by running these commands:

    If you're using Helm CLI 3.6 and earlier:

    helm chart pull
    helm chart export -d ${CHART_DIR}

    If you're using Helm CLI 3.7.1 and later:

     helm pull oci:// \
       --version 1.6.0 --untar --untardir ${CHART_DIR}
  6. In the location where the new release has been downloaded, apply the new CRDs by running:

    kubectl apply -f ${CHART_DIR}/tanzu-sql-with-mysql-operator/crds/

    Note: You can ignore the warnings in the output.

  7. Upgrade the Operator by running:

    helm upgrade tanzu-sql-with-mysql-operator ${CHART_DIR}/tanzu-sql-with-mysql-operator \
      -n tanzu-mysql-for-kubernetes-system

    When you see deployed in the STATUS column, the Tanzu MySQL for Kubernetes Helm chart has upgraded:

    helm history tanzu-sql-with-mysql-operator -n tanzu-mysql-for-kubernetes-system

If your Operator was previously installed using an Operator Values Override file (or other command-line values overrides), then Helm will re-apply those override values to this upgrade, unless you perform the upgrade with other overrides or with the --reset-values flag. See Helm Upgrade documentation for details.

  1. Clean up the temporary directory if it is no longer needed with the exported chart by running:
     rm ${CHART_DIR}

Next Steps

Check the status of your existing instances, and plan for an upgrade or an update.

Use the command kubectl get mysqls and review List Instance Versions, Upgrade an Instance and Updating an Instance.

check-circle-line exclamation-circle-line close-line
Scroll to top icon