-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: GreptimeDB Operator section
- Loading branch information
Showing
3 changed files
with
140 additions
and
1 deletion.
There are no files selected for viewing
58 changes: 58 additions & 0 deletions
58
...s/deploy-on-kubernetes/manage-greptimedb-operator/deploy-greptimedb-operator.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Deploy GreptimeDB Operator | ||
|
||
## Overview | ||
The GreptimeDB Kubernetes Operator simplifies deploying GreptimeDB on both private and public cloud infrastructures. This guide walks you through installing the latest stable version of the GreptimeDB Operator on a Kubernetes cluster. The Operator leverages a [Custom Resource Definition (CRD)](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/#customresourcedefinitions) to represent GreptimeDB as a Kubernetes [object](https://kubernetes.io/docs/concepts/overview/working-with-objects/). | ||
|
||
|
||
## Prerequisites | ||
- [Helm](https://helm.sh/docs/intro/install/) (Use the Version appropriate for your Kubernetes API version) | ||
|
||
## Install the GreptimeDB Operator using Helm Charts | ||
|
||
GreptimeDB provides a Helm-compatible repository for easy deployment. Follow these steps to install the Operator using Helm: | ||
|
||
### 1. Add the GreptimeDB Operator Repository | ||
First, add the GreptimeDB Operator Helm repository: | ||
|
||
1. Add the GreptimeDB Operator Repo to Helm | ||
```bash | ||
helm repo add greptime https://greptimeteam.github.io/helm-charts/ | ||
``` | ||
|
||
Validate the repository by searching for the Operator chart: | ||
```bash | ||
helm search repo greptimedb-operator | ||
``` | ||
|
||
You should see output similar to this: | ||
``` | ||
NAME CHART VERSION APP VERSION DESCRIPTION | ||
greptime/greptimedb-operator 0.2.3 0.1.0-alpha.29 The greptimedb-operator Helm chart for Kubernetes. | ||
``` | ||
|
||
### 2. Install the Operator | ||
To install the Operator, run the following `helm install` command. This command also creates a dedicated namespace `greptimedb-operator` for the installation. It's recommended to use a dedicated namespace for the Operator: | ||
```bash | ||
helm install \ | ||
--create-namespace \ | ||
greptimedb-operator greptime/greptimedb-operator \ | ||
-n greptimedb-operator | ||
``` | ||
|
||
### 3. Verify the Operator installation | ||
After installation, check the contents of the `greptimedb-operator` namespace to confirm that all pods and services are running correctly: | ||
```bash | ||
kubectl get all -n greptimedb-operator | ||
``` | ||
|
||
You should see output similar to this: | ||
```bash | ||
NAME READY STATUS RESTARTS AGE | ||
pod/greptimedb-operator-8495fcb545-jpz2m 1/1 Running 0 17s | ||
|
||
NAME READY UP-TO-DATE AVAILABLE AGE | ||
deployment.apps/greptimedb-operator 1/1 1 1 17s | ||
|
||
NAME DESIRED CURRENT READY AGE | ||
replicaset.apps/greptimedb-operator-8495fcb545 1 1 1 17s | ||
``` |
74 changes: 74 additions & 0 deletions
74
.../deploy-on-kubernetes/manage-greptimedb-operator/upgrade-greptimedb-operator.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# Upgrade GreptimeDB Operator | ||
You can upgrade the GreptimeDB Operator at any time without impacting your managed GreptimeDB instances. This guide details the steps to upgrade an existing GreptimeDB Operator installation using Helm, specifically from version 0.2.1 to 0.2.3. | ||
|
||
### 1. Verify the existing Operator installation. | ||
|
||
First, verify the health and status of all Operator pods and services using: | ||
|
||
```bash | ||
kubectl get all -n greptimedb-operator | ||
``` | ||
|
||
If the Operator was installed in a custom namespace, replace `greptimedb-operator` with your specific namespace using `-n <NAMESPACE>`. | ||
|
||
Next, view the installed Helm charts in the namespace: | ||
|
||
```bash | ||
helm list -n greptimedb-operator | ||
``` | ||
|
||
You should see output similar to this: | ||
``` | ||
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION | ||
greptimedb-operator greptimedb-operator 1 2024-08-30 08:04:53.388756424 +0000 UTC deployed greptimedb-operator-0.2.1 0.1.0-alpha.28 | ||
``` | ||
|
||
### 2. Update the Operator Repository | ||
|
||
Update the GreptimeDB Operator Helm repository to fetch the latest charts: | ||
|
||
```bash | ||
helm repo update greptimedb-operator | ||
``` | ||
|
||
If you used a different alias when adding the repository, replace `greptimedb-operator` with that alias. You can review your Helm repositories with: | ||
|
||
```bash | ||
helm repo list | ||
``` | ||
|
||
Check the latest available chart version: | ||
|
||
```bash | ||
helm search repo greptimedb-operator | ||
``` | ||
|
||
You should see output similar to this: | ||
```bash | ||
NAME CHART VERSION APP VERSION DESCRIPTION | ||
greptime/greptimedb-operator 0.2.3 0.1.0-alpha.29 The greptimedb-operator Helm chart for Kubernetes. | ||
``` | ||
|
||
### 3. Run helm upgrade | ||
|
||
Use Helm to upgrade the GreptimeDB Operator to the latest version: | ||
```bash | ||
helm upgrade -n greptimedb-operator \ | ||
operator greptime/greptimedb-operator | ||
``` | ||
|
||
If the Operator is installed in a different namespace, specify it with the `-n` argument. Additionally, if you used a different installation name than operator, replace `operator` in the command. | ||
|
||
The command should return a successful upgrade with an incremented `REVISION` value. | ||
|
||
### 4. Validate the Operator upgrade | ||
|
||
To confirm the upgrade, run the same helm list command as before: | ||
```bash | ||
helm list -n greptimedb-operator | ||
``` | ||
|
||
You should see output similar to this: | ||
``` | ||
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION | ||
greptimedb-operator greptimedb-operator 2 2024-08-30 08:18:14.115248532 +0000 UTC deployed greptimedb-operator-0.2.3 0.1.0-alpha.29``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters