Deploy ScalarDB Cluster
This guide helps you configure and deploy ScalarDB Cluster across different platforms by providing a comprehensive overview of supported deployment options. You can choose from various combinations of platforms and pricing models for the approach that fits your environment and requirements.
Choose a platform and pricing model​
ScalarDB Cluster supports the following platform and pricing model types:
- Platform
- Amazon Elastic Kubernetes Service (EKS)
- Azure Kubernetes Service (AKS)
- Google Kubernetes Engine (GKE)
- Red Hat OpenShift (OpenShift)
- minikube for development purposes only
- Other platforms
- Pricing model
- Pay as you go (PAYG)
- Bring your own license (BYOL)
Before proceeding, decide your preferred combination of platform and pricing model.
Matrix of supported combinations
| Platform | Pricing model |
|---|---|
| EKS | PAYG + BYOL |
| AKS | BYOL |
| GKE | PAYG + BYOL |
| OpenShift | BYOL |
| minikube | BYOL |
| Other platform | Contact us |
Select the tabs below based on the matrix of supported combinations for how you want to deploy ScalarDB Cluster:
- EKS
- AKS
- GKE
- OpenShift
- minikube
- Other platform
If you want to deploy ScalarDB Cluster on AWS, please refer to Deploy ScalarDB Cluster on Amazon Elastic Kubernetes Service (EKS).
AKS is supported. A deployment guide is coming soon.
If you want to deploy ScalarDB Cluster on Google Cloud, please refer to Deploy ScalarDB Cluster Through Google Cloud Marketplace.
Deploy ScalarDB Cluster on OpenShift
This section describes how to deploy ScalarDB Cluster on OpenShift. You can deploy ScalarDB Cluster in an OpenShift environment through the CLI by using the helm install command or the GUI via the OpenShift web console.
- CLI (terminal)
- GUI (web console)
Prerequisites
Before you deploy ScalarDB Cluster in an OpenShift cluster, you need to install the following tools:
- Install the
occommand by following the official OpenShift documentation. You should use the same version ofocas the supported version of OpenShift you will use. For details about compatibility, see Table 2.1. Compatibility Matrix in 2.3.1. The oc binary. You can also see the OpenShift version that ScalarDB Cluster supports on the Requirements page. - Install the
helmcommand by following the official Helm documentation.
Deploy an OpenShift cluster
-
Deploy OpenShift by following the official OpenShift documentation. You can also use an OpenShift managed service.
-
Check if the OpenShift cluster is running.
oc get nodeThe OpenShift cluster is running if
STATUSisReadyas follows:$ oc get node
NAME STATUS ROLES AGE VERSION
crc Ready control-plane,master,worker 77d vX.Y.Z
Create an OpenShift project
-
Create an OpenShift project to deploy ScalarDB Cluster in, replacing the contents in the angle brackets as described.
oc new-project <OPENSHIFT_PROJECT>
Deploy a backend database
Deploy your preferred backend database based on the following requirements and checkpoints:
- Decide which backend database to use.
- You can see the backend databases that ScalarDB Cluster supports in Requirements.
- Unless you have a special reason not to, you should use a database that you are familiar with.
- Check the backend database requirements for ScalarDB Cluster.
- You can see the requirements of each backend database in the Requirements page.
Deploy the backend database based on the above requirements of ScalarDB Cluster and your system's requirements—for example, security, availability, backup/restore, cost, and scalability, amongst your other requirements.
Create a custom values file
Create your custom values file scalardb-cluster.yaml based on your environment and your decisions in the previous steps.
Set the required configurations
-
Set the container image configurations.
Set the container image configuration to
scalardbCluster.image.repository. For OpenShift, only ScalarDB Cluster Enterprise Premium is available.scalardbCluster:
image:
repository: "registry.connect.redhat.com/scalar-labs/scalardb-cluster-node-ubi-byol-premium" -
Set the membership configurations.
You must always set the following three properties if you deploy ScalarDB Cluster in a Kubernetes environment by using Scalar Helm Chart. These properties are fixed values. Since the properties don't depend on individual environments, you can set the same values by copying the following values and pasting them in
scalardbCluster.scalardbClusterNodeProperties.scalardbCluster:
scalardbClusterNodeProperties: |
scalar.db.cluster.membership.type=KUBERNETES
scalar.db.cluster.membership.kubernetes.endpoint.namespace_name=${env:SCALAR_DB_CLUSTER_MEMBERSHIP_KUBERNETES_ENDPOINT_NAMESPACE_NAME}
scalar.db.cluster.membership.kubernetes.endpoint.name=${env:SCALAR_DB_CLUSTER_MEMBERSHIP_KUBERNETES_ENDPOINT_NAME} -
Set the license configurations.
You must set the license configurations, replacing the contents in the angle brackets as described, based on the license you have. For details about license configurations, see How to Configure a License Key.
scalardbCluster:
scalardbClusterNodeProperties: |
scalar.db.cluster.node.licensing.license_key=<YOUR_LICENSE_KEY>
scalar.db.cluster.node.licensing.license_check_cert_pem=<CERTIFICATE> -
Set the database configurations.
Based on the backend databases you chose in Deploy a backend database, set the database configurations in
scalardbCluster.scalardbClusterNodeProperties. Select one of the following databases to see an example of these configurations. Also, please replace the contents in the angle brackets as described.- JDBC databases
- DynamoDB
- Cosmos DB for NoSQL
- Cassandra
scalardbCluster:
scalardbClusterNodeProperties: |
scalar.db.storage=jdbc
scalar.db.contact_points=<JDBC_URL>
scalar.db.username=${env:SCALAR_DB_USERNAME}
scalar.db.password=${env:SCALAR_DB_PASSWORD}scalardbCluster:
scalardbClusterNodeProperties: |
scalar.db.storage=dynamo
scalar.db.contact_points=<AWS_REGION>
# Access key
scalar.db.username=${env:SCALAR_DB_USERNAME}
# Secret access key
scalar.db.password=${env:SCALAR_DB_PASSWORD}scalardbCluster:
scalardbClusterNodeProperties: |
scalar.db.storage=cosmos
# Cosmos DB for NoSQL URI
scalar.db.contact_points=${env:SCALAR_DB_USERNAME}
# Cosmos DB for NoSQL key
scalar.db.password=${env:SCALAR_DB_PASSWORD}scalardbCluster:
scalardbClusterNodeProperties: |
scalar.db.storage=cassandra
scalar.db.contact_points=<COMMA_SEPARATED_CONTACT_POINTS>
scalar.db.username=${env:SCALAR_DB_USERNAME}
scalar.db.password=${env:SCALAR_DB_PASSWORD}noteIn a later step, you will need to create a Kubernetes secret and set the configuration
scalardbCluster.secretName. -
Set the service configurations.
Based on the connectivity of ScalarDB Cluster, you need to set
scalardbCluster.service.type. Select one of the following types of connections to see an example of this configuration.- Access from outside the OpenShift cluster
- Access from inside the OpenShift cluster
If your application accesses ScalarDB Cluster from outside the OpenShift cluster, set
scalardbCluster.service.typetoLoadBalancer.scalardbCluster:
service:
type: "LoadBalancer"If your application accesses ScalarDB Cluster from inside the OpenShift cluster, set
scalardbCluster.service.typetoClusterIP.scalardbCluster:
service:
type: "ClusterIP" -
Set the secret name configurations.
scalardbCluster:
secretName: "scalardb-cluster-credentials"noteIn a later step, you will need to create a Kubernetes secret named
scalardb-cluster-credentials.
Set the optional configurations
- You can see the optional configurations for the Helm Chart of ScalarDB Cluster in Optional configurations. Set the optional configurations based on your environment if necessary.
- You can see all the configurations for ScalarDB Cluster in ScalarDB Cluster Configurations.
Example
All of the configurations above go into a single scalardb-cluster.yaml file. When multiple steps set scalardbCluster.scalardbClusterNodeProperties, combine all the property lines under one scalardbClusterNodeProperties block. For example:
scalardbCluster:
# Image configurations
image:
repository: "registry.connect.redhat.com/scalar-labs/scalardb-cluster-node-ubi-byol-premium"
# Properties
scalardbClusterNodeProperties: |
# Membership configurations
scalar.db.cluster.membership.type=KUBERNETES
scalar.db.cluster.membership.kubernetes.endpoint.namespace_name=${env:SCALAR_DB_CLUSTER_MEMBERSHIP_KUBERNETES_ENDPOINT_NAMESPACE_NAME}
scalar.db.cluster.membership.kubernetes.endpoint.name=${env:SCALAR_DB_CLUSTER_MEMBERSHIP_KUBERNETES_ENDPOINT_NAME}
# License configurations
scalar.db.cluster.node.licensing.license_key=<YOUR_LICENSE_KEY>
scalar.db.cluster.node.licensing.license_check_cert_pem=<CERTIFICATE>
# Database configurations
scalar.db.storage=jdbc
scalar.db.contact_points=<JDBC_URL>
scalar.db.username=${env:SCALAR_DB_USERNAME}
scalar.db.password=${env:SCALAR_DB_PASSWORD}
# Service configurations
service:
type: "LoadBalancer"
# Secret configurations
secretName: "scalardb-cluster-credentials"
Create a secret
You should set the credentials to access the backend database through the secret resource.
Although you can set the credentials directly in the configuration file without using a secret resource, doing so is not secure and therefore not recommended.
oc create secret generic scalardb-cluster-credentials \
--from-literal=SCALAR_DB_USERNAME=<VALUE_OF_USERNAME> \
--from-literal=SCALAR_DB_PASSWORD=<VALUE_OF_PASSWORD> \
-n <OPENSHIFT_PROJECT>
Deploy ScalarDB Cluster by using a Helm Chart
Deploy, upgrade, or uninstall the ScalarDB Cluster deployment by using the helm command with your custom values file scalardb-cluster.yaml that you created in Create a custom values file.
Prerequisites
-
Add the Scalar Helm Chart repository and update it to the latest version by using the
helm repo addcommand andhelm repo updatecommand as follows:helm repo add openshift-helm-charts https://charts.openshift.io/helm repo update openshift-helm-charts -
Decide on the version of ScalarDB Cluster (strictly, the corresponding chart version) that you will deploy or upgrade. You can check the version by running the following command:
helm search repo openshift-helm-charts/<CHART_NAME> -ltipIn this document (when you deploy ScalarDB Cluster), run the following command:
helm search repo openshift-helm-charts/scalardb-cluster -lFor example, you should see a similar output as below:
NAME CHART VERSION APP VERSION
openshift-helm-charts/<CHART_NAME> 1.9.0 3.16.1
openshift-helm-charts/<CHART_NAME> 1.8.1 3.16.1
openshift-helm-charts/<CHART_NAME> 1.8.0 3.16.0
openshift-helm-charts/<CHART_NAME> 1.7.6 3.15.5
openshift-helm-charts/<CHART_NAME> 1.7.5 3.15.5
openshift-helm-charts/<CHART_NAME> 1.7.4 3.15.5
openshift-helm-charts/<CHART_NAME> 1.7.3 3.15.4
openshift-helm-charts/<CHART_NAME> 1.7.2 3.15.3
openshift-helm-charts/<CHART_NAME> 1.7.1 3.15.2
openshift-helm-charts/<CHART_NAME> 1.7.0 3.15.1
openshift-helm-charts/<CHART_NAME> 1.6.4 3.14.4
openshift-helm-charts/<CHART_NAME> 1.6.3 3.14.3
openshift-helm-charts/<CHART_NAME> 1.6.2 3.14.2
openshift-helm-charts/<CHART_NAME> 1.6.1 3.14.1
openshift-helm-charts/<CHART_NAME> 1.6.0 3.14.0noteAPP VERSIONmeans the version of ScalarDB Cluster itself. First, check this version to decide which version of ScalarDB Cluster you will deploy or upgrade.- After checking the version under
APP VERSIONand deciding which version of ScalarDB Cluster you will deploy or upgrade, use the corresponding version underCHART VERSION. - If there are several of the same versions under
APP VERSION, use the latest version underCHART VERSION. For example:- If you want to deploy ScalarDB Cluster 3.16.1, use
1.9.0asCHART VERSION. - If you want to deploy ScalarDB Cluster 3.15.5, use
1.7.6asCHART VERSION. - If you want to deploy ScalarDB Cluster 3.14.4, use
1.6.4asCHART VERSION.
- If you want to deploy ScalarDB Cluster 3.16.1, use
Deploy, upgrade, or uninstall
- Deploy
- Upgrade
- Uninstall
Deploy ScalarDB Cluster by using the helm install command as follows:
helm install <RELEASE_NAME> openshift-helm-charts/scalardb-cluster -f scalardb-cluster.yaml --namespace <OPENSHIFT_PROJECT> --version <CHART_VERSION>
- Change
<RELEASE_NAME>to the arbitrary (unique) name of your deployment. - For the
--namespaceoption, change<OPENSHIFT_PROJECT>to the name of the Kubernetes namespace that you want to deploy ScalarDB Cluster to. - For the
--versionoption, change<CHART_VERSION>to the version that you noted in the previous step.
Upgrade the existing deployment of ScalarDB Cluster by using the helm upgrade command as follows:
helm upgrade <RELEASE_NAME> openshift-helm-charts/scalardb-cluster -f scalardb-cluster.yaml --namespace <OPENSHIFT_PROJECT> --version <CHART_VERSION>
- Change
<RELEASE_NAME>to the arbitrary (unique) name of the deployment that you want to upgrade. - For the
--namespaceoption, change<OPENSHIFT_PROJECT>to the name of the Kubernetes namespace that you want to upgrade ScalarDB Cluster of. - For the
--versionoption, change<CHART_VERSION>to the version that you noted in the previous step.
Downgrading the version of ScalarDB Cluster is not supported. When specifying a version number, you can do only the following:
- Specify the same version as the existing deployment. For example, you might do this when updating configurations.
- Specify a version that is greater than the existing deployment. For example, you might do this when upgrading the version of ScalarDB Cluster.
Uninstall the existing deployment of ScalarDB Cluster by using the helm uninstall command as follows:
helm uninstall <RELEASE_NAME> --namespace <OPENSHIFT_PROJECT>
- Change
<RELEASE_NAME>to the arbitrary (unique) name of the deployment that you want to uninstall. - For the
--namespaceoption, change<OPENSHIFT_PROJECT>to the name of the Kubernetes namespace that you want to uninstall ScalarDB Cluster of.
Check your deployment
After deploying or upgrading ScalarDB Cluster, you should check the following points:
-
Check if the pod status is
Running, replacing the contents in the angle brackets as described.oc get pod -n <OPENSHIFT_PROJECT>For example, you can see
Runningin theSTATUScolumn and1/1in theREADYcolumn as follows:$ oc get pod -n default
NAME READY STATUS RESTARTS AGE
scalardb-cluster-node-5cbb9c6f94-7vr6d 1/1 Running 0 30s
scalardb-cluster-node-5cbb9c6f94-ql86r 1/1 Running 0 30s
scalardb-cluster-node-5cbb9c6f94-vpklh 1/1 Running 0 30s -
Check if the service is exposed, replacing the contents in the angle brackets as described.
oc get svc -n <OPENSHIFT_PROJECT>- Access from outside the OpenShift cluster
- Access from inside the OpenShift cluster
If you set
scalardbCluster.service.typetoLoadBalancerin Create a custom values file, you'll see the IP address in theEXTERNAL-IPcolumn for the service with the suffix-endpoint, for example, as follows:$ oc get svc -n default
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 6m33s
scalardb-cluster-endpoint LoadBalancer 10.110.171.160 127.0.0.1 60053:30768/TCP 3m57s
scalardb-cluster-headless ClusterIP None <none> 60053/TCP 3m57s
scalardb-cluster-metrics ClusterIP 10.109.90.225 <none> 9080/TCP 3m57sIf you set
scalardbCluster.service.typetoClusterIPin Create a custom values file, you'll see the IP address in theCLUSTER-IPcolumn for the service with the suffix-endpoint, for example, as follows:$ oc get svc -n default
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 9m54s
scalardb-cluster-endpoint ClusterIP 10.110.171.160 <none> 60053/TCP 7m18s
scalardb-cluster-headless ClusterIP None <none> 60053/TCP 7m18s
scalardb-cluster-metrics ClusterIP 10.109.90.225 <none> 9080/TCP 7m18s
Deploy an OpenShift cluster
-
Deploy OpenShift by following the official OpenShift documentation. You can also use an OpenShift managed service.
-
Check if the OpenShift cluster is running by logging in to the web console.

