-
-
Notifications
You must be signed in to change notification settings - Fork 259
Don't make MySQL a Pet or put it on NFS #109
Comments
It might be too complex to handle inside this particular project... but having this project around means I can tinker with getting the pattern working inside Kubernetes. |
So I just moved MySQL's database PV from localStorage to a NFS PVC, which will allow the MySQL server to run on any node with persistence. But I have been digging further on this topic for other projects, and found a couple interesting MySQL Operators for Kubernetes which may be able to work for this: Whether I can get them working with RPi/ARM/32 bit is another matter... |
You should take a look at spinning up a GlusterFS cluster for persistent data. It even has an API for Kubernetes called Heketi. I have a 3 node Pi4 cluster set up and it's pretty neat. I had to compile glusterfs version 6 on each of my Pi's because the packaged one is too old for Heketi. I'll publish my ansible roles if you want to take a look. Your containers can be HA, why not the data :) |
This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution! Please read this blog post to see the reasons why I mark issues as stale. |
This issue is no longer marked for closure. |
Originally, I used
nodeAffinity
with the MySQL PV to restrict it tokube5
, and I added ataint
to the MySQL Deployment to only deploy tokube5
as well. Then I switched it to use an NFS PVC so I could remove the taint and make things not as fragile... but then I typed this note to myself:Don't ever run MySQL on NFS. Not even once. Wow. It... works. But slow doesn't even begin to describe the experience.
The holy grail would be some sort of MySQL replication setup where:
I was intrigued by this MySQL on Autopilot blog post, specifically:
See also: https://github.com/autopilotpattern/mysql
The text was updated successfully, but these errors were encountered: