Helm is useful because it turns a large amount of stateful Kubernetes YAML into a manageable interface. For MySQL replication, that is a big productivity gain - but only if you still understand the storage, service, and topology choices hiding underneath the chart values.
What Helm helps with here
- packaging many related resources together
- giving you a repeatable values file
- making upgrades and rollbacks more structured
- reducing manual YAML assembly for replication setups
Helm does not remove the need to understand stateful behavior. It mostly makes it easier to deploy that behavior consistently.
Prerequisites
- a cluster with a working StorageClass
helmandkubectlinstalled- enough resources for a primary and at least one replica
If the storage layer is not healthy, the chart will not save you. It will just fail in a more packaged way.
Create a namespace
kubectl create namespace db
Install a replication chart
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update
helm install mysql bitnami/mysql \
--namespace db \
--set architecture=replication \
--set auth.rootPassword='ChangeMe123!' \
--set primary.persistence.size=10Gi \
--set secondary.replicaCount=1
That works for a quick start, but long-term you should prefer a versioned values.yaml checked into git.
A small values file is often the better habit
architecture: replication
auth:
rootPassword: "ChangeMe123!"
username: "app"
password: "AppPassword123!"
database: "appdb"
primary:
persistence:
size: 10Gi
secondary:
replicaCount: 1
Apply it with:
helm install mysql bitnami/mysql -n db -f values.yaml
Why this page belongs with the rest of the chain
Even when you use a chart, the same underlying ideas still apply:
- persistence still depends on PVCs and StorageClasses
- stable identities still depend on StatefulSet-style behavior
- read/write paths still depend on Services
- replication still depends on operational discipline
That is why this page naturally connects to:
kubernetes-quickstart-mysql-database.mdkubernetes-quickstart-mysql-replication.mdkubernetes-quickstart-stateful-apps.md
Verify what Helm actually created
kubectl get pods -n db
kubectl get svc -n db
helm status mysql -n db
helm get values mysql -n db
This is important because Helm reduces typing, but it can also hide what objects are really present if you stop looking underneath.
Read/write access patterns
Most MySQL charts expose a primary write service and a secondary read service.
Typical app-level split:
MYSQL_WRITE_HOST=mysql-primary.db.svc.cluster.localMYSQL_READ_HOST=mysql-secondary.db.svc.cluster.local
If your application is not ready for split routing, keep reads on the primary until you can verify client behavior carefully.
Resource and storage tuning still matter
Charts make defaults easier, not always better.
You still need to think about:
- CPU and memory requests
- disk capacity
- IO performance
- replication lag
- backup policy
The chart can start the cluster for you, but it cannot choose the right operational posture for your workload.
Useful lifecycle commands
helm list -n db
helm status mysql -n db
helm get values mysql -n db
helm upgrade mysql -n db -f values.yaml
helm rollback mysql -n db 1
These commands are what make Helm attractive operationally: upgrades and rollbacks become more reviewable and repeatable.
Accessing the cluster safely
For local debugging, prefer port-forward first:
kubectl port-forward -n db svc/mysql-primary 3306:3306
That ties this page directly to kubernetes-quickstart-port-forward.md.
FAQ
Q: Does using Helm mean I no longer need to understand StatefulSets or PVCs? A: No. Helm hides repetition, not architecture. You still need to understand the workload and storage model underneath the chart.
Q: What is the biggest Helm mistake with databases? A: Treating chart defaults as production-ready without understanding resource, storage, backup, and failover tradeoffs.
Q: Should I keep MySQL values only in helm install --set commands?
A: Usually no. A checked-in values.yaml is far easier to review, diff, and roll back safely.
Next reading
- Continue with
kubernetes-quickstart-mysql-replication.mdif you want the topology and failover mindset. - Revisit
kubernetes-quickstart-storageclass.mdif storage behavior feels fuzzy. - Read
kubernetes-quickstart-stateful-apps.mdfor the broader operational perspective.
Wrap-up
Helm is valuable because it turns a complicated deployment into a more manageable release artifact. But for stateful systems, understanding the values is still much more important than successfully typing helm install.