Create an OpenShift project
-
Click Developer in the dropdown at the top left.

-
Select the Project tab, click the Project: All Projects dropdown, then choose the Create Project button.

-
Enter project information for your environment and click the Create button.

Deploy a backend database
Deploy your preferred backend database based on the following requirements and checkpoints:
- Decide which backend database to use.
- You can see the backend databases that ScalarDB Cluster supports in Requirements.
- Unless you have a special reason not to, you should use a database that you are familiar with.
- Check the backend database requirements for ScalarDB Cluster.
- You can see the requirements of each backend database in the Requirements page.
Deploy the backend database based on the above requirements of ScalarDB Cluster and your system's requirements—for example, security, availability, backup/restore, cost, and scalability, amongst your other requirements.
Create a custom values file
Create your custom values file scalardb-cluster.yaml based on your environment and your decisions in the previous steps.
Set the required configurations
-
Set the container image configurations.
Set the container image configuration to
scalardbCluster.image.repository. For OpenShift, only ScalarDB Cluster Enterprise Premium is available.scalardbCluster:
image:
repository: "registry.connect.redhat.com/scalar-labs/scalardb-cluster-node-ubi-byol-premium" -
Set the membership configurations.
You must always set the following three properties if you deploy ScalarDB Cluster in a Kubernetes environment by using Scalar Helm Chart. These properties are fixed values. Since the properties don't depend on individual environments, you can set the same values by copying the following values and pasting them in
scalardbCluster.scalardbClusterNodeProperties.scalardbCluster:
scalardbClusterNodeProperties: |
scalar.db.cluster.membership.type=KUBERNETES
scalar.db.cluster.membership.kubernetes.endpoint.namespace_name=${env:SCALAR_DB_CLUSTER_MEMBERSHIP_KUBERNETES_ENDPOINT_NAMESPACE_NAME}
scalar.db.cluster.membership.kubernetes.endpoint.name=${env:SCALAR_DB_CLUSTER_MEMBERSHIP_KUBERNETES_ENDPOINT_NAME} -
Set the license configurations.
You must set the license configurations, replacing the contents in the angle brackets as described, based on the license you have. For details about license configurations, see How to Configure a License Key.
scalardbCluster:
scalardbClusterNodeProperties: |
scalar.db.cluster.node.licensing.license_key=<YOUR_LICENSE_KEY>
scalar.db.cluster.node.licensing.license_check_cert_pem=<CERTIFICATE> -
Set the database configurations.
Based on the backend databases you chose in Deploy a backend database, set the database configurations in
scalardbCluster.scalardbClusterNodeProperties. Select one of the following databases to see an example of these configurations. Also, please replace the contents in the angle brackets as described.- JDBC databases
- DynamoDB
- Cosmos DB for NoSQL
- Cassandra
scalardbCluster:
scalardbClusterNodeProperties: |
scalar.db.storage=jdbc
scalar.db.contact_points=<JDBC_URL>
scalar.db.username=${env:SCALAR_DB_USERNAME}
scalar.db.password=${env:SCALAR_DB_PASSWORD}scalardbCluster:
scalardbClusterNodeProperties: |
scalar.db.storage=dynamo
scalar.db.contact_points=<AWS_REGION>
# Access key
scalar.db.username=${env:SCALAR_DB_USERNAME}
# Secret access key
scalar.db.password=${env:SCALAR_DB_PASSWORD}scalardbCluster:
scalardbClusterNodeProperties: |
scalar.db.storage=cosmos
# Cosmos DB for NoSQL URI
scalar.db.contact_points=${env:SCALAR_DB_USERNAME}
# Cosmos DB for NoSQL key
scalar.db.password=${env:SCALAR_DB_PASSWORD}scalardbCluster:
scalardbClusterNodeProperties: |
scalar.db.storage=cassandra
scalar.db.contact_points=<COMMA_SEPARATED_CONTACT_POINTS>
scalar.db.username=${env:SCALAR_DB_USERNAME}
scalar.db.password=${env:SCALAR_DB_PASSWORD}noteIn a later step, you will need to create a Kubernetes secret and set the configuration
scalardbCluster.secretName. -
Set the service configurations.
Based on the connectivity of ScalarDB Cluster, you need to set
scalardbCluster.service.type. Select one of the following types of connections to see an example of this configuration.- Access from outside the OpenShift cluster
- Access from inside the OpenShift cluster
If your application accesses ScalarDB Cluster from outside the OpenShift cluster, set
scalardbCluster.service.typetoLoadBalancer.scalardbCluster:
service:
type: "LoadBalancer"If your application accesses ScalarDB Cluster from inside the OpenShift cluster, set
scalardbCluster.service.typetoClusterIP.scalardbCluster:
service:
type: "ClusterIP" -
Set the secret name configurations.
scalardbCluster:
secretName: "scalardb-cluster-credentials"noteIn a later step, you will need to create a Kubernetes secret named
scalardb-cluster-credentials.
Set the optional configurations
- You can see the optional configurations for the Helm Chart of ScalarDB Cluster in Optional configurations. Set the optional configurations based on your environment if necessary.
- You can see all the configurations for ScalarDB Cluster in ScalarDB Cluster Configurations.
Example
All of the configurations above go into a single scalardb-cluster.yaml file. When multiple steps set scalardbCluster.scalardbClusterNodeProperties, combine all the property lines under one scalardbClusterNodeProperties block. For example:
scalardbCluster:
# Image configurations
image:
repository: "registry.connect.redhat.com/scalar-labs/scalardb-cluster-node-ubi-byol-premium"
# Properties
scalardbClusterNodeProperties: |
# Membership configurations
scalar.db.cluster.membership.type=KUBERNETES
scalar.db.cluster.membership.kubernetes.endpoint.namespace_name=${env:SCALAR_DB_CLUSTER_MEMBERSHIP_KUBERNETES_ENDPOINT_NAMESPACE_NAME}
scalar.db.cluster.membership.kubernetes.endpoint.name=${env:SCALAR_DB_CLUSTER_MEMBERSHIP_KUBERNETES_ENDPOINT_NAME}
# License configurations
scalar.db.cluster.node.licensing.license_key=<YOUR_LICENSE_KEY>
scalar.db.cluster.node.licensing.license_check_cert_pem=<CERTIFICATE>
# Database configurations
scalar.db.storage=jdbc
scalar.db.contact_points=<JDBC_URL>
scalar.db.username=${env:SCALAR_DB_USERNAME}
scalar.db.password=${env:SCALAR_DB_PASSWORD}
# Service configurations
service:
type: "LoadBalancer"
# Secret configurations
secretName: "scalardb-cluster-credentials"
Create a secret
You should set the credentials to access the backend database through the secret resource.
Although you can set the credentials directly in the configuration file without using a secret resource, doing so is not secure and therefore not recommended.
-
Select the Secrets tab, confirm the current project is one you created in the previous step, click the Create dropdown, then choose Key/value secret.

