Це відео не доступне.
Перепрошуємо.

[10] Deploying the Mariadb Galera replicated database in Kubernetes

Поділитися
Вставка
  • Опубліковано 15 сер 2024
  • In this video I am deploying a replicated database cluster developed by Bitnami. The database cluster uses the mariadb galera setup and was customized for a use in a containerized environment. We will review a different way of using helm. Instead of adding a repo, bitnami recommends working with OCI addresses. We will take a look what the difference is between these addresses and a repo and how to work with both. We will download the values file for the chart, setup users, tls to synchronize data over an encrypted connection and create a database and customize the user and password for this deployment. We will add external storage through our
    external fileserver. As we have 2 storage provisioners available in our cluster, we will request the iscsi storage class to provision storage for our database
    application. Once we deployed our database we will access the same through the provided command upon successful installation and review that we can manage this database. At the end we will take a look at some trouble shooting items that might come in handy during the installation or at a unclean shutdown of the database.
    Chapters
    0:00 Why we need a load balancer
    0:25 Bitnami github review and the reasons for this deployment
    1:05 Installation options for the mariadb-galera cluster
    2:40 Adding and updating the bitnami repo to helm
    4:15 Downloading the values file for the mariadb galera cluster
    5:17 Working with oci addresses and helm
    6:09 Comparing chart version - oci vs repo
    7:55 Customizing the values file for our mariadb galera database cluster
    16:07 Deploying the mariadb galera cluster
    19:00 The significance of the installation output
    21:49 Accessing the mariadb galera cluster
    24:14 Troubleshooting - Database pods remain in a pending state
    25:45 Troubleshooting - Restoring a crashed cluster
    28:26 Summary
    Commands
    2:45 helm repo add bitnami charts.bitnami...
    3:15 helm repo update
    3:35 helm search repo bitnami
    4:45 helm show values bitnami/mariadb-galera < mariadb-galera-values.yaml
    5:35 helm show values oci://registry-1.docker.io/bitnamicharts/mariadb-galera
    6:10 helm show readme oci://registry-1.docker.io/bitnamicharts/mariadb-galera
    16:45 watch kubectl get all -n database
    17:00 helm install mariadb-galera-cluster bitnami/mariadb-galera -f mariadb-galera-values.yaml -n database
    21:55 kubectl run mariadb-galera-cluster-client --rm --tty -i --restart='Never' --namespace database --image docker.io/mariadb-galera:11.1.2-debian-11-r2 --command -- mysql -h mariadb-galera-cluster -P 3306 -u>YOUR ROOT USER< -p$(kubectl get secret --namespace database mariadb-galera-cluster -o jsonpath="{.data.mariadb-root-password}" | base64 -d) my_database
    23:15 show databases;
    23:40 use test;
    23:42 show tables;
    23:50 use my_database;
    25:55 helm show readme bitnami/mariadb-galera
    Sources
    Bitnami - bitnami.com/
    Bitnami Github - github.com/bit...
    Bitnami Helm Repo - charts.bitnami...
    Mariadb Galera - mariadb.com/kb...

КОМЕНТАРІ • 9

  • @ngbemartin
    @ngbemartin 6 місяців тому +1

    is this a default installation (on a blank cluster)? or do we have to have prerequisites (pv, pvc, and others)?

    • @ILoveOpenSourceSoftware
      @ILoveOpenSourceSoftware  6 місяців тому +1

      The answer is no. The installation I walk through in this video is on a blank cluster but you will need additional components such as external storage for persistence. The minimum requirements for this database setup are the cluster, the pod network, external storage (whichever one you want to use) and then the database. I have a lot more installed but from a "just getting the database to work" perspective these would be the components you would need.
      I hope that helps

  • @projets-martinngbe8744
    @projets-martinngbe8744 6 місяців тому

    I followed the configuration according to your video in an empty kubernetes cluster with 4 nodes.
    The maradb-galera-cluster-0 pod is in a “Pending” state

    • @ILoveOpenSourceSoftware
      @ILoveOpenSourceSoftware  6 місяців тому +1

      Hello, thanks for your comment. It is quite difficult to diagnose that issue. Most of the time I found that these pending states are a result of the external storage not being provisioned. Check the storage volume, that is created, is bound (kubectl get pvc -n ). Check the external storage section in the values file for the database cluster. That should start somewhere around line 602 and ensure your configuration matches your cluster setup. Especially your storage class name is something you should verify. If you created claims manually, the configuration is different from the video and needs adjusting.
      Sorry I can't be more specific but diagnosing a pending state is really difficult without having access to the cluster and reviewing the config file you used to implement your solution. I hope the suggestions help.

  • @dannydenovi29
    @dannydenovi29 4 місяці тому

    Hi! Great tutorial! Have you ever thought about doing a mariadb-operator tutorial? I'm struggling with it 🫤

    • @ILoveOpenSourceSoftware
      @ILoveOpenSourceSoftware  4 місяці тому +2

      Hi @dannydenovi29, thanks for your comment. I have not thought about that yet but your suggestion sounds interesting. What would you want to see in such a video? I could create a video with whatever I could think of but please let me know what makes sense for you. I don't want to create something for the sake of creating it. I want the content to make sense and what might make sense for me might not for you. Please post some of your questions and ideas (the more the better) and I will see what I can do. Cannot guarantee a timeline though.

    • @dannydenovi29
      @dannydenovi29 4 місяці тому +1

      @@ILoveOpenSourceSoftware It could be useful for an automated high availability and scalability use cases or backup purposes 😉

  • @mogallapu_ram
    @mogallapu_ram 4 місяці тому

    Hi I am following your videos for my home lab, can you add one more video to backup the database and restore, in case decided to built the cluster again database backup and restore will help Thanks

    • @ILoveOpenSourceSoftware
      @ILoveOpenSourceSoftware  4 місяці тому +1

      Hi @mogallapu_ram, thanks for your suggestion. That is a great idea. I have planned to establish this kind of backup myself. I already have a script that I am running on my VMs that creates a backup file of the different databases. I tried the script the other day and unfortunately some of the details I have to modify to make them work but I will look into that and as soon as I figured that process out I will make a video and post it here. No promises on the timeline, however. Sorry.