Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zyy17 committed Oct 29, 2024
1 parent a6881f1 commit 945660a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 76 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

In this guide, you will learn how to deploy a GreptimeDB cluster on Kubernetes using the GreptimeDB Operator.

:::warning
This guide is for demonstration purposes only. Do not use this setup in a production environment.
:::

:::note
The following output may have minor differences depending on the versions of the Helm charts and environment.
:::
Expand All @@ -19,7 +15,11 @@ The following output may have minor differences depending on the versions of the

## Create a test Kubernetes cluster

There are many ways to create a Kubernetes cluster for testing purposes. In this guide, we will use [kind](https://kind.sigs.k8s.io/docs/user/quick-start/) to create a local Kubernetes cluster.
:::warning
Don't use the `kind` for production use. It's recommended to use a managed Kubernetes service like [Amazon EKS](https://aws.amazon.com/eks/), [Google GKE](https://cloud.google.com/kubernetes-engine/), or [Azure AKS](https://azure.microsoft.com/en-us/services/kubernetes-service/).

Check warning on line 19 in docs/user-guide/deployments/deploy-on-kubernetes/getting-started.md

View workflow job for this annotation

GitHub Actions / Run Linters

"AKS" should be "ASK".
:::

There are many ways to create a Kubernetes cluster for testing purposes. In this guide, we will use [kind](https://kind.sigs.k8s.io/docs/user/quick-start/) to create a local Kubernetes cluster. You can skip this step if you want to use the existing Kubernetes cluster.

Here is an example using `kind` v0.20.0:

Expand Down Expand Up @@ -64,7 +64,7 @@ To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.

## Add the Greptime Helm repository

We provide the official Helm [repository](https://github.com/GreptimeTeam/helm-charts) for the GreptimeDB Operator and GreptimeDB cluster. You can add the repository by running the following command:
We provide the [official Helm repository](https://github.com/GreptimeTeam/helm-charts) for the GreptimeDB Operator and GreptimeDB cluster. You can add the repository by running the following command:

```bash
helm repo add greptime https://greptimeteam.github.io/helm-charts/
Expand Down Expand Up @@ -260,6 +260,11 @@ http://etcd-2.etcd-headless.etcd-cluster.svc.cluster.local:2379 is healthy: succ
Now that the GreptimeDB Operator and etcd cluster are installed, you can deploy a minimum GreptimeDB cluster with monitoring integration:
:::warning
The default configuration for the GreptimeDB cluster is not recommended for production use.
You should adjust the configuration according to your requirements.
:::
```bash
helm install mycluster \
--set monitoring.enabled=true \
Expand Down Expand Up @@ -333,9 +338,13 @@ The Grafana dashboard is also deployed to visualize the metrics from the standal
## Explore the GreptimeDB cluster
:::warning
For production use, you should access the GreptimeDB cluster or Grafana inside the Kubernetes cluster or using the LoadBalancer type service.
:::
### Access the GreptimeDB cluster
You can access the GreptimeDB cluster by port-forwarding the frontend service:
You can access the GreptimeDB cluster by using `kubectl port-forward` the frontend service:
```bash
kubectl -n default port-forward svc/mycluster-frontend 4000:4000 4001:4001 4002:4002 4003:4003
Expand Down Expand Up @@ -385,7 +394,11 @@ There are three dashboards available:
- **GreptimeDB Cluster Logs**: Displays the logs of the GreptimeDB cluster.
- **GreptimeDB Cluster Slow Queries**: Displays the slow queries of the GreptimeDB cluster.
## Clean up
## Cleanup
:::danger
The cleanup operation will remove the metadata and data of the GreptimeDB cluster. Please make sure you have backed up the data before proceeding.
:::
### Stop the port-forwarding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The GreptimeDB Operator includes, but is not limited to, the following features:

- **Multi-Cloud Support**

Users can deploy the GreptimeDB on any Kubernetes cluster, including on-premises and cloud environments(like AWS, GCP, Aliyun etc.).
Users can deploy the GreptimeDB on any Kubernetes cluster, including on-premises and cloud environments(like AWS, GCP, Aliyun, etc.).

- **Scaling**

Expand All @@ -24,7 +24,7 @@ The GreptimeDB Operator includes, but is not limited to, the following features:

Bootstrap the GreptimeDB monitoring stack for the GreptimeDB cluster by providing the `monitoring` field in the `GreptimeDBCluster` CR.

In this document, we will show you how to install, upgrade, configure and uninstall the GreptimeDB Operator on Kubernetes.
This document will show you how to install, upgrade, configure, and uninstall the GreptimeDB Operator on Kubernetes.

:::note
The following output may have minor differences depending on the versions of the Helm charts and environment.
Expand All @@ -42,73 +42,11 @@ For production deployments, it's recommended to use Helm to install the Greptime

### Installation

The Greptime team maintains the [official Helm repository](https://github.com/GreptimeTeam/helm-charts) for the GreptimeDB Operator. You can use the following command to add the Greptime Helm repository:
You can refer [Install the GreptimeDB Operator](/user-guide/deployments/deploy-on-kubernetes/getting-started.md#install-the-greptimedb-operator) for detailed instructions.

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

Check the charts in the Greptime Helm repository:

```
helm search repo greptime
```

<details>
<summary>Expected Output</summary>
```bash
NAME CHART VERSION APP VERSION DESCRIPTION
greptime/greptimedb-cluster 0.2.25 0.9.5 A Helm chart for deploying GreptimeDB cluster i...
greptime/greptimedb-operator 0.2.9 0.1.3-alpha.1 The greptimedb-operator Helm chart for Kubernetes.
greptime/greptimedb-standalone 0.1.27 0.9.5 A Helm chart for deploying standalone greptimedb
```
</details>

After adding the Greptime Helm repository, you can install the GreptimeDB Operator in `greptimedb-admin` by running the following command:

```bash
helm install greptimedb-operator greptime/greptimedb-operator -n greptimedb-admin --create-namespace
```

<details>
<summary>Expected Output</summary>
```bash
NAME: greptimedb-operator
LAST DEPLOYED: Tue Oct 29 18:40:10 2024
NAMESPACE: greptimedb-admin
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
***********************************************************************
Welcome to use greptimedb-operator
Chart version: 0.2.9
GreptimeDB Operator version: 0.1.3-alpha.1
***********************************************************************

Installed components:
* greptimedb-operator

The greptimedb-operator is starting, use `kubectl get deployments greptimedb-operator -n greptimedb-admin` to check its status.
```
</details>

Check the status of the GreptimeDB Operator:

```bash
kubectl get pods -n greptimedb-admin -l app.kubernetes.io/instance=greptimedb-operator
```

<details>
<summary>Expected Output</summary>
```bash
NAME READY STATUS RESTARTS AGE
greptimedb-operator-68d684c6cf-qr4q4 1/1 Running 0 4m8s
```
</details>

If you are using [Argo CD](https://argo-cd.readthedocs.io/en/stable/) , please make sure that the `Application` has set the [`ServerSideApply=true`](https://argo-cd.readthedocs.io/en/latest/user-guide/sync-options/#server-side-apply) to enable the server-side apply(other GitOps tools may have similar settings).
:::note
If you are using [Argo CD](https://argo-cd.readthedocs.io/en/stable/) to deploy applications, please make sure that the `Application` has set the [`ServerSideApply=true`](https://argo-cd.readthedocs.io/en/latest/user-guide/sync-options/#server-side-apply) to enable the server-side apply(other GitOps tools may have similar settings).
:::

### Upgrade

Expand Down

0 comments on commit 945660a

Please sign in to comment.