> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/galera-cluster/galera-management/installation-and-deployment/installing-mariadb-galera-on-ibm-cloud.md).

# Installing MariaDB Galera on IBM Cloud

Step-by-step IBM Cloud deployment of MariaDB Galera Cluster on IBM Kubernetes Service, with provisioning, IBM Block Storage plug-in setup, and Helm-based MariaDB Galera installation.

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](https://1682030745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3VYeeVGUV4AMqrA3zwy7%2Fuploads%2Fgit-blob-526fe6a1d1f0086b5b1fa4c9ba0dbeba41d4c9e1%2F2.PNG?alt=media)

* 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](https://1682030745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3VYeeVGUV4AMqrA3zwy7%2Fuploads%2Fgit-blob-d8b254590e5f3f635654735283929e357dcdf586%2F3.PNG?alt=media)

* 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](https://1682030745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3VYeeVGUV4AMqrA3zwy7%2Fuploads%2Fgit-blob-5687851ebe6e3ecae19591fe88690e414dbbf027%2F4.PNG?alt=media)

* 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](https://1682030745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3VYeeVGUV4AMqrA3zwy7%2Fuploads%2Fgit-blob-1bb276dad269bc58073fc1c5aaaf7e7d7c330e2e%2F5.PNG?alt=media)

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

![location-worker](https://1682030745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3VYeeVGUV4AMqrA3zwy7%2Fuploads%2Fgit-blob-18dafbd690306b3bcdc84aa1508052561dee7333%2F6.PNG?alt=media)

* 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](https://1682030745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3VYeeVGUV4AMqrA3zwy7%2Fuploads%2Fgit-blob-033d4e83d1620ae53c0e80530f63f4f85a3bcf5c%2F7.PNG?alt=media)

* 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](https://1682030745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3VYeeVGUV4AMqrA3zwy7%2Fuploads%2Fgit-blob-f1e2230cf6cc0f8a1c3ce29bd3c22f25003de36f%2F8.PNG?alt=media)

* Give cluster a name

![name-new](https://1682030745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3VYeeVGUV4AMqrA3zwy7%2Fuploads%2Fgit-blob-0f806ab632efba7d7b638db22dbfb0c5356db71b%2F9.PNG?alt=media)

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

![tasg-new](https://1682030745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3VYeeVGUV4AMqrA3zwy7%2Fuploads%2Fgit-blob-0b7a328804a13c7de4dfb79d169417f569696142%2F10.PNG?alt=media)

* Click create

![create-new](https://1682030745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3VYeeVGUV4AMqrA3zwy7%2Fuploads%2Fgit-blob-d65e4b1d93e06bb8b23c27244e701d76f80a4d1c%2F11.PNG?alt=media)

* Wait for you cluster to be provisioned

![cluster-prepare](https://1682030745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3VYeeVGUV4AMqrA3zwy7%2Fuploads%2Fgit-blob-0dbca2059854fca165bc1e252d7839993542225c%2F12.PNG?alt=media)

* Your cluster is ready for usage

![cluster-done](https://1682030745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3VYeeVGUV4AMqrA3zwy7%2Fuploads%2Fgit-blob-3af9183ddcbac12471171e0613f6de15ff06d40e%2F13.PNG?alt=media)

## 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](https://1682030745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3VYeeVGUV4AMqrA3zwy7%2Fuploads%2Fgit-blob-0ad2bbede031677048f1dbc40c36aa9e5e8323aa%2F14.PNG?alt=media)

* 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](https://1682030745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3VYeeVGUV4AMqrA3zwy7%2Fuploads%2Fgit-blob-39d6e594612db19a7b386115e31875afca8a651a%2F15.PNG?alt=media)

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

![block-storage-create](https://1682030745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3VYeeVGUV4AMqrA3zwy7%2Fuploads%2Fgit-blob-ced017da2d8c566915b7c2b35f1670d759a120c6%2F16.PNG?alt=media)

## 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](https://1682030745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3VYeeVGUV4AMqrA3zwy7%2Fuploads%2Fgit-blob-2585eba0824ded4f72df35bbf776917024e35f6a%2F17.PNG?alt=media)

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

![cluster-select](https://1682030745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3VYeeVGUV4AMqrA3zwy7%2Fuploads%2Fgit-blob-b83e90ee842d1674c014de0bc8e4bbd53af26ec2%2F18.PNG?alt=media)

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

![details-namespace](https://1682030745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3VYeeVGUV4AMqrA3zwy7%2Fuploads%2Fgit-blob-4be8b04ad3a51e859d5ad93b70ac68519e473816%2F19.PNG?alt=media)

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

![details-name](https://1682030745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3VYeeVGUV4AMqrA3zwy7%2Fuploads%2Fgit-blob-2309951083d30dd1de234addb6c96f1fe82d18a4%2F20.PNG?alt=media)

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

![details-resource](https://1682030745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3VYeeVGUV4AMqrA3zwy7%2Fuploads%2Fgit-blob-47c046d1f3f6b7d8e0845cd972aeb4eb7d2fcbb8%2F21.PNG?alt=media)

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

![details-tag](https://1682030745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3VYeeVGUV4AMqrA3zwy7%2Fuploads%2Fgit-blob-bf453d24688bff75bad05e172ff4135a66944cf5%2F22.PNG?alt=media)

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

![parameters](https://1682030745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3VYeeVGUV4AMqrA3zwy7%2Fuploads%2Fgit-blob-ca36d9d76465f57aef290d7e4a19186684d2eb91%2F23.PNG?alt=media)

* Please set the MariaDB Galera root password in the parameters

![password](https://1682030745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3VYeeVGUV4AMqrA3zwy7%2Fuploads%2Fgit-blob-3bf4b79c8d5baf2395396a334068307b639a3ca7%2F24.PNG?alt=media)

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

![aggreement-create](https://1682030745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3VYeeVGUV4AMqrA3zwy7%2Fuploads%2Fgit-blob-e7687d17532816c19f3267c3fb87c294b508469f%2F25.PNG?alt=media)

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

![in-progress](https://1682030745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3VYeeVGUV4AMqrA3zwy7%2Fuploads%2Fgit-blob-c1cd24f19752f2ccfe33637a2a7ba6fbd94eb36b%2F26.PNG?alt=media)

* Your MariaDB Galera workspace has been successfully deployed

![done](https://1682030745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3VYeeVGUV4AMqrA3zwy7%2Fuploads%2Fgit-blob-19505bc441604ad2188a00befb60359885f5aa9b%2F27.PNG?alt=media)

## Verify MariaDB Galera Installation

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

![resource-select](https://1682030745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3VYeeVGUV4AMqrA3zwy7%2Fuploads%2Fgit-blob-db8f635611011b71eb120618207983a9c7bb675f%2F28.PNG?alt=media)

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

![cluster-main](https://1682030745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3VYeeVGUV4AMqrA3zwy7%2Fuploads%2Fgit-blob-0a531904d0a4ef54967b1bb8ded4232dd7677bc7%2F29.PNG?alt=media)

* Click install - wait couple of minutes

![terminal-install](https://1682030745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3VYeeVGUV4AMqrA3zwy7%2Fuploads%2Fgit-blob-3ffdcea96e50f126c0eb5fefe7ad0216b3883506%2F30.PNG?alt=media)

* 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](https://1682030745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3VYeeVGUV4AMqrA3zwy7%2Fuploads%2Fgit-blob-1528f1c40fdd09adfa158be82180331a70a7f8ed%2F31.PNG?alt=media)

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

![get-pod](https://1682030745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3VYeeVGUV4AMqrA3zwy7%2Fuploads%2Fgit-blob-524c27cf2f6163edf64e0076e4a3b7d459535778%2F32.PNG?alt=media)

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

![get-svc](https://1682030745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3VYeeVGUV4AMqrA3zwy7%2Fuploads%2Fgit-blob-e6d2832b356bb777ade4b7c01af71509b3b3bfc6%2F33.PNG?alt=media)

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

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

![bash](https://1682030745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3VYeeVGUV4AMqrA3zwy7%2Fuploads%2Fgit-blob-a7eb7bac086122ef15d251bde9f7bea0780d7a42%2F34.PNG?alt=media)

* 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](https://1682030745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3VYeeVGUV4AMqrA3zwy7%2Fuploads%2Fgit-blob-d5af0d68d594b4d12a8ea89365b42504541fec06%2F35.PNG?alt=media)

You have successfully deployed MariaDB Galera on IBM Cloud!

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

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