> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/tools/mariadb-enterprise-operator/migrations/migrate-community-operator-to-enterprise-operator.md).

# Migrate Community operator to Enterprise operator

In this guide, we will be migrating from the [MariaDB Community Operator](https://github.com/mariadb-operator/mariadb-operator) to the [MariaDB Enterprise Kubernetes Operator](/docs/tools/mariadb-enterprise-operator.md) without downtime. This guide assumes:

* [0.37.1](https://github.com/mariadb-operator/mariadb-operator/releases/tag/0.37.1) version of the MariaDB Community Operator is installed in the cluster.
* `MariaDB` community resources will be migrated to its counterpart `MariaDB` enterprise resource. In this case, we will be using `11.4.4` version, which is supported in both community and enterprise versions. Check the supported [MariaDB Enterprise images](/docs/tools/mariadb-enterprise-operator/docker-images.md) and migrate to a counterpart community version first if needed.
* `MaxScale` resources cannot be migrated in a similar way, they need to be recreated. To avoid downtime, temporarily point your applications to `MariaDB` directly during the migration.

**1.** Install the Enterprise CRDs as described in the [Helm documentation](/docs/tools/mariadb-enterprise-operator/installation/helm.md#installing-crds).

**2.** Get the [migration script](https://operator.mariadb.com/scripts/migrate_enterprise.sh) and grant execute permissions:

```sh
curl -sLO https://operator.mariadb.com/scripts/migrate_enterprise.sh
chmod +x migrate_enterprise.sh
```

**3.** Migrate `MariaDB` resources using the migration script. Make sure you set `<mariadb-name>` with the name of the `MariaDB` resource to be migrated and `<operator-version>` with the version of the Enterprise operator you will be installing:

```sh
RESOURCE="<mariadb-name>" \
OLD_API_GROUP="k8s.mariadb.com" \
NEW_API_GROUP="enterprise.mariadb.com" \
NEW_MARIADB_IMAGE="docker.mariadb.com/enterprise-server:11.4.4-2" \
NEW_MARIADB_OPERATOR_IMAGE="docker.mariadb.com/mariadb-enterprise-operator:<operator-version>" \
./migrate_enterprise.sh
```

**4.** Update the `apiVersion` of the rest of CRs to `enterprise.mariadb.com/v1alpha1`.

**5.** Uninstall the Community operator:

```sh
helm uninstall mariadb-operator
```

**6.** If your `MariaDB` Community had Galera enabled, delete the `<mariadb-name>` `Role`, as it will be specifying the Community CRDs:

```sh
kubectl delete role <mariadb-name>
```

**7.** Install the Enterprise operator as described in the [Helm documentation](/docs/tools/mariadb-enterprise-operator/installation/helm.md#installing-the-operator). This will trigger a rolling upgrade, make sure it finishes successfully before proceeding with the next step.

**8.** Delete the finalizers and uninstall the Community CRDs:

```sh
for crd in $(kubectl get crds -o json | jq -r '.items[] | select(.spec.group=="k8s.mariadb.com") | .metadata.name'); do
  kubectl get "$crd" -A -o json | jq -r '.items[] | "\(.metadata.namespace)/\(.metadata.name)"' | while read cr; do
    ns=$(echo "$cr" | cut -d'/' -f1)
    name=$(echo "$cr" | cut -d'/' -f2)
    echo "Removing finalizers from $crd: $name in $ns..."
    kubectl patch "$crd" "$name" -n "$ns" --type merge -p '{"metadata":{"finalizers":[]}}'
  done
done
helm uninstall mariadb-operator-crds
```

**9.** Run `mariadb-upgrade` in all `Pods`. Make sure you set `<mariadb-name>` with the name of the `MariaDB` resource:

```sh
for pod in $(kubectl get pods -l app.kubernetes.io/instance=<mariadb-name> -o jsonpath='{.items[*].metadata.name}'); do
  kubectl exec "$pod" -- sh -c 'mariadb-upgrade -u root -p${MARIADB_ROOT_PASSWORD} -f'
done
```

**10.** Restart the Enterprise operator:

```sh
kubectl rollout restart deployment mariadb-enterprise-operator
```

<sub>*This page is: Copyright © 2025 MariaDB. All rights reserved.*</sub>

{% @marketo/form formId="4316" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://mariadb.com/docs/tools/mariadb-enterprise-operator/migrations/migrate-community-operator-to-enterprise-operator.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
