|
| 1 | +--- |
| 2 | +title: Run MariaDB Enterprise Server |
| 3 | +menu: |
| 4 | + docs_{{ .version }}: |
| 5 | + identifier: guides-mariadb-privateregistry-enterprise |
| 6 | + name: Enterprise Server |
| 7 | + parent: guides-mariadb-privateregistry |
| 8 | + weight: 20 |
| 9 | +menu_name: docs_{{ .version }} |
| 10 | +section_menu_id: guides |
| 11 | +--- |
| 12 | + |
| 13 | +> New to KubeDB? Please start [here](/docs/README.md). |
| 14 | +
|
| 15 | +# Deploy MariaDB Enterprise Server with KubeDB |
| 16 | + |
| 17 | +[MariaDB Enterprise Server](https://mariadb.com/docs/server/deploy/deployment-methods/docker/enterprise-server/) is MariaDB Corporation's commercially-supported build of MariaDB. This guide shows how to point a KubeDB `MariaDB` database at a MariaDB Enterprise Server image instead of the community build. |
| 18 | + |
| 19 | +This is a specialized case of the generic [private Docker registry](/docs/guides/mariadb/private-registry/quickstart/index.md) mechanism; read that guide first for the general concepts (`MariaDBVersion` catalog, `imagePullSecrets`). This page only covers what's specific to MariaDB Enterprise Server. |
| 20 | + |
| 21 | +## Before You Begin |
| 22 | + |
| 23 | +- Read [concept of MariaDB Version Catalog](/docs/guides/mariadb/concepts/mariadb-version/index.md) to learn the details of the `MariaDBVersion` object, including the `spec.distribution` field. |
| 24 | +- You need a Kubernetes cluster, with `kubectl` configured to communicate with it. If you don't already have one, create one with [kind](https://kind.sigs.k8s.io/docs/user/quick-start/). |
| 25 | +- You need an active MariaDB Enterprise Server subscription and a **Customer Download Token**, available from the [MariaDB Customer Portal](https://customers.mariadb.com/) under your account's download token page. This token is what grants pull access to `docker.mariadb.com`; it is not a runtime license and is never mounted into the database pod. |
| 26 | + |
| 27 | +## No in-cluster license is required |
| 28 | + |
| 29 | +Unlike some other commercial database images, **MariaDB Enterprise Server does not check any license key at runtime.** `mariadbd` boots and runs exactly like the community edition once the image is pulled. Access control is entirely at the container registry level: MariaDB Corporation gates pulls from `docker.mariadb.com` behind your Customer Download Token, the same way any other private registry works. There is no separate license Secret, ConfigMap, or environment variable to configure on the `MariaDB` CR beyond the standard `imagePullSecrets`. |
| 30 | + |
| 31 | +## 1. Create an ImagePullSecret |
| 32 | + |
| 33 | +Use your MariaDB ID as the username and your Customer Download Token as the password: |
| 34 | + |
| 35 | +```bash |
| 36 | +$ kubectl create secret docker-registry -n demo mariadb-enterprise-registry \ |
| 37 | + --docker-server=docker.mariadb.com \ |
| 38 | + --docker-username=<your-mariadb-id> \ |
| 39 | + --docker-password=<your-customer-download-token> \ |
| 40 | + --docker-email=<your-email> |
| 41 | +secret/mariadb-enterprise-registry created |
| 42 | +``` |
| 43 | + |
| 44 | +(See [Customer access to docker.mariadb.com](https://mariadb.com/docs/tools/mariadb-enterprise-operator/customer-access-to-docker-mariadb-com) for how to retrieve your token.) |
| 45 | + |
| 46 | +## 2. Add a MariaDBVersion catalog entry for Enterprise Server |
| 47 | + |
| 48 | +KubeDB ships a ready-made `11.4.10-enterprise` `MariaDBVersion` pointing at `docker.mariadb.com/enterprise-server:11.4.10` (added via the `kubedb-catalog` chart). If you need a different Enterprise Server version, create your own entry the same way: |
| 49 | + |
| 50 | +```yaml |
| 51 | +apiVersion: catalog.kubedb.com/v1alpha1 |
| 52 | +kind: MariaDBVersion |
| 53 | +metadata: |
| 54 | + name: 11.4.10-enterprise |
| 55 | +spec: |
| 56 | + coordinator: |
| 57 | + image: ghcr.io/kubedb/mariadb-coordinator:v0.47.0-rc.2 |
| 58 | + db: |
| 59 | + image: docker.mariadb.com/enterprise-server:11.4.10 |
| 60 | + distribution: Enterprise |
| 61 | + exporter: |
| 62 | + image: docker.io/prom/mysqld-exporter:v0.18.0 |
| 63 | + initContainer: |
| 64 | + image: ghcr.io/kubedb/mariadb-init:0.9.0 |
| 65 | + podSecurityPolicies: |
| 66 | + databasePolicyName: maria-db |
| 67 | + version: 11.4.10 |
| 68 | +``` |
| 69 | +
|
| 70 | +`spec.distribution: Enterprise` is descriptive metadata; it does not change how the operator reconciles the database. Only `spec.db.image` and the pull secret determine which image actually runs. |
| 71 | + |
| 72 | +## 3. Deploy a MariaDB using the Enterprise Server image |
| 73 | + |
| 74 | +```yaml |
| 75 | +apiVersion: kubedb.com/v1 |
| 76 | +kind: MariaDB |
| 77 | +metadata: |
| 78 | + name: mariadb-enterprise |
| 79 | + namespace: demo |
| 80 | +spec: |
| 81 | + version: "11.4.10-enterprise" |
| 82 | + storage: |
| 83 | + storageClassName: "standard" |
| 84 | + accessModes: |
| 85 | + - ReadWriteOnce |
| 86 | + resources: |
| 87 | + requests: |
| 88 | + storage: 1Gi |
| 89 | + podTemplate: |
| 90 | + spec: |
| 91 | + imagePullSecrets: |
| 92 | + - name: mariadb-enterprise-registry |
| 93 | + deletionPolicy: WipeOut |
| 94 | +``` |
| 95 | + |
| 96 | +```bash |
| 97 | +$ kubectl apply -f mariadb-enterprise.yaml |
| 98 | +mariadb.kubedb.com/mariadb-enterprise created |
| 99 | +``` |
| 100 | + |
| 101 | +Check that the pod comes up and is pulling from `docker.mariadb.com`: |
| 102 | + |
| 103 | +```bash |
| 104 | +$ kubectl get pods -n demo |
| 105 | +NAME READY STATUS RESTARTS AGE |
| 106 | +mariadb-enterprise-0 1/1 Running 0 64s |
| 107 | +``` |
| 108 | + |
| 109 | +## Cleaning up |
| 110 | + |
| 111 | +```bash |
| 112 | +$ kubectl delete mariadb -n demo mariadb-enterprise |
| 113 | +mariadb.kubedb.com "mariadb-enterprise" deleted |
| 114 | +$ kubectl delete secret -n demo mariadb-enterprise-registry |
| 115 | +``` |
| 116 | + |
| 117 | +## Known limitations |
| 118 | + |
| 119 | +The exact `docker.mariadb.com/enterprise-server` image path and tag naming in this guide have not been verified against a live pull with a real Customer Download Token. Confirm the path in the [MariaDB Enterprise Docker Registry documentation](https://mariadb.com/docs/server/server-management/automated-mariadb-deployment-and-administration/docker-and-mariadb/mariadb-enterprise-docker-registry-for-mariadb-enterprise-server) before relying on this in production. |
| 120 | + |
| 121 | +## Next Steps |
| 122 | + |
| 123 | +- Detail concepts of [MariaDBVersion object](/docs/guides/mariadb/concepts/mariadb-version/index.md). |
| 124 | +- Detail concepts of [MariaDB object](/docs/guides/mariadb/concepts/mariadb/index.md). |
| 125 | +- Want to hack on KubeDB? Check our [contribution guidelines](/docs/CONTRIBUTING.md). |
0 commit comments