Light HA SQL on Kubernetes

I'm investigating the most straightforward way to have some light HA (MariaDB) SQL server on a Linode cluster. Just having a read-only server during the reboot of the main one is enough. I prefer limited, understandable YAML files over magic charts.

I found https://kubernetes.io/docs/tasks/run-application/run-replicated-stateful-application/, but the XtraBackup and SQL contain share the storage volume, which isn't possible yet on Linode.

Bitnami and others have MariaDB Galera charts, but as I understand, you need to point to one master to improve write performance, and when it's down, you need to choose one to bootstrap from manually.

I would prefer not to run my storage engine on the Linode host. Is my best option, adding XtraBackup to the SQL container? This apprough wouldn't follow the one service per container principle?

1 Reply

Hi there,

While PersistentVolumeClaims on LKE utilize ReadWriteOnce mode, there is a workaround for this. When used with LKE, Rook can mount a Linode Block Storage PVC which uses ReadWriteOnce permissions. The volume can then be leveraged as a network file system and exported as a storage class that uses ReadWriteMany permissions. This may provide some flexibility in your options. In case you were interested in testing this out I'll link this guide below:

I share this as you mentioned being interested in using the Kubernetes Stateful Application guide but were concerned about the limitation of the LKE PVC mode.

Hope this helps get you pointed in the direction of a solution.

-- BD.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct