'MariaDB StatefulSet Galera pods using ceph PVC

I am beginner for Kubernetes, I am working on a project related to MariaDB with Kubernetes (StatefulSets). I also want that to be CentOS7/8 with MariaDB 10.6.5 replicated Galera pods. This pods should be able to run the system commands, so that we can control httpd service in the same pods. Also I want this pods to be exposed to external IP via MetalLB.

I have deployed the same setup with Deployment of single replica and also able to expose to external IP. Now I need to build a Stateful deployment with above consideration.

I am using the bare metal concept for our Production with Kubernetes and Ceph storage.

Please help me to configure with the YAML files with examples.

Thank you all in advance.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source