mariadb
Fast, reliable, scalable, and easy to use open-source relational database system. MariaDB Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. Highly available MariaDB cluster.
About this chart
MariaDB
MariaDB is one of the most popular database servers in the world. It’s made by the original developers of MySQL and guaranteed to stay open source. Notable users include Wikipedia, Facebook and Google.
MariaDB is developed as open source software and as a relational database it provides an SQL interface for accessing data. The latest versions of MariaDB also include GIS and JSON features.
TL;DR
$ helm install <helm-repo>/mariadb
$ helm install stable/mariadb
Introduction
This chart bootstraps a MariaDB replication cluster deployment on a Kubernetes cluster using the Helm package manager.
Bitnami charts can be used with Kubeapps for deployment and management of Helm Charts in clusters. This chart has been tested to work with NGINX Ingress, cert-manager, fluentd and Prometheus on top of the BKPR.
Prerequisites
- Kubernetes 1.10+
- PV provisioner support in the underlying infrastructure
Installing the Chart
To install the chart with the release name my-release:
$ helm install --name my-release <helm-repo>/mariadb
$ helm install --name my-release stable/mariadb The command deploys MariaDB on the Kubernetes cluster in the default configuration. The configuration section lists the parameters that can be configured during installation.
Tip: List all releases using
helm list
Uninstalling the Chart
To uninstall/delete the my-release deployment:
$ helm delete my-release
The command removes all the Kubernetes components associated with the chart and deletes the release.
Configuration
The following table lists the configurable parameters of the MariaDB chart and their default values.
| Parameter | Description | Default |
|---|---|---|
global.imageRegistry | Global Docker image registry | nil |
global.imagePullSecrets | Global Docker registry secret names as an array | [] (does not add image pull secrets to deployed pods) |
image.registry | MariaDB image registry | docker.io |
image.repository | MariaDB Image name | bitnami/mariadb |
image.tag | MariaDB Image tag | {VERSION} |
image.pullPolicy | MariaDB image pull policy | Always if imageTag is latest, else IfNotPresent |
image.pullSecrets | Specify docker-registry secret names as an array | [] (does not add image pull secrets to deployed pods) |
image.debug | Specify if debug logs should be enabled | false |
service.type | Kubernetes service type | ClusterIP |
service.clusterIp | Specific cluster IP when service type is cluster IP. Use None for headless service | nil |
service.port | MySQL service port | 3306 |
serviceAccount.create | Specifies whether a ServiceAccount should be created | false |
serviceAccount.name | The name of the ServiceAccount to create | Generated using the mariadb.fullname template |
rbac.create | Create and use RBAC resources | false |
securityContext.enabled | Enable security context | true |
securityContext.fsGroup | Group ID for the container | 1001 |
securityContext.runAsUser | User ID for the container | 1001 |
existingSecret | Use Existing secret for Password details (rootUser.password, db.password, replication.password will be ignored and picked up from this secret) | |
rootUser.password | Password for the root user. Ignored if existing secret is provided. | random 10 character alphanumeric string |
rootUser.forcePassword | Force users to specify a password | false |
db.user | Username of new user to create | nil |
db.password | Password for the new user. Ignored if existing secret is provided. | random 10 character alphanumeric string if db.user is defined |
db.name | Name for new database to create | my_database |
replication.enabled | MariaDB replication enabled | true |
replication.user | MariaDB replication user | replicator |
replication.password | MariaDB replication user password. Ignored if existing secret is provided. | random 10 character alphanumeric string |
initdbScripts | Dictionary of initdb scripts | nil |
initdbScriptsConfigMap | ConfigMap with the initdb scripts (Note: Overrides initdbScripts) | nil |
master.annotations[].key | key for the the annotation list item | nil |
master.annotations[].value | value for the the annotation list item | nil |
master.affinity | Master affinity (in addition to master.antiAffinity when set) | {} |
master.antiAffinity | Master pod anti-affinity policy | soft |
master.nodeSelector | Master node labels for pod assignment | {} |
master.tolerations | List of node taints to tolerate (master) | [] |
master.updateStrategy | Master statefulset update strategy policy | RollingUpdate |
master.persistence.enabled | Enable persistence using PVC | true |
master.persistence.existingClaim | Provide an existing PersistentVolumeClaim | nil |
master.persistence.mountPath | Path to mount the volume at | /bitnami/mariadb |
master.persistence.annotations | Persistent Volume Claim annotations | {} |
master.persistence.storageClass | Persistent Volume Storage Class | `` |
master.persistence.accessModes | Persistent Volume Access Modes | [ReadWriteOnce] |
master.persistence.size | Persistent Volume Size | 8Gi |
master.extraInitContainers | Additional init containers as a string to be passed to the tpl function (master) | |
master.config | Config file for the MariaDB Master server | _default values in the values.yaml file_ |
master.resources | CPU/Memory resource requests/limits for master node | {} |
master.livenessProbe.enabled | Turn on and off liveness probe (master) | true |
master.livenessProbe.initialDelaySeconds | Delay before liveness probe is initiated (master) | 120 |
master.livenessProbe.periodSeconds | How often to perform the probe (master) | 10 |
master.livenessProbe.timeoutSeconds | When the probe times out (master) | 1 |
master.livenessProbe.successThreshold | Minimum consecutive successes for the probe (master) | 1 |
master.livenessProbe.failureThreshold | Minimum consecutive failures for the probe (master) | 3 |
master.readinessProbe.enabled | Turn on and off readiness probe (master) | true |
master.readinessProbe.initialDelaySeconds | Delay before readiness probe is initiated (master) | 30 |
master.readinessProbe.periodSeconds | How often to perform the probe (master) | 10 |
master.readinessProbe.timeoutSeconds | When the probe times out (master) | 1 |
master.readinessProbe.successThreshold | Minimum consecutive successes for the probe (master) | 1 |
master.readinessProbe.failureThreshold | Minimum consecutive failures for the probe (master) | 3 |
master.podDisruptionBudget.enabled | If true, create a pod disruption budget for master pods. | false |
master.podDisruptionBudget.minAvailable | Minimum number / percentage of pods that should remain scheduled | 1 |
master.podDisruptionBudget.maxUnavailable | Maximum number / percentage of pods that may be made unavailable | nil |
slave.replicas | Desired number of slave replicas | 1 |
slave.annotations[].key | key for the the annotation list item | nil |
slave.annotations[].value | value for the the annotation list item | nil |
slave.affinity | Slave affinity (in addition to slave.antiAffinity when set) | {} |
slave.antiAffinity | Slave pod anti-affinity policy | soft |
slave.nodeSelector | Slave node labels for pod assignment | {} |
slave.tolerations | List of node taints to tolerate for (slave) | [] |
slave.updateStrategy | Slave statefulset update strategy policy | RollingUpdate |
slave.persistence.enabled | Enable persistence using a PersistentVolumeClaim | true |
slave.persistence.annotations | Persistent Volume Claim annotations | {} |
Deploy mariadb with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has mariadb on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartmariadb is pinned at v6.1.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply