You are looking at the documentation of a prior release. To read the documentation of the latest release, please visit here.

Upgrading KubeDB

This guide will show you how to upgrade various KubeDB components. Here, we are going to show how to upgrade from an old KubeDB version to the new version, how to migrate between the enterprise edition and community edition, and how to update the license, etc.

Upgrading KubeDB from v2021.xx.xx to v2021.06.23

In order to upgrade from KubeDB v2021.xx.xx to v2021.06.23, please follow the following steps.

1. Update KubeDB Catalog CRDs

KubeDB v2021.06.23 has added some new fields in the ***Version CRDs. Unfortunatley, Helm does not upgrade the CRDs bundled in a Helm chart if the CRDs already exist. So, to upgrde the KubeDB catalog CRD, please run the command below:

kubectl apply -f https://github.com/kubedb/installer/raw/v2021.06.23/kubedb-catalog-crds.yaml

2. Upgrade KubeDB Operator

Now, upgrade the KubeDB helm chart using the following command. You can find the latest installation guide here. We recommend that you do not follow the legacy installation guide, as the new process is much more simpler.

# Upgrade KubeDB Community operator chart
$ helm upgrade kubedb appscode/kubedb \
  --version v2021.06.23 \
  --namespace kube-system \
  --set-file global.license=/path/to/the/license.txt

# Upgrade KubeDB Enterprise operator chart
$ helm upgrade kubedb appscode/kubedb \
    --version v2021.06.23 \
    --namespace kube-system \
    --set-file global.license=/path/to/the/license.txt \
    --set kubedb-enterprise.enabled=true \
    --set kubedb-autoscaler.enabled=true

3. Install/Upgrade Stash Operator

Now, upgrade Stash if had previously installed Stash following the instructions here. If you had not installed Stash before, please install Stash Enterprise Edition following the instructions here.

Upgrading KubeDB from v2021.01.26(v0.16.x) and older to v2021.03.17(v0.17.x)

In KubeDB v2021.01.26(v0.16.x) and prior versions, KubeDB used separate charts for KubeDB community edition, KubeDB enterprise edition, and KubeDB catalogs. In KubeDB v2021.03.17(v0.17.x), we have moved to a single combined chart for all the components for a better user experience. This enables seamless migration between the KubeDB community edition and KubeDB enterprise edition. It also removes the burden of installing individual helm charts manually. KubeDB still depends on Stash as the backup/recovery operator and Stash must be installed separately.

In order to upgrade from KubeDB v2021.01.26(v0.16.x) to v2021.03.17(v0.17.x), please follow the following steps.

1. Uninstall KubeDB Operator

Uninstall the old KubeDB operator by following the appropriate uninstallation guide of the KubeDB version that you are currently running.

Make sure you are using the appropriate version of the uninstallation guide. The uninstallation guide for v2021.03.17(v0.17.x) will not work for v2021.01.26(v0.16.x) Use the dropdown at the sidebar of the documentation site to navigate to the appropriate version that you are currently running.

2. Update KubeDB Catalog CRDs

KubeDB v2021.03.17(v0.17.x) has added some new fields in the ***Version CRDs. Unfortunatley, Helm does not upgrade the CRDs bundled in a Helm chart if the CRDs already exist. So, to upgrde the KubeDB catalog CRD, please run the command below:

kubectl apply -f https://github.com/kubedb/installer/raw/v0.17.1/kubedb-catalog-crds.yaml

3. Reinstall new KubeDB Operator

Now, follow the latest installation guide to install the new version of the KubeDB operator. You can find the latest installation guide here. We recommend that you do not follow the legacy installation guide, as the new process is much more simpler.

4. Install/Upgrade Stash Operator

Now, upgrade Stash if had previously installed Stash following the instructions here. If you had not installed Stash before, please install Stash Enterprise Edition following the instructions here.

Migration Between Community Edition and Enterprise Edition

KubeDB v2021.06.23 supports seamless migration between community edition and enterprise edition. You can run the following commands to migrate between them.

Using Helm 3

From Community Edition to Enterprise Edition:

In order to migrate from KubeDB community edition to KubeDB enterprise edition, please run the following command,