-
Enter
scalardb-cluster-credentialsin the Secret name text box, enterSCALAR_DB_USERNAMEin the Key text box, then enter an actual username in the Value text box.
-
Scroll down the page, then click the Add key/value button.

-
In a new added key/value, enter
SCALAR_DB_PASSWORDin the Key text box, then enter an actual password in the Value text box.
-
Scroll down the page, then click the Create button.

Deploy ScalarDB Cluster by using a Helm Chart
Deploy, upgrade, or uninstall the ScalarDB Cluster deployment by using Helm in the web console with your custom values file scalardb-cluster.yaml that you created in Create a custom values file.
- Deploy
- Upgrade
- Uninstall
-
Select the Helm tab, click the Create dropdown, then choose Helm Release.

-
Enter
scalardbin the search box, then click ScalarDB Cluster Helm Chart provided by Scalar Labs.
-
Click the Create button.

-
Enter your Helm release name in the Release name text box, select the chart version you want to deploy in the Chart version dropdown, then select the YAML view radio button in the Configure via field.

-
Enter the custom values you created in the previous step in the text box.

-
Click the Create button.

-
Select the Helm tab, click the vertical ellipsis button of the release, then choose Upgrade.

-
Change the version of the chart in the Chart version dropdown if you want to upgrade the version, and change the configurations in the text box if you want to upgrade the configurations.

