mysql

by KvalitetsIT

Helm chartv9.10.4App 8.0.33Verified publisher

MySQL is a fast, reliable, scalable, and easy to use open source relational database system. Designed to handle mission-critical, heavy-load production applications.

About this chart

MySQL packaged by Bitnami

MySQL is a fast, reliable, scalable, and easy to use open source relational database system. Designed to handle mission-critical, heavy-load production applications.

Overview of MySQL

Trademarks: This software listing is packaged by Bitnami. The respective trademarks mentioned in the offering are owned by the respective companies, and use of them does not imply any affiliation or endorsement.

TL;DR

helm install my-release oci://registry-1.docker.io/bitnamicharts/mysql

Introduction

This chart bootstraps a MySQL 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.

Prerequisites

  • Kubernetes 1.19+
  • Helm 3.2.0+
  • PV provisioner support in the underlying infrastructure

Installing the Chart

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

helm install my-release oci://registry-1.docker.io/bitnamicharts/mysql

These commands deploy MySQL 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

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.

Parameters

Global parameters

NameDescriptionValue
global.imageRegistryGlobal Docker image registry""
global.imagePullSecretsGlobal Docker registry secret names as an array[]
global.storageClassGlobal StorageClass for Persistent Volume(s)""

Common parameters

NameDescriptionValue
kubeVersionForce target Kubernetes version (using Helm capabilities if not set)""
nameOverrideString to partially override common.names.fullname template (will maintain the release name)""
fullnameOverrideString to fully override common.names.fullname template""
namespaceOverrideString to fully override common.names.namespace""
clusterDomainCluster domaincluster.local
commonAnnotationsCommon annotations to add to all MySQL resources (sub-charts are not considered). Evaluated as a template{}
commonLabelsCommon labels to add to all MySQL resources (sub-charts are not considered). Evaluated as a template{}
extraDeployArray with extra yaml to deploy with the chart. Evaluated as a template[]
serviceBindings.enabledCreate secret for service binding (Experimental)false
diagnosticMode.enabledEnable diagnostic mode (all probes will be disabled and the command will be overridden)false
diagnosticMode.commandCommand to override all containers in the deployment["sleep"]
diagnosticMode.argsArgs to override all containers in the deployment["infinity"]

MySQL common parameters

NameDescriptionValue
image.registryMySQL image registrydocker.io
image.repositoryMySQL image repositorybitnami/mysql
image.tagMySQL image tag (immutable tags are recommended)8.0.33-debian-11-r17
image.digestMySQL image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag""
image.pullPolicyMySQL image pull policyIfNotPresent
image.pullSecretsSpecify docker-registry secret names as an array[]
image.debugSpecify if debug logs should be enabledfalse
architectureMySQL architecture (standalone or replication)standalone
auth.rootPasswordPassword for the root user. Ignored if existing secret is provided""
auth.createDatabaseWhether to create the .Values.auth.database or nottrue
auth.databaseName for a custom database to createmy_database
auth.usernameName for a custom user to create""
auth.passwordPassword for the new user. Ignored if existing secret is provided""
auth.replicationUserMySQL replication userreplicator
auth.replicationPasswordMySQL replication user password. Ignored if existing secret is provided""
auth.existingSecretUse existing secret for password details. The secret has to contain the keys mysql-root-password, mysql-replication-password and mysql-password""
auth.usePasswordFilesMount credentials as files instead of using an environment variablefalse
auth.customPasswordFilesUse custom password files when auth.usePasswordFiles is set to true. Define path for keys root and user, also define replicator if architecture is set to replication{}
initdbScriptsDictionary of initdb scripts{}
initdbScriptsConfigMapConfigMap with the initdb scripts (Note: Overrides initdbScripts)""

MySQL Primary parameters

NameDescriptionValue
primary.nameName of the primary database (eg primary, master, leader, ...)primary
primary.commandOverride default container command on MySQL Primary container(s) (useful when using custom images)[]
primary.argsOverride default container args on MySQL Primary container(s) (useful when using custom images)[]
primary.lifecycleHooksfor the MySQL Primary container(s) to automate configuration before or after startup{}
primary.hostAliasesDeployment pod host aliases[]
primary.configurationConfigure MySQL Primary with a custom my.cnf file""
primary.existingConfigmapName of existing ConfigMap with MySQL Primary configuration.""
primary.updateStrategy.typeUpdate strategy type for the MySQL primary statefulsetRollingUpdate
primary.podAnnotationsAdditional pod annotations for MySQL primary pods{}
primary.podAffinityPresetMySQL primary pod affinity preset. Ignored if primary.affinity is set. Allowed values: soft or hard""
primary.podAntiAffinityPresetMySQL primary pod anti-affinity preset. Ignored if primary.affinity is set. Allowed values: soft or hardsoft
primary.nodeAffinityPreset.typeMySQL primary node affinity preset type. Ignored if primary.affinity is set. Allowed values: soft or hard""
primary.nodeAffinityPreset.keyMySQL primary node label key to match Ignored if primary.affinity is set.""
primary.nodeAffinityPreset.valuesMySQL primary node label values to match. Ignored if primary.affinity is set.[]
primary.affinityAffinity for MySQL primary pods assignment{}
primary.nodeSelectorNode labels for MySQL primary pods assignment{}
primary.tolerationsTolerations for MySQL primary pods assignment[]
primary.priorityClassNameMySQL primary pods' priorityClassName""
primary.runtimeClassNameMySQL primary pods' runtimeClassName""
primary.schedulerNameName of the k8s scheduler (other than default)""
primary.terminationGracePeriodSecondsIn seconds, time the given to the MySQL primary pod needs to terminate gracefully""
`primary.top

Deploy mysql with OpenTenant

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