[Deprecated] Getting Started with Helm Charts (ScalarDB Server)
ScalarDB Server is now deprecated. Please use ScalarDB Cluster instead.
This document explains how to get started with ScalarDB Server using Helm Chart on a Kubernetes cluster as a test environment. Here, we assume that you already have a Mac or Linux environment for testing. We use Minikube in this document, but the steps we will show should work in any Kubernetes cluster.
Requirement
- You need to subscribe to ScalarDB in the AWS Marketplace or Azure Marketplace to get container images (
scalardb-server
andscalardb-envoy
). Please refer to the following documents for more details.
What we create
We will deploy the following components on a Kubernetes cluster as follows.
+--------------------------------------------------------------------------------------------------------------------------------------+
| [Kubernetes Cluster] |
| |
| [Pod] [Pod] [Pod] [Pod] |
| |
| +-------+ +-----------------+ |
| +---> | Envoy | ---+ +---> | ScalarDB Server | ---+ |
| | +-------+ | | +-----------------+ | |
| | | | | |
| +--------+ +---------+ | +-------+ | +-------------------+ | +-----------------+ | +------------+ |
| | Client | ---> | Service | ---+---> | Envoy | ---+---> | Service | ---+---> | ScalarDB Server | ---+---> | PostgreSQL | |
| +--------+ | (Envoy) | | +-------+ | | (ScalarDB Server) | | +-----------------+ | +------------+ |
| +---------+ | | +-------------------+ | | |
| | +-------+ | | +-----------------+ | |
| +---> | Envoy | ---+ +---> | ScalarDB Server | ---+ |
| +-------+ +-----------------+ |
| |
+--------------------------------------------------------------------------------------------------------------------------------------+
Step 1. Start a Kubernetes cluster
First, you need to prepare a Kubernetes cluster. If you use a minikube environment, please refer to the Getting Started with Scalar Helm Charts. If you have already started a Kubernetes cluster, you can skip this step.
Step 2. Start a PostgreSQL container
ScalarDB uses some kind of database system as a backend database. In this document, we use PostgreSQL.
You can deploy PostgreSQL on the Kubernetes cluster as follows.
-
Add the Bitnami helm repository.
helm repo add bitnami https://charts.bitnami.com/bitnami
-
Deploy PostgreSQL.
helm install postgresql-scalardb bitnami/postgresql \
--set auth.postgresPassword=postgres \
--set primary.persistence.enabled=false -
Check if the PostgreSQL container is running.
kubectl get pod
[Command execution result]
NAME READY STATUS RESTARTS AGE
postgresql-scalardb-0 1/1 Running 0 2m42s
Step 3. Deploy ScalarDB Server on the Kubernetes cluster using Helm Charts
-
Add the Scalar helm repository.
helm repo add scalar-labs https://scalar-labs.github.io/helm-charts
-
Create a secret resource to pull the ScalarDB container images from AWS/Azure Marketplace.
- AWS Marketplace
kubectl create secret docker-registry reg-ecr-mp-secrets \
--docker-server=709825985650.dkr.ecr.us-east-1.amazonaws.com \
--docker-username=AWS \
--docker-password=$(aws ecr get-login-password --region us-east-1)
- AWS Marketplace