This is the repository that contains Greptime Helm charts.
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
Besides using the GitHub chart repo, you can also use OCI artifacts.
The charts are also available in ACR namespace greptime-registry.cn-hangzhou.cr.aliyuncs.com/charts
.
You don't have to add a chart repository explicitly when using OCI artifacts, for example:
helm upgrade \
--install \
--create-namespace \
--set image.registry=greptime-registry.cn-hangzhou.cr.aliyuncs.com \
greptimedb-operator oci://greptime-registry.cn-hangzhou.cr.aliyuncs.com/charts/greptimedb-operator \
-n greptimedb-admin
The chart name and version will remain consistent with the GitHub chart repo.
If you want to deploy the GreptimeDB cluster, you can use the following commands:
-
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
You can also use
oci://greptime-registry.cn-hangzhou.cr.aliyuncs.com/charts/etcd:10.2.12
. -
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
-
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
-
-
Use
kubectl port-forward
to access the GreptimeDB cluster# You can use the MySQL or PostgreSQL client to connect the cluster, for example: 'mysql -h 127.0.0.1 -P 4002'. kubectl port-forward -n default svc/mycluster-frontend 4001:4001 4002:4002 4003:4003 4000:4000 > connections.out &
If you want to expose the service to the public, you can use the
kubectl port-forward
command with the--address
option:kubectl port-forward --address 0.0.0.0 svc/mycluster-frontend 4001:4001 4002:4002 4003:4003 4000:4000 > connections.txt &
You can also read and write data using refer to the docs.
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-cluster --values ./values.yaml
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 after uninstalling greptimedb-operator unless you use --set crds.keep=false
.
You can delete CRDs manually by the following commands:
kubectl delete crds greptimedbclusters.greptime.io
kubectl delete crds greptimedbstandalones.greptime.io
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.