# Installing MariaDB Galera on IBM Cloud

Get MariaDB Galera on IBM Cloud

You should have an IBM Cloud account; otherwise, you can [register here](https://cloud.ibm.com/registration).\
At the end of the tutorial, you will have a cluster with MariaDB up and running. IBM Cloud uses Bitnami charts to deploy MariaDB Galera with Helm

1. We will provision a new Kubernetes Cluster for you if, you already have one, skip to step **2**
2. We will deploy the IBM Cloud Block Storage plug-in; if you already have it, skip to step **3**
3. MariaDB Galera deployment

## Step 1: Provision Kubernetes Cluster

* Click the Catalog button on the top
* Select Service from the catalog
* Search for Kubernetes Service and click on it

![kubernetes-select](/files/tT1DqIDVwhZTKwEiWqcY)

* You are now at the Kubernetes deployment page; you need to specify some details about the cluster
* Choose a standard or free plan; the free plan only has one worker node and no subnet. to provision a standard cluster, you will need to upgrade account to Pay-As-You-Go
* To upgrade to a Pay-As-You-Go account, complete the following steps:
* In the console, go to Manage > Account.
* Select Account settings, and click Add credit card.
* Enter your payment information, click Next, and submit your information
* Choose classic or VPC, read the [docs](https://cloud.ibm.com/docs/containers?topic=containers-infrastructure_providers), and choose the most suitable type for yourself

![infra-select](/files/ypYowi4rr57dgD5rlOsc)

* Now choose your location settings; for more information, please visit [Locations](https://cloud.ibm.com/docs/containers?topic=containers-regions-and-zones#zones)
* Choose Geography (continent)

![location-geo](/files/Y3Xvzka6AdVdQQ9j6YsL)

* Choose Single or Multizone. In single zone, your data is only kept in one datacenter; on the other hand, with Multizone it is distributed to multiple zones, thus safer in an unforeseen zone failure

![location-avail](/files/9hJVE0hAbYPg3C5VavWT)

* Choose a Worker Zone if using Single zones or Metro if Multizone

![location-worker](/files/9eCRk9ICdwbkUFQGiHEA)

* If you wish to use Multizone please set up your account with [VRF](https://cloud.ibm.com/docs/dl?topic=dl-overview-of-virtual-routing-and-forwarding-vrf-on-ibm-cloud) or [enable Vlan spanning](https://cloud.ibm.com/docs/vlans?topic=vlans-vlan-spanning#vlan-spanning)
* If at your current location selection, there is no available Virtual LAN, a new Vlan will be created for you
* Choose a Worker node setup or use the preselected one, set Worker node amount per zone

![worker-pool](/files/2ZaMQ1KSQ3clcpU7Yya7)

* Choose Master Service Endpoint, In VRF-enabled accounts, you can choose private-only to make your master accessible on the private network or via VPN tunnel. Choose public-only to make your master publicly accessible. When you have a VRF-enabled account, your cluster is set up by default to use both private and public endpoints. For more information visit [endpoints](https://cloud.ibm.com/docs/account?topic=account-service-endpoints-overview).

![endpoints](/files/ZczisR0Yv5YZ9QvVFzHv)

* Give cluster a name

![name-new](/files/126ix3RlgMkzVqTBWld9)

* Give desired tags to your cluster; for more information, visit [tags](https://cloud.ibm.com/docs/account?topic=account-tag)

![tasg-new](/files/Koi3Yk8wrBWqVLiJhYUT)

* Click create

![create-new](/files/xc8fkaNq0vwdaJdPuiO6)

* Wait for you cluster to be provisioned

![cluster-prepare](/files/Vi7VKiQzimpvYasKz7PS)

* Your cluster is ready for usage

![cluster-done](/files/jqa3u2iqePxvdZdPEqvP)

## Step 2: Deploy IBM Cloud Block Storage Plug-in

The Block Storage plug-in is a persistent, high-performance iSCSI storage that you can add to your apps by using Kubernetes Persistent Volumes (PVs).

* Click the Catalog button on the top
* Select Software from the catalog
* Search for IBM Cloud Block Storage plug-in and click on it

![block-search](/files/Q1W1KYJhu1oPEqbJGkIl)

* On the application page Click in the dot next to the cluster, you wish to use
* Click on Enter or Select Namespace and choose the default Namespace or use a custom one (if you get error please wait 30 minutes for the cluster to finalize)

![block-cluster](/files/y7CJ5Gd4NcsJrs2CxQ4l)

* Give a name to this workspace
* Click install and wait for the deployment

![block-storage-create](/files/AQi385JChVF9bqmzy4mv)

## Step 3: Deploy MariaDB Galera

We will deploy MariaDB on our cluster

* Click the Catalog button on the top
* Select Software from the catalog
* Search for MariaDB and click on it

![search](/files/fpjK4QhKzRg7vciNujro)

* On the application page Click in the dot next to the cluster, you wish to use

![cluster-select](/files/YVKSTpR5qQQ0QP6VQUNO)

* Click on Enter or Select Namespace and choose the default Namespace or use a custom one

![details-namespace](/files/jGbQAG3xXUYSESDhxzsO)

* Give a unique name to workspace, which you can easily recognize

![details-name](/files/W9bfb506KZGU3Q0W63gm)

* Select which resource group you want to use, it's for access controll and billing purposes. For more information please visit [resource groups](https://cloud.ibm.com/docs/account?topic=account-account_setup#bp_resourcegroups)

![details-resource](/files/c96zI4pSnDhLgl9wuVDR)

* Give tags to your MariaDB Galera, for more information visit [tags](https://cloud.ibm.com/docs/account?topic=account-tag)

![details-tag](/files/6prpAdLV9pOJ4ZAt7VXE)

* Click on Parameters with default values, You can set deployment values or use the default ones

![parameters](/files/LJDtYxrUSY2hJtrXnoeu)

* Please set the MariaDB Galera root password in the parameters

![password](/files/4tdIeAth979girTOcJCw)

* After finishing everything, tick the box next to the agreements and click install

![aggreement-create](/files/HaUMukC2JcOdGIyxJKKk)

* The MariaDB Galera workspace will start installing, wait a couple of minutes

![in-progress](/files/Snl6VCltyM4OBDoy0PDT)

* Your MariaDB Galera workspace has been successfully deployed

![done](/files/J1wzXmmb3JtnWiWtN5bP)

## Verify MariaDB Galera Installation

* Go to [Resources](https://cloud.ibm.com/resources) in your browser
* Click on Clusters
* Click on your Cluster

![resource-select](/files/XJ3GUcr50pKkJBF94O8Z)

* Now you are at your clusters overview, here Click on Actions and Web terminal from the dropdown menu

![cluster-main](/files/tP0PjCDD7dv5BduMAn4t)

* Click install - wait couple of minutes

![terminal-install](/files/N49WLbHPx2VXpA09WqTC)

* Click on Actions
* Click Web terminal, and a terminal will open up
* Type in the terminal; please change NAMESPACE to the namespace you choose at the deployment setup:

```
$ kubectl get ns
```

![get-ns](/files/t6hbGxJdv1wRJ7WSsp9S)

```
$ kubectl get pod -n NAMESPACE -o wide
```

![get-pod](/files/xAKyr2QOuZsVNnX49loA)

```
$ kubectl get service -n NAMESPACE
```

![get-svc](/files/z7ZUhRdyYm6j3hOWjiKB)

* Enter your pod with bash; please replace PODNAME with your mariadb pod's name

```
$ kubectl exec --stdin --tty PODNAME -n NAMESPACE -- /bin/bash
```

![bash](/files/o3fRVZ0ABpDlQKCpzvWH)

* After you are in your pod , please verify that MariaDB is running on your pod's cluster. Please enter the root password after the prompt

```
mysql -u root -p -e "SHOW STATUS LIKE 'wsrep_cluster_size'"
```

![welcome](/files/ZpjXVA7jVdSj9G3jq60C)

You have successfully deployed MariaDB Galera on IBM Cloud!

<sub>*This page is licensed: CC BY-SA / Gnu FDL*</sub>

{% @marketo/form formId="4316" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/galera-cluster/galera-management/installation-and-deployment/installing-mariadb-galera-on-ibm-cloud.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
