GreptimeDB Cluster

The GreptimeDB cluster can run in the cluster mode to scale horizontally.

Install gtctl and run playground

gtctl is the cli tool for managing the GreptimeDB cluster. You can use the following one-line installation(only for Linux and macOS):

  1. curl -fsSL \
  2. https://raw.githubusercontent.com/greptimeteam/gtctl/develop/hack/install.sh |\
  3. sh

GreptimeDB Cluster - 图1Note

For Windows users, due to the complexity and compatibility of running multiple components together, we strongly recommend enabling WSL(Windows Subsystem for Linux) on your operating system, and lunch a latest Ubuntu to proceed.

Once the download is completed, the binary file gtctl will be stored in your current directory.

The fastest way to experience the GreptimeDB cluster is to use the playground:

  1. ./gtctl playground

When the command is executed, the playground will be started in the foreground. You can use Ctrl+C to stop the playground. The playground will deploy the minimal GreptimeDB cluster in bare-metal mode on your host.

If everything is ok, you can visit the Dashboard via http://localhost:4000/dashboard/.

For more details, please refer to gtctl operations.

Deploy the GreptimeDB cluster in Kubernetes

If your Kubernetes cluster is ready(a 1.18 or higher version is required), you can use the following command to deploy the GreptimeDB cluster:

  1. ./gtctl cluster create mycluster

After the creation is completed, you can use the following command to connect the cluster with MySQL protocol:

  1. ./gtctl cluster connect mycluster

You also can use Helm Charts to deploy the cluster.

GreptimeDB Cluster - 图2Note

You can use the kind to create the Kubernetes:

  1. kind create cluster

When the cluster is ready on your Kubernetes, you can use the following commands to expose all the service ports(make sure you already install kubectl):

  1. kubectl port-forward svc/mycluster-frontend \
  2. 4000:4000 \
  3. 4001:4001 \
  4. 4002:4002 \
  5. 4003:4003 \
  6. 4242:4242

Next Steps

Learn how to write data to GreptimeDB and visualize it using Grafana in the Quick Start.