helm upgrade kubedb -n kube-system appscode/kubedb \
  --reuse-values \
  --set kubedb-enterprise.enabled=true \
  --set kubedb-autoscaler.enabled=true \
  --set kubedb-catalog.skipDeprecated=false \
  --set-file global.license=/path/to/kubedb-enterprise-license.txt

From Enterprise Edition to Community Edition:

In order to migrate from KubeDB enterprise edition to KubeDB community edition, please run the following command,

helm upgrade kubedb -n kube-system appscode/kubedb \
  --reuse-values \
  --set kubedb-enterprise.enabled=false \
  --set kubedb-autoscaler.enabled=false \
  --set kubedb-catalog.skipDeprecated=false \
  --set-file global.license=/path/to/kubedb-community-license.txt

Using Helm 2

From Community Edition to Enterprise Edition:

To migrate from KubeDB community edition to KubeDB enterprise edition, please run the following command,

helm upgrade kubedb appscode/kubedb \
  --reuse-values \
  --set kubedb-enterprise.enabled=true \
  --set kubedb-autoscaler.enabled=true \
  --set kubedb-catalog.skipDeprecated=false \
  --set-file global.license=/path/to/kubedb-enterprise-license.txt

From Enterprise Edition to Community Edition:

To migrate from KubeDB enterprise edition to KubeDB community edition, please run the following command,

helm upgrade kubedb appscode/kubedb \
  --reuse-values \
  --set kubedb-enterprise.enabled=false \
  --set kubedb-autoscaler.enabled=false \
  --set kubedb-catalog.skipDeprecated=false \
  --set-file global.license=/path/to/kubedb-community-license.txt

Using YAML (with helm 3)

From Community Edition to Enterprise Edition:

In order to migrate from KubeDB community edition to KubeDB enterprise edition, please run the following command,

# Install KubeDB enterprise edition
helm template kubedb -n kube-system appscode/kubedb \
  --version v2021.06.23 \
  --set kubedb-enterprise.enabled=true \
  --set kubedb-autoscaler.enabled=true \
  --set kubedb-catalog.skipDeprecated=false \
  --set global.skipCleaner=true \
  --set-file global.license=/path/to/kubedb-enterprise-license.txt | kubectl apply -f -

From Enterprise Edition to Community Edition:

In order to migrate from KubeDB enterprise edition to KubeDB community edition, please run the following command,

# Install KubeDB community edition
helm template kubedb -n kube-system appscode/kubedb \
  --version v2021.06.23 \
  --set kubedb-enterprise.enabled=false \
  --set kubedb-autoscaler.enabled=false \
  --set kubedb-catalog.skipDeprecated=false \
  --set global.skipCleaner=true \
  --set-file global.license=/path/to/kubedb-community-license.txt | kubectl apply -f -

Updating License

KubeDB support updating license without requiring any re-installation. KubeDB creates a Secret named <helm release name>-license with the license file. You just need to update the Secret. The changes will propagate automatically to the operator and it will use the updated license going forward.

Follow the below instructions to update the license:

  • Get a new license and save it into a file.
  • Then, run the following upgrade command based on your installation.

Using Helm 3

helm upgrade kubedb -n kube-system appscode/kubedb \
  --reuse-values \
  --set-file global.license=/path/to/new/license.txt

Using Helm 2

helm upgrade kubedb appscode/kubedb \
  --reuse-values \
  --set-file license=/path/to/new/license.txt

Using YAML (with helm 3)

Update License of Community Edition:

helm template kubedb -n kube-system appscode/kubedb \
  --set kubedb-enterprise.enabled=false \
  --set kubedb-autoscaler.enabled=false \
  --set global.skipCleaner=true \
  --show-only appscode/kubedb-community/templates/license.yaml \
  --set-file global.license=/path/to/new/license.txt | kubectl apply -f -

Update License of Enterprise Edition:

helm template kubedb appscode/kubedb -n kube-system \
  --set kubedb-enterprise.enabled=true \
  --set kubedb-autoscaler.enabled=true \
  --set global.skipCleaner=true \
  --show-only appscode/kubedb-enterprise/templates/license.yaml \
  --set-file global.license=/path/to/new/license.txt | kubectl apply -f -