The MySQL Helm chart provides an easy way to deploy and manage MySQL instances in your Kubernetes environment. This chart includes configurations for persistence, resource management, and scalability to suit various use cases.
Add Helm Repository
Before installing the MySQL chart, add the repository to your Helm installation and update the repository index:
See Helm Repository Documentation for more details.
Install Helm Chart
To install the MySQL Helm chart, run the following command:
Replace [RELEASE_NAME]
with your desired release name.
For example:
You can customize the installation by providing a custom values.yaml
file or overriding values via the command line.
See Helm Install Documentation for further details.
Uninstall Helm Chart
To uninstall the MySQL Helm chart and remove all associated Kubernetes resources, run:
For example:
See Helm Uninstall Documentation for more information.
Configuration
The following table describes the configurable parameters of the MySQL Helm chart and their default values:
Input | Type | Description | Default |
---|---|---|---|
|
| Root password for the MySQL instance. Leave unset for default random generation. | None |
|
| Update strategy for the deployment. Options: |
|
|
| Size of the persistent volume claim (PVC) for storing MySQL data. |
|
|
| Docker image and tag for the MySQL container. |
|
|
| Minimum CPU resources required by the MySQL container. |
|
|
| Minimum memory resources required by the MySQL container. |
|
|
| Maximum CPU resources the MySQL container can use. |
|
|
| Maximum memory resources the MySQL container can use. |
|
|
| Custom MySQL configuration to be layered on top of the default config. Provided as a full INI file. |
|
You can override these values in your values.yaml
file or pass them as flags when installing the chart.
Example values.yaml
File
To use this configuration, save it in a values.yaml
file and pass it to the Helm install command:
Example: Providing Custom MySQL Configuration
To override or add to the default MySQL configuration, provide your own my.cnf
content using the customMyCnf
value. This will be mounted as /etc/mysql/conf.d/custom.cnf
in the container and layered on top of the default config.
Example values.yaml
:
This allows you to specify any MySQL configuration options you need, without losing the chart's defaults.
Features
Persistence: The chart supports persistent volume claims to store MySQL data across pod restarts.
Customizable Resources: Define resource requests and limits to optimize performance and manage costs.
Scalable: Use the
updateStrategy
configuration to handle updates with zero downtime.Pre-configured Settings: Defaults are optimized for a variety of workloads.
Advanced Usage
Custom Secrets for Root Password
You can provide a pre-existing Kubernetes secret for the MySQL root password. To enable this, modify the values.yaml
file with the secret name:
Ensure the secret is created before deploying the chart:
Contributing
We welcome contributions to improve this Helm chart. Please refer to the CONTRIBUTING.md file for guidelines.
Code of Conduct
To ensure a respectful and collaborative community, please adhere to our Code of Conduct.
License
This project is licensed under the LICENSE. Please review it for terms of use.
Prerequisites
Kubernetes 1.19+
Helm 3+
Build By
Zop.dev
Category
See Helm Install Documentation for more information.
Need Help with This Integration?
We’re here to make setup smooth. Let us know what’s confusing—or which tools you'd like to see integrated next.
Need technical support or have product questions?