radondb-mysql

by KubeSphere

Helm chartv1.0.1App 5.7.33Verified publisher

High Availability MySQL Cluster, Open Source.

About this chart

RadonDB MySQL

RadonDB MySQL is an open-source, cloud-native, High-Availability cluster solutions based on MySQL.

Github

https://github.com/radondb/radondb-mysql-kubernetes

Features

  • High availability MySQL database
    • Non-centralized automatic leader election
    • Second level switch leader to follower
    • Strongly consistent data for cluster switching
  • Cluster management
  • Monitoring and alerting
  • Logs
  • Account management

Introduction

This chart bootstraps a single leader and multiple followers MySQL deployment on a Kubernetes cluster using the Helm package manager.

Prerequisites

  • Kubernetes 1.10+ with Beta APIs enabled
  • PV provisioner support in the underlying infrastructure
  • Helm 2.11+ or Helm 3.0-beta3+

Installing the Chart

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

## For Helm v2
$ helm install . --name my-release

## For Helm v3
$ helm install --name my-release .

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

Uninstall

To uninstall/delete the my-release deployment:

$ helm delete my-release

To delete the pvc:

kubectl delete pvc data-my-release-radondb-mysql-0
kubectl delete pvc data-my-release-radondb-mysql-1
kubectl delete pvc data-my-release-radondb-mysql-2

The commands remove all the Kubernetes components associated with the chart and deletes the release completely.

Configuration

The following table lists the configurable parameters of the RadonDB MySQL chart and their default values.

ParameterDescriptionDefault
imagePullPolicyImage pull policyIfNotPresent
fullnameOverrideCustom fullname override for the chart
nameOverrideCustom name override for the chart
replicaCountThe number of pods3
busybox.imagebusybox image repository.busybox
busybox.tagbusybox image tag.1.32
mysql.imagemysql image repository.xenondb/percona
mysql.tagmysql image tag.5.7.33
mysql.allowEmptyRootPasswordIf set true, allow a empty root password.true
mysql.mysqlRootPasswordPassword for the root user.
mysql.mysqlReplicationPasswordPassword for the qc_repl user.Repl_123, random 12 characters if not set
mysql.mysqlUserUsername of new user to create.qingcloud
mysql.mysqlPasswordPassword for the new user.Qing@123, random 12 characters if not set
mysql.mysqlDatabaseName for new database to create.qingcloud
mysql.initTokudbInstall tokudb engine.false
mysql.argsAdditional arguments to pass to the MySQL container.[]
mysqlconfigFiles.node.cnfMysql configuration fileSee values.yaml
mysql.livenessProbe.initialDelaySecondsDelay before mysql liveness probe is initiated30
mysql.livenessProbe.periodSecondsHow often to perform the mysql probe10
mysql.livenessProbe.timeoutSecondsWhen the mysql probe times out5
mysql.livenessProbe.successThresholdMinimum consecutive successes for the mysql probe to be considered successful after having failed.1
mysql.livenessProbe.failureThresholdMinimum consecutive failures for the mysql probe to be considered failed after having succeeded.3
mysql.readinessProbe.initialDelaySecondsDelay before mysql readiness probe is initiated10
mysql.readinessProbe.periodSecondsHow often to perform the mysql probe10
mysql.readinessProbe.timeoutSecondsWhen the mysql probe times out1
mysql.readinessProbe.successThresholdMinimum consecutive successes for the mysql probe to be considered successful after having failed.1
mysql.readinessProbe.failureThresholdMinimum consecutive failures for the mysql probe to be considered failed after having succeeded.3
mysql.extraEnvVarsAdditional environment variables as a string to be passed to the tpl function
mysql.resourcesCPU/Memory resource requests/limits for mysql.Memory: 256Mi, CPU: 100m
xenon.imagexenon image repository.xenondb/xenon
xenon.tagxenon image tag.1.1.5-alpha
xenon.argsAdditional arguments to pass to the xenon container.[]
xenon.extraEnvVarsAdditional environment variables as a string to be passed to the tpl function
xenon.livenessProbe.initialDelaySecondsDelay before xenon liveness probe is initiated30
xenon.livenessProbe.periodSecondsHow often to perform the xenon probe10
xenon.livenessProbe.timeoutSecondsWhen the xenon probe times out5
xenon.livenessProbe.successThresholdMinimum consecutive successes for xenon probe to be considered successful after having failed.1
xenon.livenessProbe.failureThresholdMinimum consecutive failures for the xenon probe to be considered failed after having succeeded.3
xenon.readinessProbe.initialDelaySecondsDelay before xenon readiness probe is initiated10
xenon.readinessProbe.periodSecondsHow often to perform the xenon probe10
xenon.readinessProbe.timeoutSecondsWhen the xenon probe times out1
xenon.readinessProbe.successThresholdMinimum consecutive successes for xenon probe to be considered successful after having failed.1
xenon.readinessProbe.failureThresholdMinimum consecutive failures for the xenon probe to be considered failed after having succeeded.3
xenon.resourcesCPU/Memory resource requests/limits for xenon.Memory: 128Mi, CPU: 50m
metrics.enabledStart a side-car prometheus exportertrue
metrics.imageExporter imageprom/mysqld-exporter
metrics.tagExporter imagev0.12.1
metrics.annotationsExporter annotations{}
metrics.livenessProbe.initialDelaySecondsDelay before metrics liveness probe is initiated15
metrics.livenessProbe.timeoutSecondsWhen the probe times out5
metrics.readinessProbe.initialDelaySecondsDelay before metrics readiness probe is initiated5
metrics.readinessProbe.timeoutSecondsWhen the probe times out1
metrics.serviceMonitor.enabledSet this to true to create ServiceMonitor for Prometheus operatortrue
metrics.serviceMonitor.namespaceOptional namespace in which to create ServiceMonitornil
metrics.serviceMonitor.intervalScrape interval. If not set, the Prometheus default scrape interval is used10s
metrics.serviceMonitor.scrapeTimeoutScrape timeout. If not set, the Prometheus default scrape timeout is usednil
metrics.serviceMonitor.selectorDefault to kube-prometheus install, but should be set according to Prometheus install{ prometheus: kube-prometheus }
slowLogTailIf set to true runs a container to tail mysql-slow.log in the podtrue
resourcesResource requests/limitMemory: 32Mi, CPU: 10m
service.annotationsKubernetes annotations for service{}
service.typeKubernetes service typeNodePort

Deploy radondb-mysql with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has radondb-mysql 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 chartradondb-mysql is pinned at v1.0.1 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