mariadb-galera

by SVTECH-NMAA

Helm chartv5.10.11App 10.5.8Verified publisher

MariaDB Galera is a multi-master database cluster solution for synchronous replication and high availability.

About this chart

MariaDB Galera

MariaDB Galera is a multi-master database cluster solution for synchronous replication and high availability.

TL;DR

$ helm repo add bitnami https://charts.bitnami.com/bitnami
$ helm install my-release bitnami/mariadb-galera

Introduction

This chart bootstraps a MariaDB Galera cluster on Kubernetes 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 fluentd and Prometheus on top of BKPR.

Prerequisites

  • Kubernetes 1.10+
  • Helm 3.1.0
  • PV provisioner support in the underlying infrastructure

Installing the Chart

Add the bitnami charts repo to Helm:

$ helm repo add bitnami https://charts.bitnami.com/bitnami

To install the chart with the release name my-release:

$ helm install my-release bitnami/mariadb-galera

The command deploys MariaDB Galera on the Kubernetes cluster in the default configuration. The Parameters section lists the parameters that can be configured during installation.

Tip: List all releases using helm list

Uninstalling the Chart

For a graceful termination, set the replica count of the Pods in the mariadb-galera StatefulSet to 0:

$ kubectl scale sts my-release-mariadb-galera --replicas=0

To uninstall/delete the my-release release:

$ helm delete --purge my-release

The command removes all the Kubernetes components associated with the chart and deletes the release.

Parameters

The following table lists the configurable parameters of the MariaDB Galera chart and their default values.

ParameterDescriptionDefault
global.imageRegistryGlobal Docker image registrynil
global.imagePullSecretsGlobal Docker registry secret names as an array[] (does not add image pull secrets to deployed pods)
global.storageClassGlobal storage class for dynamic provisioningnil
image.registryMariaDB Galera image registrydocker.io
image.repositoryMariaDB Galera Image namebitnami/mariadb-galera
image.tagMariaDB Galera Image tag{TAG_NAME}
image.pullPolicyMariaDB Galera image pull policyIfNotPresent
image.pullSecretsSpecify docker-registry secret names as an array[] (does not add image pull secrets to deployed pods)
image.debugSpecify if debug logs should be enabledfalse
nameOverrideString to partially override common.names.fullname template with a string (will prepend the release name)nil
fullnameOverrideString to fully override common.names.fullname template with a stringnil
schedulerNameName of the k8s scheduler (other than default)nil
service.typeKubernetes service typeClusterIP
service.portMariaDB service port3306
service.clusterIPSpecific cluster IP when service type is cluster IP. Use None for headless servicenil
service.nodePortKubernetes Service nodePortnil
service.externalIPsExternal IP list to use with ClusterIP service type[]
service.loadBalancerIPloadBalancerIP if service type is LoadBalancernil
service.loadBalancerSourceRangesAddress that are allowed when svc is LoadBalancer[]
service.annotationsAdditional annotations for MariaDB Galera service{}
service.headless.annotationsAnnotations for the headless service. May be useful for setting service.alpha.kubernetes.io/tolerate-unready-endpoints="true" when using peer-finder.{}
hostAliasesAdd deployment host aliases[]
clusterDomainKubernetes DNS Domain name to usecluster.local
serviceAccount.createSpecify whether a ServiceAccount should be createdfalse
serviceAccount.nameThe name of the ServiceAccount to createGenerated using the common.names.fullname template
rbac.createSpecify whether RBAC resources should be created and usedfalse
securityContext.enabledEnable security contexttrue
securityContext.fsGroupGroup ID for the container filesystem1001
securityContext.runAsUserUser ID for the container1001
`ex

Deploy mariadb-galera with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has mariadb-galera 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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartmariadb-galera is pinned at v5.10.11 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. 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