GreptimeDB Operator
Overview
The GreptimeDB Operator manages the GreptimeDB resources on Kubernetes using the Operator pattern. It is like an autopilot that automates the deployment, provisioning, and orchestration of the GreptimeDB cluster and standalone.
Features
The GreptimeDB Operator includes, but is not limited to, the following features:
-
Automated Provisioning
Automates the deployment of the GreptimeDB cluster and standalone on Kubernetes by providing CRD GreptimeDBCluster
and GreptimeDBStandalone
.
-
Multi-Cloud Support
Users can deploy the GreptimeDB on any Kubernetes cluster, including on-premises and cloud environments(like AWS, GCP, Aliyun etc.).
-
Scaling
Scale the GreptimeDB cluster as easily as changing the replicas
field in the GreptimeDBCluster
CR.
-
Monitoring Bootstrap
Bootstrap the GreptimeDB monitoring stack for the GreptimeDB cluster by providing the monitoring
field in the GreptimeDBCluster
CR.
Prerequisites
The GreptimeDB Operator requires at least Kubernetes 1.18.0
.
Quick Start
The fastest way to install the GreptimeDB Operator is to use bundle.yaml
:
kubectl apply -f \
https://github.com/GreptimeTeam/greptimedb-operator/releases/latest/download/bundle.yaml \
--server-side
The greptimedb-operator
will be installed in the greptimedb-admin
namespace. When the greptimedb-operator
is running, you can see the following output:
$ kubectl get pods -n greptimedb-admin
NAME READY STATUS RESTARTS AGE
greptimedb-operator-7947d785b5-b668p 1/1 Running 0 2m18s
Once the operator is running, you can experience the GreptimeDB by creating a basic standalone instance:
cat <<EOF | kubectl apply -f -
apiVersion: greptime.io/v1alpha1
kind: GreptimeDBStandalone
metadata:
name: basic
spec:
base:
main:
image: greptime/greptimedb:latest
EOF
When the standalone is running, you can see the following output:
$ kubectl get greptimedbstandalones basic
NAME PHASE VERSION AGE
basic Running latest 75s
You can use kubectl port-forward
to access the GreptimeDB:
kubectl port-forward svc/basic-standalone 4001:4001 4002:4002 4003:4003 4000:4000
Please refer to the quick-start to try more examples.
Examples
The GreptimeDB Operator provides a set of examples to help you understand how to use the GreptimeDB Operator. You can find the examples in the examples directory.
Deployment
For production use, we recommend deploying the GreptimeDB Operator with the GreptimeDB official Helm chart.
Documentation
For more information, please refer to the following documentation:
License
greptimedb-operator uses the Apache 2.0 license to strike a balance between
open contributions and allowing you to use the software however you want.