Skip to content

GreptimeTeam/helm-charts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Greptime Helm Charts

Overview

This is the repository that contains Greptime Helm charts.

Prerequisites

Getting Started

Add Chart Repository

You can add the chart repository with the following commands:

helm repo add greptime https://greptimeteam.github.io/helm-charts/
helm repo update

You can run the following command to see the charts:

helm search repo greptime

Install the GreptimeDB Cluster

If you want to deploy the GreptimeDB cluster, you can use the following commands:

  1. Deploy etcd cluster

    We recommend using the Bitnami etcd chart to deploy the etcd cluster:

    helm upgrade \
      --install etcd oci://registry-1.docker.io/bitnamicharts/etcd \
      --set replicaCount=3 \
      --set auth.rbac.create=false \
      --set auth.rbac.token.enabled=false \
      --create-namespace \
      -n etcd-cluster
  2. Deploy GreptimeDB operator

    The greptimedb-operator will install in the greptimedb-admin namespace:

    helm upgrade \
      --install \
      --create-namespace \
      greptimedb-operator greptime/greptimedb-operator \
      -n greptimedb-admin
  3. Deploy GreptimeDB cluster

    Install the GreptimeDB cluster in the default namespace:

    • Default installation

      The default installation will use the local storage:

      helm upgrade \
        --install mycluster \
        --set meta.etcdEndpoints=etcd.etcd-cluster.svc.cluster.local:2379 \
        greptime/greptimedb-cluster \
        -n default
    • Use AWS S3 as backend storage

      Before installation, you must create the AWS S3 bucket, and the cluster will use the bucket as backend storage:

      helm upgrade \
        --install mycluster \
        --set meta.etcdEndpoints=etcd.etcd-cluster.svc.cluster.local:2379 \
        --set objectStorage.s3.bucket="your-bucket" \
        --set objectStorage.s3.region="region-of-bucket" \
        --set objectStorage.s3.root="root-directory-of-data" \
        --set objectStorage.credentials.accessKeyId="your-access-key-id" \
        --set objectStorage.credentials.secretAccessKey="your-secret-access-key" \
        greptime/greptimedb-cluster \
        -n default
  4. Use kubectl port-forward to access the GreptimeDB cluster

    # You can use the MySQL client to connect the cluster, for example: 'mysql -h 127.0.0.1 -P 4002'.
    kubectl port-forward -n default svc/mycluster-frontend 4002:4002 > connections.out &
    
    # You can use the PostgreSQL client to connect the cluster, for example: 'psql -h 127.0.0.1 -p 4003 -d public'.
    kubectl port-forward -n default svc/mycluster-frontend 4003:4003 > connections.out &

    You also can read and write data by Cluster.

Upgrade

If you want to re-deploy the service because the configurations changed, you can:

helm upgrade --install <your-release> <chart> --values <your-values-file> -n <namespace>

For example:

helm upgrade --install mycluster greptime/greptimedb --values ./values.yaml

To upgrade the CRDs, you can follow the guide of greptimedb-operator.

Uninstallation

If you want to terminate the GreptimeDB cluster, you can use the following command:

helm uninstall mycluster -n default
helm uninstall etcd -n etcd-cluster
helm uninstall greptimedb-operator -n greptimedb-admin

The CRDs of GreptimeDB are not deleted by default. You can delete them by the following command:

kubectl delete crds greptimedbclusters.greptime.io
kubectl delete crds greptimedbstandalones.greptime.io

List of Charts

License

helm-charts uses the Apache 2.0 license to strike a balance between open contributions and allowing you to use the software however you want.