From 945660ad58f89c388ddf65dc45872d33003889ec Mon Sep 17 00:00:00 2001 From: zyy17 Date: Tue, 29 Oct 2024 19:53:31 +0800 Subject: [PATCH] fix --- .../deploy-on-kubernetes/getting-started.md | 29 ++++++-- .../greptimedb-operator-management.md | 74 ++----------------- 2 files changed, 27 insertions(+), 76 deletions(-) diff --git a/docs/user-guide/deployments/deploy-on-kubernetes/getting-started.md b/docs/user-guide/deployments/deploy-on-kubernetes/getting-started.md index e1d94901d..9f9e66edf 100644 --- a/docs/user-guide/deployments/deploy-on-kubernetes/getting-started.md +++ b/docs/user-guide/deployments/deploy-on-kubernetes/getting-started.md @@ -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. ::: @@ -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/). +::: + +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: @@ -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/ @@ -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 \ @@ -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 @@ -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 diff --git a/docs/user-guide/deployments/deploy-on-kubernetes/greptimedb-operator-management.md b/docs/user-guide/deployments/deploy-on-kubernetes/greptimedb-operator-management.md index df11f5cd0..058e0b11e 100644 --- a/docs/user-guide/deployments/deploy-on-kubernetes/greptimedb-operator-management.md +++ b/docs/user-guide/deployments/deploy-on-kubernetes/greptimedb-operator-management.md @@ -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** @@ -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. @@ -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 -``` - -
- Expected Output -```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 -``` -
- -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 -``` - -
- Expected Output -```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. -``` -
- -Check the status of the GreptimeDB Operator: - -```bash -kubectl get pods -n greptimedb-admin -l app.kubernetes.io/instance=greptimedb-operator -``` - -
- Expected Output -```bash -NAME READY STATUS RESTARTS AGE -greptimedb-operator-68d684c6cf-qr4q4 1/1 Running 0 4m8s -``` -
- -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