Migrate Embedded MaxScale To MaxScale Resource

In this guide, we will be migrating a MaxScale embedded in a MariaDB resource to it's own resource.

apiVersion: enterprise.mariadb.com/v1alpha1
kind: MariaDB
metadata:
  name: mariadb
spec:
+  maxScaleRef:
+     name: mariadb-maxscale
-  # Provision a MaxScale instance and set 'spec.maxScaleRef' automatically.
-  maxScale:
-    enabled: true
-    connection:
-      secretName: mxs-repl-conn
-      port: 3306
-    metrics:
-      enabled: true
circle-info

Note that if you've been using the embedded maxScale property, the operator will already have created a MaxScale resource to go along with it.

1. Get the migration scriptarrow-up-right and grant execute permissions:

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

2. Migrate all of your existing MariaDB resources where MaxScale is embedded.

This will have created new <migrated.mariadb_manifest.yaml> manifests.

3. Inspect the newly created manifests and overwrite the source manifests if satisfied with the changes.

This page is: Copyright © 2025 MariaDB. All rights reserved.

spinner

Last updated

Was this helpful?