-
Click the
Upgradebutton.
-
Select the Helm tab, click the vertical ellipsis button of the release, then choose Delete Helm Release.

Check your deployment
After deploying or upgrading ScalarDB Cluster, you should check the following points:
-
Check if the pod status is
Runningby doing the following:-
Select the Topology tab, then click the ScalarDB icon inside the circle of your release.

-
You can see the status of each pod in the right pane.

-
-
Check if the service is exposed by doing the following:
-
Select the Topology tab, then click the ScalarDB icon inside the circle of your release.

-
Scroll down the right pane, then click the service with the suffix
-endpoint.
- Access from outside the OpenShift cluster
- Access from inside the OpenShift cluster
If you set
scalardbCluster.service.typetoLoadBalancerin Create a custom values file, you'll see External load balancer in the Type column and an actual IP address or a hostname in the Location column. Note that the actual value of the IP address or hostname depends on your environment.
If you set
scalardbCluster.service.typetoClusterIPin Create a custom values file, you'll see Cluster IP in the Type column and an actual IP address in the Location column.
-
minikube is intended for development and testing purposes only. Do not use minikube in production environments.
Deploy ScalarDB Cluster on minikube for development and testing purposes
This section describes how to deploy ScalarDB Cluster on minikube for development and testing purposes.
Prerequisites
Before you deploy ScalarDB Cluster in a Kubernetes cluster, you need to install the following tools:
- Install the
kubectlcommand by following the official Kubernetes documentation. You should use the same version ofkubectlas the supported version of Kubernetes you will use. You can see the supported Kubernetes version on the Requirements page. - Install the
helmcommand by following the official Helm documentation.
Deploy a Kubernetes cluster
-
Install minikube by following the 1 Installation section of the official minikube documentation. Installing the latest version of minikube is recommended.
-
Run the
minikube startcommand to start a Kubernetes cluster, replacing the contents of the angle brackets as described.minikube start --kubernetes-version=<KUBERNETES_VERSION>noteYou must specify the supported version of Kubernetes. You can see the supported Kubernetes version on the Requirements page.
-
Check if the Kubernetes cluster is running.
kubectl get nodeYou can see the
STATUSisReadyas follows:$ kubectl get node
NAME STATUS ROLES AGE VERSION
minikube Ready control-plane 65m vX.YY.Z
Create a Kubernetes namespace
-
Create a Kubernetes namespace to deploy ScalarDB Cluster in, replacing the contents in the angle brackets as described.
kubectl create ns <KUBERNETES_NAMESPACE>
Deploy a backend database
You can use a PostgreSQL container deployed in the Kubernetes cluster for testing in the minikube environment. You can deploy a PostgreSQL pod as follows:
-
Add the Bitnami Helm Chart repository.
helm repo add bitnami https://charts.bitnami.com/bitnami -
Update the Helm Chart repository to keep it up-to-date.
helm repo update bitnami -
Deploy a PostgreSQL pod by using the
helm installcommand, replacing the contents in the angle brackets as described.helm install postgresql-scalardb-cluster bitnami/postgresql \
--set auth.postgresPassword=postgres \
--set primary.persistence.enabled=false \
-n <KUBERNETES_NAMESPACE>noteYou can use other databases for testing. You can see the supported backend databases for ScalarDB Cluster on the Requirements page.
Create a custom values file
Create your custom values file scalardb-cluster.yaml based on your environment and your decisions in the previous steps.
Set the required configurations
-
Set the container image configurations.
Based on which edition and pricing model you want to use, set the container image configuration to
scalardbCluster.image.repository. Select one of the following editions to see an example of this configuration.- Standard
- Premium
scalardbCluster:
image:
repository: "ghcr.io/scalar-labs/scalardb-cluster-node-byol-standard"scalardbCluster:
image:
repository: "ghcr.io/scalar-labs/scalardb-cluster-node-byol-premium" -
Set the membership configurations.
You must always set the following three properties if you deploy ScalarDB Cluster in a Kubernetes environment by using Scalar Helm Chart. These properties are fixed values. Since the properties don't depend on individual environments, you can set the same values by copying the following values and pasting them in
scalardbCluster.scalardbClusterNodeProperties.scalardbCluster:
scalardbClusterNodeProperties: |
scalar.db.cluster.membership.type=KUBERNETES
scalar.db.cluster.membership.kubernetes.endpoint.namespace_name=${env:SCALAR_DB_CLUSTER_MEMBERSHIP_KUBERNETES_ENDPOINT_NAMESPACE_NAME}
scalar.db.cluster.membership.kubernetes.endpoint.name=${env:SCALAR_DB_CLUSTER_MEMBERSHIP_KUBERNETES_ENDPOINT_NAME} -
Set the license configurations.
You must set the license configurations, replacing the contents in the angle brackets as described, based on the license you have. For details about license configurations, see How to Configure a License Key.
scalardbCluster:
scalardbClusterNodeProperties: |
scalar.db.cluster.node.licensing.license_key=<YOUR_LICENSE_KEY>
scalar.db.cluster.node.licensing.license_check_cert_pem=<CERTIFICATE> -
Set the database configurations.
If you deployed the PostgreSQL pod by following Deploy a backend database, set the following configurations, replacing the contents in the angle brackets as described.
scalardbCluster:
scalardbClusterNodeProperties: |
scalar.db.storage=jdbc
scalar.db.contact_points=jdbc:postgresql://postgresql-scalardb-cluster:5432/postgres
scalar.db.username=${env:SCALAR_DB_USERNAME}
scalar.db.password=${env:SCALAR_DB_PASSWORD}note-
In a later step, you will need to create a Kubernetes secret and set the configuration
scalardbCluster.secretName. -
If you chose a different database in Deploy a backend database, set the database configurations in
scalardbCluster.scalardbClusterNodeProperties. Select one of the following databases to see an example of these configurations. Also, please replace the contents in the angle brackets as described.
- JDBC databases
- DynamoDB
- Cosmos DB for NoSQL
- Cassandra
scalardbCluster:
scalardbClusterNodeProperties: |
scalar.db.storage=jdbc
scalar.db.contact_points=<JDBC_URL>
scalar.db.username=${env:SCALAR_DB_USERNAME}
scalar.db.password=${env:SCALAR_DB_PASSWORD}scalardbCluster:
scalardbClusterNodeProperties: |
scalar.db.storage=dynamo
scalar.db.contact_points=<AWS_REGION>
# Access key
scalar.db.username=${env:SCALAR_DB_USERNAME}
# Secret access key
scalar.db.password=${env:SCALAR_DB_PASSWORD}scalardbCluster:
scalardbClusterNodeProperties: |
scalar.db.storage=cosmos
# Cosmos DB for NoSQL URI
scalar.db.contact_points=${env:SCALAR_DB_USERNAME}
# Cosmos DB for NoSQL key
scalar.db.password=${env:SCALAR_DB_PASSWORD}scalardbCluster:
scalardbClusterNodeProperties: |
scalar.db.storage=cassandra
scalar.db.contact_points=<COMMA_SEPARATED_CONTACT_POINTS>
scalar.db.username=${env:SCALAR_DB_USERNAME}
scalar.db.password=${env:SCALAR_DB_PASSWORD} -
-
Set the service configurations.
Based on the connectivity of ScalarDB Cluster, you need to set
scalardbCluster.service.type. Select one of the following types of connections to see an example of this configuration.- Access from outside the Kubernetes cluster
- Access from inside the Kubernetes cluster
If your application accesses ScalarDB Cluster from outside the Kubernetes cluster, set
scalardbCluster.service.typetoLoadBalancer.scalardbCluster:
service:
type: "LoadBalancer"If your application accesses ScalarDB Cluster from inside the Kubernetes cluster, set
scalardbCluster.service.typetoClusterIP.scalardbCluster:
service:
type: "ClusterIP" -
Set the secret name configurations.
scalardbCluster:
secretName: "scalardb-cluster-credentials"noteIn a later step, you will need to create a Kubernetes secret named
scalardb-cluster-credentials.
Set the optional configurations
- You can see the optional configurations for the Helm Chart of ScalarDB Cluster in Optional configurations. Set the optional configurations based on your environment if necessary.
- You can see all the configurations for ScalarDB Cluster in ScalarDB Cluster Configurations.
Example
All of the configurations above go into a single scalardb-cluster.yaml file. When multiple steps set scalardbCluster.scalardbClusterNodeProperties, combine all the property lines under one scalardbClusterNodeProperties block. For example:
scalardbCluster:
# Image configurations
image:
repository: "ghcr.io/scalar-labs/scalardb-cluster-node-byol-premium"
# Properties
scalardbClusterNodeProperties: |
# Membership configurations
scalar.db.cluster.membership.type=KUBERNETES
scalar.db.cluster.membership.kubernetes.endpoint.namespace_name=${env:SCALAR_DB_CLUSTER_MEMBERSHIP_KUBERNETES_ENDPOINT_NAMESPACE_NAME}
scalar.db.cluster.membership.kubernetes.endpoint.name=${env:SCALAR_DB_CLUSTER_MEMBERSHIP_KUBERNETES_ENDPOINT_NAME}
# License configurations
scalar.db.cluster.node.licensing.license_key=<YOUR_LICENSE_KEY>
scalar.db.cluster.node.licensing.license_check_cert_pem=<CERTIFICATE>
# Database configurations
scalar.db.storage=jdbc
scalar.db.contact_points=<JDBC_URL>
scalar.db.username=${env:SCALAR_DB_USERNAME}
scalar.db.password=${env:SCALAR_DB_PASSWORD}
# Service configurations
service:
type: "LoadBalancer"
# Secret configurations
secretName: "scalardb-cluster-credentials"
Create a secret
You should set the credentials to access the backend database through the secret resource.
Although you can set the credentials directly in the configuration file without using a secret resource, doing so is not secure and therefore not recommended.
kubectl create secret generic scalardb-cluster-credentials \
--from-literal=SCALAR_DB_USERNAME=<VALUE_OF_USERNAME> \
--from-literal=SCALAR_DB_PASSWORD=<VALUE_OF_PASSWORD> \
-n <KUBERNETES_NAMESPACE>
Deploy ScalarDB Cluster by using a Helm Chart
Deploy, upgrade, or uninstall the ScalarDB Cluster deployment by using the helm command with your custom values file scalardb-cluster.yaml that you created in Create a custom values file.
Prerequisites
-
Add the Scalar Helm Chart repository and update it to the latest version by using the
helm repo addcommand andhelm repo updatecommand as follows:helm repo add scalar-labs https://scalar-labs.github.io/helm-chartshelm repo update scalar-labs -
Decide on the version of ScalarDB Cluster (strictly, the corresponding chart version) that you will deploy or upgrade. You can check the version by running the following command:
helm search repo scalar-labs/<CHART_NAME> -ltipIn this document (when you deploy ScalarDB Cluster), run the following command:
helm search repo scalar-labs/scalardb-cluster -lFor example, you should see a similar output as below:
NAME CHART VERSION APP VERSION
scalar-labs/<CHART_NAME> 1.9.0 3.16.1
scalar-labs/<CHART_NAME> 1.8.1 3.16.1
scalar-labs/<CHART_NAME> 1.8.0 3.16.0
scalar-labs/<CHART_NAME> 1.7.6 3.15.5
scalar-labs/<CHART_NAME> 1.7.5 3.15.5
scalar-labs/<CHART_NAME> 1.7.4 3.15.5
scalar-labs/<CHART_NAME> 1.7.3 3.15.4
scalar-labs/<CHART_NAME> 1.7.2 3.15.3
scalar-labs/<CHART_NAME> 1.7.1 3.15.2
scalar-labs/<CHART_NAME> 1.7.0 3.15.1
scalar-labs/<CHART_NAME> 1.6.4 3.14.4
scalar-labs/<CHART_NAME> 1.6.3 3.14.3
scalar-labs/<CHART_NAME> 1.6.2 3.14.2
scalar-labs/<CHART_NAME> 1.6.1 3.14.1
scalar-labs/<CHART_NAME> 1.6.0 3.14.0noteAPP VERSIONmeans the version of ScalarDB Cluster itself. First, check this version to decide which version of ScalarDB Cluster you will deploy or upgrade.- After checking the version under
APP VERSIONand deciding which version of ScalarDB Cluster you will deploy or upgrade, use the corresponding version underCHART VERSION. - If there are several of the same versions under
APP VERSION, use the latest version underCHART VERSION. For example:- If you want to deploy ScalarDB Cluster 3.16.1, use
1.9.0asCHART VERSION. - If you want to deploy ScalarDB Cluster 3.15.5, use
1.7.6asCHART VERSION. - If you want to deploy ScalarDB Cluster 3.14.4, use
1.6.4asCHART VERSION.
- If you want to deploy ScalarDB Cluster 3.16.1, use
Deploy, upgrade, or uninstall
- Deploy
- Upgrade
- Uninstall
Deploy ScalarDB Cluster by using the helm install command as follows:
helm install <RELEASE_NAME> scalar-labs/scalardb-cluster -f scalardb-cluster.yaml --namespace <KUBERNETES_NAMESPACE> --version <CHART_VERSION>
- Change
<RELEASE_NAME>to the arbitrary (unique) name of your deployment. - For the
--namespaceoption, change<KUBERNETES_NAMESPACE>to the name of the Kubernetes namespace that you want to deploy ScalarDB Cluster to. - For the
--versionoption, change<CHART_VERSION>to the version that you noted in the previous step.
Upgrade the existing deployment of ScalarDB Cluster by using the helm upgrade command as follows:
helm upgrade <RELEASE_NAME> scalar-labs/scalardb-cluster -f scalardb-cluster.yaml --namespace <KUBERNETES_NAMESPACE> --version <CHART_VERSION>
- Change
<RELEASE_NAME>to the arbitrary (unique) name of the deployment that you want to upgrade. - For the
--namespaceoption, change<KUBERNETES_NAMESPACE>to the name of the Kubernetes namespace that you want to upgrade ScalarDB Cluster of. - For the
--versionoption, change<CHART_VERSION>to the version that you noted in the previous step.
Downgrading the version of ScalarDB Cluster is not supported. When specifying a version number, you can do only the following:
- Specify the same version as the existing deployment. For example, you might do this when updating configurations.
- Specify a version that is greater than the existing deployment. For example, you might do this when upgrading the version of ScalarDB Cluster.
Uninstall the existing deployment of ScalarDB Cluster by using the helm uninstall command as follows:
helm uninstall <RELEASE_NAME> --namespace <KUBERNETES_NAMESPACE>
- Change
<RELEASE_NAME>to the arbitrary (unique) name of the deployment that you want to uninstall. - For the
--namespaceoption, change<KUBERNETES_NAMESPACE>to the name of the Kubernetes namespace that you want to uninstall ScalarDB Cluster of.
Expose a service
- Access from outside the Kubernetes cluster
- Access from inside the Kubernetes cluster
If you set scalardbCluster.service.type to LoadBalancer in Create a custom values file, you need to run the minikube tunnel command to expose the service to access the ScalarDB Cluster deployment from outside minikube.
minikube tunnel
You need to run the minikube tunnel command in another terminal since you must keep the minikube tunnel command running.
If you set scalardbCluster.service.type to ClusterIP in Create a custom values file, you don't need to run any commands since you won't be exposing the service outside of minikube.
Check your deployment
After deploying or upgrading ScalarDB Cluster, you should check the following points:
-
Check if the pod status is
Running, replacing the contents in the angle brackets as described.kubectl get pod -n <KUBERNETES_NAMESPACE>For example, you can see
Runningin theSTATUScolumn and1/1in theREADYcolumn as follows:$ kubectl get pod -n default
NAME READY STATUS RESTARTS AGE
scalardb-cluster-node-5cbb9c6f94-7vr6d 1/1 Running 0 30s
scalardb-cluster-node-5cbb9c6f94-ql86r 1/1 Running 0 30s
scalardb-cluster-node-5cbb9c6f94-vpklh 1/1 Running 0 30s -
Check if the service is exposed, replacing the contents in the angle brackets as described.
kubectl get svc -n <KUBERNETES_NAMESPACE>- Access from outside the Kubernetes cluster
- Access from inside the Kubernetes cluster
If you set
scalardbCluster.service.typetoLoadBalancerin Create a custom values file, you'll see the IP address in theEXTERNAL-IPcolumn for the service with the suffix-endpoint, for example, as follows:$ kubectl get svc -n default
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 6m33s
scalardb-cluster-endpoint LoadBalancer 10.110.171.160 127.0.0.1 60053:30768/TCP 3m57s
scalardb-cluster-headless ClusterIP None <none> 60053/TCP 3m57s
scalardb-cluster-metrics ClusterIP 10.109.90.225 <none> 9080/TCP 3m57sIf you set
scalardbCluster.service.typetoClusterIPin Create a custom values file, you'll see the IP address in theCLUSTER-IPcolumn for the service with the suffix-endpoint, for example, as follows:$ kubectl get svc -n default
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 9m54s
scalardb-cluster-endpoint ClusterIP 10.110.171.160 <none> 60053/TCP 7m18s
scalardb-cluster-headless ClusterIP None <none> 60053/TCP 7m18s
scalardb-cluster-metrics ClusterIP 10.109.90.225 <none> 9080/TCP 7m18s
If you want to use other platforms, please contact us.