From d72a42bf86f13a7f81d5b45c1dda55d98d4c2c3c Mon Sep 17 00:00:00 2001 From: yuanyuan zhang <111744220+michelle-0808@users.noreply.github.com> Date: Thu, 28 Nov 2024 15:52:41 +0800 Subject: [PATCH] docs: sync installation and other docs (#8544) --- ...nect-database-in-production-environment.md | 48 +- docs/user_docs/installation/install-addons.md | 186 ++++++ .../{install-with-kbcli => }/install-kbcli.md | 2 +- .../install-kubeblocks.md | 87 ++- .../install-with-helm/_category_.yml | 4 - .../install-with-helm/install-addons.md | 52 -- .../install-with-helm/uninstall-kubeblocks.md | 54 -- .../install-with-kbcli/_category_.yml | 4 - .../install-with-kbcli/install-addons.md | 103 --- .../install-kubeblocks-with-kbcli.md | 101 --- ...s.md => uninstall-kubeblocks-and-kbcli.md} | 53 +- ...e-and-connect-an-apecloud-mysql-cluster.md | 6 +- .../high-availability/high-availability.md | 2 +- .../proxy/apecloud-mysql-proxy.md | 4 +- .../manage-elasticsearch.md | 6 +- .../create-a-kafka-cluster.md | 6 +- .../kubeblocks-for-milvus/manage-milvus.md | 6 +- ...create-and-connect-to-a-mongodb-cluster.md | 6 +- .../create-and-connect-a-mysql-cluster.md | 6 +- .../high-availability/high-availability.md | 2 +- ...create-and-connect-a-postgresql-cluster.md | 6 +- .../high-availability/high-availability.md | 4 +- .../create-pulsar-cluster-on-kubeblocks.md | 5 +- .../kubeblocks-for-qdrant/manage-qdrant.md | 6 +- .../manage-rabbitmq.md | 4 +- .../create-and-connect-a-redis-cluster.md | 6 +- .../high-availability/high-availability.md | 2 +- .../redis-cluster-mode.md | 2 +- .../manage-starrocks.md | 6 +- .../backup-and-restore/backup/backup-repo.md | 4 +- docs/user_docs/overview/supported-addons.md | 66 +- .../try-kubeblocks-on-cloud.md | 8 +- .../try-kubeblocks-on-your-laptop.md | 2 +- ...t-to-database-in-production-environment.md | 57 +- .../overview-of-create-database.md | 4 +- .../user-docs/installation/install-addons.md | 182 +++++ .../{install-with-kbcli => }/install-kbcli.md | 0 .../install-kubeblocks.md | 85 ++- .../install-with-helm/_category_.yml | 4 - .../install-with-helm/install-addons.md | 52 -- .../install-with-helm/uninstall-kubeblocks.md | 54 -- .../install-with-kbcli/_category_.yml | 4 - .../install-with-kbcli/install-addons.md | 103 --- .../install-kubeblocks-with-kbcli.md | 104 --- ...s.md => uninstall-kubeblocks-and-kbcli.md} | 55 +- ...-and-connect-an-apecloud-mysql-cluster.md} | 6 +- .../high-availability/high-availability.md | 2 +- .../proxy/apecloud-mysql-proxy.md | 4 +- .../manage-elasticsearch.md | 85 ++- .../create-a-kafka-cluster.md | 6 +- .../kubeblocks-for-milvus/manage-milvus.md | 6 +- ...create-and-connect-to-a-mongodb-cluster.md | 6 +- .../create-and-connect-a-mysql-cluster.md | 6 +- .../high-availability/high-availability.md | 2 +- ...create-and-connect-a-postgresql-cluster.md | 6 +- .../high-availability/high-availability.md | 2 +- .../create-pulsar-cluster-on-kb.md | 6 +- .../kubeblocks-for-qdrant/manage-qdrant.md | 6 +- .../kubeblocks-for-rabbitmq/_category_.yml | 4 + .../manage-rabbitmq.md | 629 ++++++++++++++++++ .../create-and-connect-to-a-redis-cluster.md | 6 +- .../high-availability/high-availability.md | 2 +- .../redis-cluster-mode.md | 2 +- .../manage-starrocks.md | 109 ++- .../kubeblocks-for-weaviate/_category_.yml | 4 - .../manage-weaviate.md | 303 --------- .../kubeblocks-for-xinference/_category_.yml | 4 - .../manage-xinference.md | 179 ----- .../backup-and-restore/backup/backup-repo.md | 4 +- .../observability/monitor-database.md | 2 +- .../try-kubeblocks-on-cloud.md | 8 +- .../try-kubeblocks-on-local-host.md | 2 +- 72 files changed, 1576 insertions(+), 1388 deletions(-) create mode 100644 docs/user_docs/installation/install-addons.md rename docs/user_docs/installation/{install-with-kbcli => }/install-kbcli.md (99%) rename docs/user_docs/installation/{install-with-helm => }/install-kubeblocks.md (63%) delete mode 100644 docs/user_docs/installation/install-with-helm/_category_.yml delete mode 100644 docs/user_docs/installation/install-with-helm/install-addons.md delete mode 100644 docs/user_docs/installation/install-with-helm/uninstall-kubeblocks.md delete mode 100644 docs/user_docs/installation/install-with-kbcli/_category_.yml delete mode 100644 docs/user_docs/installation/install-with-kbcli/install-addons.md delete mode 100644 docs/user_docs/installation/install-with-kbcli/install-kubeblocks-with-kbcli.md rename docs/user_docs/installation/{install-with-kbcli/uninstall-kbcli-and-kubeblocks.md => uninstall-kubeblocks-and-kbcli.md} (65%) create mode 100644 i18n/zh-cn/user-docs/installation/install-addons.md rename i18n/zh-cn/user-docs/installation/{install-with-kbcli => }/install-kbcli.md (100%) rename i18n/zh-cn/user-docs/installation/{install-with-helm => }/install-kubeblocks.md (63%) delete mode 100644 i18n/zh-cn/user-docs/installation/install-with-helm/_category_.yml delete mode 100644 i18n/zh-cn/user-docs/installation/install-with-helm/install-addons.md delete mode 100644 i18n/zh-cn/user-docs/installation/install-with-helm/uninstall-kubeblocks.md delete mode 100644 i18n/zh-cn/user-docs/installation/install-with-kbcli/_category_.yml delete mode 100644 i18n/zh-cn/user-docs/installation/install-with-kbcli/install-addons.md delete mode 100644 i18n/zh-cn/user-docs/installation/install-with-kbcli/install-kubeblocks-with-kbcli.md rename i18n/zh-cn/user-docs/installation/{install-with-kbcli/uninstall-kbcli-and-kubeblocks.md => uninstall-kubeblocks-and-kbcli.md} (66%) rename i18n/zh-cn/user-docs/kubeblocks-for-apecloud-mysql/cluster-management/{create-and-connect-a-mysql-cluster.md => create-and-connect-an-apecloud-mysql-cluster.md} (95%) create mode 100644 i18n/zh-cn/user-docs/kubeblocks-for-rabbitmq/_category_.yml create mode 100644 i18n/zh-cn/user-docs/kubeblocks-for-rabbitmq/manage-rabbitmq.md delete mode 100644 i18n/zh-cn/user-docs/kubeblocks-for-weaviate/_category_.yml delete mode 100644 i18n/zh-cn/user-docs/kubeblocks-for-weaviate/manage-weaviate.md delete mode 100644 i18n/zh-cn/user-docs/kubeblocks-for-xinference/_category_.yml delete mode 100644 i18n/zh-cn/user-docs/kubeblocks-for-xinference/manage-xinference.md diff --git a/docs/user_docs/connect_database/connect-database-in-production-environment.md b/docs/user_docs/connect_database/connect-database-in-production-environment.md index 1cb90a2ec47..9645b8adcb8 100644 --- a/docs/user_docs/connect_database/connect-database-in-production-environment.md +++ b/docs/user_docs/connect_database/connect-database-in-production-environment.md @@ -96,20 +96,18 @@ apiVersion: apps.kubeblocks.io/v1alpha1 kind: OpsRequest metadata: name: ops-expose-enable + namespace: demo spec: - clusterRef: mycluster + clusterName: mycluster expose: - componentName: mysql services: - - annotations: - service.beta.kubernetes.io/alibaba-cloud-loadbalancer-address-type: intranet - ipFamilyPolicy: PreferDualStack - name: vpc + - name: vpc + roleSelector: leader serviceType: LoadBalancer switch: Enable - ttlSecondsBeforeAbort: 0 + preConditionDeadlineSeconds: 0 type: Expose -EOF ``` @@ -139,20 +137,18 @@ apiVersion: apps.kubeblocks.io/v1alpha1 kind: OpsRequest metadata: name: ops-expose-disable + namespace: demo spec: - clusterRef: mycluster + clusterName: mycluster expose: - componentName: mysql services: - - annotations: - service.beta.kubernetes.io/alibaba-cloud-loadbalancer-address-type: intranet - ipFamilyPolicy: PreferDualStack - name: vpc + - name: vpc + roleSelector: leader serviceType: LoadBalancer switch: Disable - ttlSecondsBeforeAbort: 0 + preConditionDeadlineSeconds: 0 type: Expose -EOF ``` @@ -186,20 +182,18 @@ apiVersion: apps.kubeblocks.io/v1alpha1 kind: OpsRequest metadata: name: ops-expose-enable + namespace: demo spec: - clusterRef: mycluster + clusterName: mycluster expose: - componentName: mysql services: - - annotations: - service.beta.kubernetes.io/alibaba-cloud-loadbalancer-address-type: internet - ipFamilyPolicy: PreferDualStack - name: internet + - name: internet + roleSelector: leader serviceType: LoadBalancer switch: Enable - ttlSecondsBeforeAbort: 0 + preConditionDeadlineSeconds: 0 type: Expose -EOF ``` @@ -223,20 +217,18 @@ apiVersion: apps.kubeblocks.io/v1alpha1 kind: OpsRequest metadata: name: ops-expose-disable + namespace: demo spec: - clusterRef: mycluster + clusterName: mycluster expose: - componentName: mysql services: - - annotations: - service.beta.kubernetes.io/alibaba-cloud-loadbalancer-address-type: internet - ipFamilyPolicy: PreferDualStack - name: internet + - name: internet + roleSelector: leader serviceType: LoadBalancer switch: Disable - ttlSecondsBeforeAbort: 0 + preConditionDeadlineSeconds: 0 type: Expose -EOF ``` diff --git a/docs/user_docs/installation/install-addons.md b/docs/user_docs/installation/install-addons.md new file mode 100644 index 00000000000..ad6bf87359f --- /dev/null +++ b/docs/user_docs/installation/install-addons.md @@ -0,0 +1,186 @@ +--- +title: Install Addons +description: Install KubeBlocks addons with Helm +keywords: [addon, helm, KubeBlocks] +sidebar_position: 4 +sidebar_label: Install Addons +--- + +# Install Addons + +With the release of KubeBlocks v0.8.0, Addons are decoupled from KubeBlocks and some Addons are not installed by default. If you want to use these Addons, install Addons first by index. Or if you uninstalled some Addons, you can follow the steps in this tutorial to install them again. + +This tutorial takes elasticsearch as an example. You can replace elasticsearch with the Addon you need. + +The official index repo is [KubeBlocks index](https://github.com/apecloud/block-index). Addons are maintained in the [KubeBlocks Addon repo](https://github.com/apecloud/kubeblocks-addons). + +:::note + +Make sure the major version of Addons and KubeBlocks are the same. + +For example, you can install an Addon v0.9.0 with KubeBlocks v0.9.2, but using mismatched major versions, such as an Addon v0.8.0 with KubeBlocks v0.9.2, may lead to errors. + +::: + + + + + +1. (Optional) Add the KubeBlocks repo. If you install KubeBlocks with Helm, just run `helm repo update`. + + ```bash + helm repo add kubeblocks https://apecloud.github.io/helm-charts + helm repo update + ``` + +2. View the Addon versions. + + ```bash + helm search repo kubeblocks/elasticsearch --devel --versions + ``` + +3. Install the Addon (take elasticsearch as example). Specify a version with `--version`. + + ```bash + helm install kb-addon-es kubeblocks/elasticsearch --namespace kb-system --create-namespace --version x.y.z + ``` + +4. Verify whether this Addon is installed. + + The STATUS is `deployed` and this Addon is installed successfully. + + ```bash + helm list -A + > + NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION + ...... + kb-addon-es kb-system 1 2024-11-27 10:04:59.730127 +0800 CST deployed elasticsearch-0.9.0 8.8.2 + ``` + +5. (Optional) You can run the command below to uninstall the Addon. + + If you have created a related cluster, delete the cluster first. + + ```bash + helm uninstall kb-addon-es --namespace kb-system + ``` + + + + + +1. View the index. + + kbcli creates an index named `kubeblocks` by default and you can check whether this index is created by running `kbcli addon index list`. + + ```bash + kbcli addon index list + > + INDEX URL + kubeblocks https://github.com/apecloud/block-index.git + ``` + + If the list is empty or you want to add your index, you can add the index manually by using `kbcli addon index add `. For example, + + ```bash + kbcli addon index add kubeblocks https://github.com/apecloud/block-index.git + ``` + + If you are not sure whether the kubeblocks index is the latest version, you can update it. + + ```bash + kbcli addon index update kubeblocks + ``` + +2. (Optional) Search whether the Addon exists in the index. + + ```bash + kbcli addon search elasticsearch + > + ADDON VERSION INDEX + elasticsearch 0.7.0 kubeblocks + elasticsearch 0.7.1 kubeblocks + elasticsearch 0.7.2 kubeblocks + elasticsearch 0.8.0 kubeblocks + elasticsearch 0.9.0 kubeblocks + ``` + +3. Install the Addon. + + If there are multiple index sources and versions for an Addon, you can specify an index by `--index` and a version by `--version`. The system installs the latest version in the `kubeblocks` index by default. + + ```bash + kbcli addon install elasticsearch --index kubeblocks --version x.y.z + ``` + +4. Verify whether this Addon is installed. + + The STATUS is `Enabled` and this Addon is installed successfully. + + ```bash + kbcli addon list + > + NAME VERSION PROVIDER STATUS AUTO-INSTALL + elasticsearch 0.9.0 apecloud Enabled true + ``` + +5. (Optional) You can run the command below to disable the Addon. + + If you have created a related cluster, delete the cluster first. + + ```bash + kbcli addon disable elasticsearch + ``` + + Or you can run the command below to uninstall the Addon. + + ```bash + kbcli addon uninstall elasticsearch + ``` + +:::note + +kbcli supports enable/disable an Addon. You can enable/disable Addons according to your need. Moreover, when installing KubeBlocks by kbcli, some Addons are installed but remain disabled by default, with their status shown as `Disabled`. You can enable them by kbcli. For example, + +```bash +kbcli addon list +> +NAME VERSION PROVIDER STATUS AUTO-INSTALL +alertmanager-webhook-adaptor 0.1.4 apecloud Disabled false +apecloud-otel-collector 0.1.2-beta.3 apecloud Disabled false +aws-load-balancer-controller 1.4.8 community Disabled false +csi-driver-nfs 4.5.0 community Disabled false +csi-hostpath-driver 0.7.0 community Disabled false +grafana 6.43.5 community Disabled false +llm 0.9.0 community Disabled false +prometheus 15.16.1 community Disabled false +qdrant 0.9.1 community Disabled false +victoria-metrics-agent 0.8.41 community Disabled false +``` + +* Enable an Addon. + + ```bash + kbcli addon enable qdrant + ``` + +* Disable an Addon. + + ```bash + kbcli addon disable qdrant + ``` + +After enabling/disabling an Addon, check the Addon list to verify whether the Addon's status changes as required. + +```bash +kbcli addon list +> +NAME VERSION PROVIDER STATUS AUTO-INSTALL +qdrant 0.9.1 community Enabled false +``` + +::: + + + + diff --git a/docs/user_docs/installation/install-with-kbcli/install-kbcli.md b/docs/user_docs/installation/install-kbcli.md similarity index 99% rename from docs/user_docs/installation/install-with-kbcli/install-kbcli.md rename to docs/user_docs/installation/install-kbcli.md index ffda34b30b6..a2eddb6d3e6 100644 --- a/docs/user_docs/installation/install-with-kbcli/install-kbcli.md +++ b/docs/user_docs/installation/install-kbcli.md @@ -2,7 +2,7 @@ title: Install kbcli description: Install kbcli keywords: [install, kbcli,] -sidebar_position: 1 +sidebar_position: 2 sidebar_label: Install kbcli --- diff --git a/docs/user_docs/installation/install-with-helm/install-kubeblocks.md b/docs/user_docs/installation/install-kubeblocks.md similarity index 63% rename from docs/user_docs/installation/install-with-helm/install-kubeblocks.md rename to docs/user_docs/installation/install-kubeblocks.md index e76fc51b674..68416a9005f 100644 --- a/docs/user_docs/installation/install-with-helm/install-kubeblocks.md +++ b/docs/user_docs/installation/install-kubeblocks.md @@ -1,25 +1,27 @@ --- title: Install KubeBlocks description: Install KubeBlocks on the existing Kubernetes clusters with Helm -keywords: [taints, affinity, tolerance, install, kbcli, KubeBlocks] -sidebar_position: 1 +keywords: [taints, affinity, tolerance, install, kbcli, KubeBlocks, helm] +sidebar_position: 3 sidebar_label: Install KubeBlocks --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -# Install KubeBlocks +# Install KubeBlocks -KubeBlocks is Kubernetes-native, you can use Helm or kubectl with a YAML file to install it. +The quickest way to try out KubeBlocks is to create a new Kubernetes cluster and install KubeBlocks using the playground. However, production environments are more complex, with applications running in different namespaces and with resource or permission limitations. This document explains how to deploy KubeBlocks on an existing Kubernetes cluster. -To try out KubeBlocks on your local host, you can use the [Playground](./../../try-out-on-playground/try-kubeblocks-on-your-laptop.md) or [create a local Kubernetes test cluster first](./../prerequisite/prepare-a-local-k8s-cluster.md) and then follow the steps in this tutorial to install KubeBlocks. +KubeBlocks is Kubernetes-native, you can use Helm or kubectl with a YAML file to install it. You can also use kbcli, an intuitive CLI tool, to install KubeBlocks. + +To try out KubeBlocks on your local host, you can use the [Playground](./../../try-out-on-playground/try-kubeblocks-on-your-laptop.md) or [create a local Kubernetes test cluster first](./../prepare-a-local-k8s-cluster/prepare-a-local-k8s-cluster.md) and then follow the steps in this tutorial to install KubeBlocks. :::note -If you install KubeBlocks with Helm, to uninstall it, you have to use Helm too. +- Note that you install and uninstall KubeBlocks with the same tool. For example, if you install KubeBlocks with Helm, to uninstall it, you have to use Helm too. +- Make sure you have [kubectl](https://kubernetes.io/docs/tasks/tools/), [Helm](https://helm.sh/docs/intro/install/), or [kbcli](./install-kbcli.md) installed. -Make sure you have [kubectl](https://kubernetes.io/docs/tasks/tools/) and [Helm](https://helm.sh/docs/intro/install/) installed. ::: ## Environment preparation @@ -64,9 +66,11 @@ Use Helm and follow the steps below to install KubeBlocks. ```bash kubectl create -f https://github.com/apecloud/kubeblocks/releases/download/vx.y.z/kubeblocks_crds.yaml ``` + You can view all versions of kubeblocks, including alpha and beta releases, on the [kubeblocks releases list](https://github.com/apecloud/kubeblocks/releases). To get stable releases, use this command: + ```bash curl -s "https://api.github.com/repos/apecloud/kubeblocks/releases?per_page=100&page=1" | jq -r '.[] | select(.prerelease == false) | .tag_name' | sort -V -r ``` @@ -122,12 +126,55 @@ Like any other resource in Kubernetes, KubeBlocks can be installed through a YAM + + +The command `kbcli kubeblocks install` installs KubeBlocks in the `kb-system` namespace, or you can use the `--namespace` flag to specify one. + +```bash +kbcli kubeblocks install +``` + +If you want to install KubeBlocks with a specified version, follow the steps below. + +1. View the available versions. + + ```bash + kbcli kubeblocks list-versions + ``` + + To include alpha and beta releases, use: + + ```bash + kbcli kb list-versions --devel --limit=100 + ``` + + Or you can view all available versions in [KubeBlocks Release](https://github.com/apecloud/kubeblocks/releases/). +2. Specify a version with `--version` and run the command below. + + ```bash + kbcli kubeblocks install --version=x.y.z + ``` + + :::note + + By default, when installing KubeBlocks, kbcli installs the corresponding version of KubeBlocks. It's important to ensure the major versions of kbcli and KubeBlocks are the same, if you specify a different version explicitly here. + + For example, you can install kbcli v0.8.3 with KubeBlocks v0.8.1, but using mismatched major versions, such as kbcli v0.8.3 with KubeBlocks v0.9.0, may lead to errors. + + ::: + + + ## Verify KubeBlocks installation Run the following command to check whether KubeBlocks is installed successfully. + + + + ```bash kubectl -n kb-system get pods ``` @@ -149,3 +196,29 @@ prometheus-node-exporter-r6kvl 1/1 Running 0 prometheus-pushgateway-8555888c7d-xkgfc 1/1 Running 0 3m56s prometheus-server-5759b94fc8-686xp 2/2 Running 0 3m56s ``` + + + + + +```bash +kbcli kubeblocks status +``` + +***Result*** + +If the KubeBlocks Workloads are all ready, KubeBlocks has been installed successfully. + +```bash +KubeBlocks is deployed in namespace: kb-system,version: x.y.z +> +KubeBlocks Workloads: +NAMESPACE KIND NAME READY PODS CPU(CORES) MEMORY(BYTES) CREATED-AT +kb-system Deployment kb-addon-snapshot-controller 1/1 N/A N/A Oct 13,2023 14:27 UTC+0800 +kb-system Deployment kubeblocks 1/1 N/A N/A Oct 13,2023 14:26 UTC+0800 +kb-system Deployment kubeblocks-dataprotection 1/1 N/A N/A Oct 13,2023 14:26 UTC+0800 +``` + + + + diff --git a/docs/user_docs/installation/install-with-helm/_category_.yml b/docs/user_docs/installation/install-with-helm/_category_.yml deleted file mode 100644 index 4803e6977f9..00000000000 --- a/docs/user_docs/installation/install-with-helm/_category_.yml +++ /dev/null @@ -1,4 +0,0 @@ -position: 3 -label: Install with helm -collapsible: true -collapsed: true \ No newline at end of file diff --git a/docs/user_docs/installation/install-with-helm/install-addons.md b/docs/user_docs/installation/install-with-helm/install-addons.md deleted file mode 100644 index a42f9851ce8..00000000000 --- a/docs/user_docs/installation/install-with-helm/install-addons.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: Install Addons -description: Install KubeBlocks addons with Helm -keywords: [addon, helm, KubeBlocks] -sidebar_position: 3 -sidebar_label: Install Addons ---- - -# Install Addons - -With the release of KubeBlocks v0.8.0, Addons are decoupled from KubeBlocks and some Addons are not installed by default. If you want to use these Addons, install Addons first by index. Or if you uninstalled some Addons, you can follow the steps in this tutorial to install them again. - -This tutorial takes etcd as an example. You can replace etcd with the Addon you need. - -The official index repo is [KubeBlocks index](https://github.com/apecloud/block-index). The code of all Addons is maintained in the [KubeBlocks Addon repo](https://github.com/apecloud/kubeblocks-addons). - -1. (Optional) Add the KubeBlocks repo. If you install KubeBlocks with Helm, just run `helm repo update`. - - ```bash - helm repo add kubeblocks https://apecloud.github.io/helm-charts - helm repo update - ``` - -2. View the Addon versions. - - ```bash - helm search repo kubeblocks/etcd --devel --versions - ``` - -3. Install the Addon (take etcd as example). Specify a version with `--version`. - - ```bash - helm install etcd kubeblocks/etcd --namespace kb-system --create-namespace --version x.y.z - ``` - -4. Verify whether this Addon is installed. - - The STATUS is `deployed` and this Addon is installed successfully. - - ```bash - helm list -A - > - NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION - ...... - etcd kb-system 1 2024-10-25 07:18:35.294326176 +0000 UTC deployed etcd-0.9.0 v3.5.6 - ``` - -5. (Optional) You can run the command below to disable the Addon. - - ```bash - helm uninstall etcd --namespace kb-system - ``` diff --git a/docs/user_docs/installation/install-with-helm/uninstall-kubeblocks.md b/docs/user_docs/installation/install-with-helm/uninstall-kubeblocks.md deleted file mode 100644 index 78ff4f42ee0..00000000000 --- a/docs/user_docs/installation/install-with-helm/uninstall-kubeblocks.md +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: Uninstall KubeBlocks -description: Handle exception and uninstall KubeBlocks -keywords: [kubeblocks, exception, uninstall] -sidebar_position: 5 -sidebar_label: Uninstall KubeBlocks ---- - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -# Uninstall KubeBlocks - -Uninstallation order: - -1. Delete your cluster if you have created a cluster. - - ```bash - kubebctl delete cluster -n namespace - ``` - -2. Uninstall KubeBlocks. - -## Uninstall KubeBlocks - - - - - -Delete all the clusters and resources created before performing the following command, otherwise the uninstallation may not be successful. - -```bash -helm uninstall kubeblocks --namespace kb-system -``` - -Helm does not delete CRD objects. You can delete the ones KubeBlocks created with the following commands: - -```bash -kubectl get crd -o name | grep kubeblocks.io | xargs kubectl delete -``` - - - - - -You can generate YAMLs from the KubeBlocks chart and uninstall using `kubectl`. Use `--version x.y.z` to specify a version and make sure the uninstalled version is the same as the installed one. - -```bash -helm template kubeblocks kubeblocks/kubeblocks --namespace kb-system --version x.y.z | kubectl delete -f - -``` - - - - diff --git a/docs/user_docs/installation/install-with-kbcli/_category_.yml b/docs/user_docs/installation/install-with-kbcli/_category_.yml deleted file mode 100644 index 4e70f760f93..00000000000 --- a/docs/user_docs/installation/install-with-kbcli/_category_.yml +++ /dev/null @@ -1,4 +0,0 @@ -position: 2 -label: Install with kbcli -collapsible: true -collapsed: true \ No newline at end of file diff --git a/docs/user_docs/installation/install-with-kbcli/install-addons.md b/docs/user_docs/installation/install-with-kbcli/install-addons.md deleted file mode 100644 index ad70dafa4ab..00000000000 --- a/docs/user_docs/installation/install-with-kbcli/install-addons.md +++ /dev/null @@ -1,103 +0,0 @@ ---- -title: Install Addons -description: Install KubeBlocks Addons -keywords: [kbcli, kubeblocks, addons, install] -sidebar_position: 3 -sidebar_label: Install Addons ---- - -# Install Addons - -## Use the index to install an Addon - -With the release of KubeBlocks v0.8.0, Addons are decoupled from KubeBlocks and some Addons are not installed by default. If you want to use these Addons, install Addons first by index. Or if you uninstalled some Addons, you can follow the steps in this tutorial to install them again. - -This tutorial takes etcd as an example. You can replace etcd with the Addon you need. - -The official index repo is [KubeBlocks index](https://github.com/apecloud/block-index). The code of all Addons is maintained in the [KubeBlocks Addon repo](https://github.com/apecloud/kubeblocks-addons). - -1. View the index. - - kbcli creates an index named `kubeblocks` by default and you can check whether this index is created by running `kbcli addon index list`. - - ```bash - kbcli addon index list - > - INDEX URL - kubeblocks https://github.com/apecloud/block-index.git - ``` - - If the list is empty or you want to add your index, you can add the index manually by using `kbcli addon index add `. For example, - - ```bash - kbcli addon index add kubeblocks https://github.com/apecloud/block-index.git - ``` - - If you are not sure whether the kubeblocks index is the latest version, you can update it. - - ```bash - kbcli addon index update kubeblocks - ``` - -2. (Optional) Search whether the Addon exists in the index. - - ```bash - kbcli addon search etcd - > - ADDON VERSION INDEX - etcd 0.7.0 kubeblocks - etcd 0.8.0 kubeblocks - etcd 0.9.0 kubeblocks - ``` - -3. Install the Addon. - - If there are multiple index sources and versions for an Addon, you can specify an index by `--index` and a version by `--version`. The system installs the latest version in the `kubeblocks` index by default. - - ```bash - kbcli addon install etcd --index kubeblocks --version x.y.z - ``` - - **What's next** - - After the Addon is installed, you can list and enable it. - -## List Addons - -To list supported Addons, run `kbcli addon list` command. - -## Enable/Disable Addons - -To manually enable or disable Addons, follow the steps below. - -***Steps:*** - -1. To enable an Addon, use `kbcli addon enable`. - - ***Example*** - - ```bash - kbcli addon enable etcd - ``` - - To disable an Addon, use `kbcli addon disable`. - -2. List the Addons again to check whether it is enabled. - - ```bash - kbcli addon list - ``` - -## Uninstall Addons - -You can also uninstall the Addons. If you have created a related cluster, delete the cluster first. - -```bash -kbcli cluster delete -``` - -Uninstall an Addon. - -```bash -kbcli addon uninstall etcd -``` diff --git a/docs/user_docs/installation/install-with-kbcli/install-kubeblocks-with-kbcli.md b/docs/user_docs/installation/install-with-kbcli/install-kubeblocks-with-kbcli.md deleted file mode 100644 index 9e42f356ddd..00000000000 --- a/docs/user_docs/installation/install-with-kbcli/install-kubeblocks-with-kbcli.md +++ /dev/null @@ -1,101 +0,0 @@ ---- -title: Install KubeBlocks with kbcli -description: Install KubeBlocks on the existing Kubernetes clusters -keywords: [taints, affinity, tolerance, install, kbcli, KubeBlocks] -sidebar_position: 2 -sidebar_label: Install KubeBlocks ---- - -# Install KubeBlocks with kbcli - -The quickest way to try out KubeBlocks is to create a new Kubernetes cluster and install KubeBlocks using the playground. However, production environments are more complex, with applications running in different namespaces and with resource or permission limitations. This document explains how to deploy KubeBlocks on an existing Kubernetes cluster. - -To try out KubeBlocks on your local host, you can use the [Playground](./../../try-out-on-playground/try-kubeblocks-on-your-laptop.md) or [create a local Kubernetes test cluster first](./../prerequisite/prepare-a-local-k8s-cluster.md) and then follow the steps in this tutorial to install KubeBlocks. - -## Environment preparation - -Prepare an accessible Kubernetes cluster with the version 1.22 or above, and this cluster should meet the following requirements. - - - - - - - - - - - - - - - - - - - - - - - - - - -
Resource Requirements
Control PlaneIt is recommended to create 1 node with 4 cores, 4GB memory and 50GB storage.
Data Plane MySQL It is recommended to create at least 3 nodes with 2 cores, 4GB memory and 50GB storage.
PostgreSQL It is recommended to create at least 2 nodes with 2 cores, 4GB memory and 50GB storage.
Redis It is recommended to create at least 2 nodes with 2 cores, 4GB memory and 50GB storage.
MongoDB It is recommended to create at least 3 nodes with 2 cores, 4GB memory and 50GB storage.
- -## Installation steps - -The command `kbcli kubeblocks install` installs KubeBlocks in the `kb-system` namespace, or you can use the `--namespace` flag to specify one. - -```bash -kbcli kubeblocks install -``` - -If you want to install KubeBlocks with a specified version, follow the steps below. - -1. View the available versions. - - ```bash - kbcli kubeblocks list-versions - ``` - - To include alpha and beta releases, use: - ```bash - kbcli kb list-versions --devel --limit=100 - ``` - - Or you can view all available versions in [KubeBlocks Release](https://github.com/apecloud/kubeblocks/releases/). -2. Specify a version with `--version` and run the command below. - - ```bash - kbcli kubeblocks install --version=x.y.z - ``` - :::note - - By default, when installing KubeBlocks, kbcli installs the corresponding version of KubeBlocks. It's important to ensure the major versions of kbcli and KubeBlocks are the same, if you specify a different version explicitly here. - - For example, you can install kbcli v0.8.3 with KubeBlocks v0.8.1, but using mismatched major versions, such as kbcli v0.8.3 with KubeBlocks v0.9.0, may lead to errors. - - ::: - -## Verify KubeBlocks installation - -Run the following command to check whether KubeBlocks is installed successfully. - -```bash -kbcli kubeblocks status -``` - -***Result*** - -If the KubeBlocks Workloads are all ready, KubeBlocks has been installed successfully. - -```bash -KubeBlocks is deployed in namespace: kb-system,version: x.y.z -> -KubeBlocks Workloads: -NAMESPACE KIND NAME READY PODS CPU(CORES) MEMORY(BYTES) CREATED-AT -kb-system Deployment kb-addon-snapshot-controller 1/1 N/A N/A Oct 13,2023 14:27 UTC+0800 -kb-system Deployment kubeblocks 1/1 N/A N/A Oct 13,2023 14:26 UTC+0800 -kb-system Deployment kubeblocks-dataprotection 1/1 N/A N/A Oct 13,2023 14:26 UTC+0800 -``` diff --git a/docs/user_docs/installation/install-with-kbcli/uninstall-kbcli-and-kubeblocks.md b/docs/user_docs/installation/uninstall-kubeblocks-and-kbcli.md similarity index 65% rename from docs/user_docs/installation/install-with-kbcli/uninstall-kbcli-and-kubeblocks.md rename to docs/user_docs/installation/uninstall-kubeblocks-and-kbcli.md index a43ecafb5d5..78f3cf251b3 100644 --- a/docs/user_docs/installation/install-with-kbcli/uninstall-kbcli-and-kubeblocks.md +++ b/docs/user_docs/installation/uninstall-kubeblocks-and-kbcli.md @@ -1,8 +1,8 @@ --- -title: Uninstall kbcli and KubeBlocks -description: Handle exception and uninstall kbcli and KubeBlocks -keywords: [kbcli, kubeblocks, exception, uninstall] -sidebar_position: 4 +title: Uninstall KubeBlocks +description: Uninstall KubeBlocks by Helm, applying a YAML file, or kbcli. +keywords: [kubeblocks, uninstall, helm, kbcli] +sidebar_position: 5 sidebar_label: Uninstall KubeBlocks and kbcli --- @@ -13,29 +13,64 @@ import TabItem from '@theme/TabItem'; Uninstallation order: -1. Delete your cluster if you have created a cluster. +1. Delete all clusters and backups before uninstalling KubeBlocks and kbcli. ```bash - kbcli cluster delete + kubectl delete cluster -n namespace ``` -2. Uninstall KubeBlocks. + ```bash + kubectl delete backup -n namespace + ``` -3. Uninstall kbcli. +2. Uninstall KubeBlocks. ## Uninstall KubeBlocks -Uninstall KubeBlocks if you want to delete KubeBlocks after your trial. + + + + +Delete all the clusters and resources created before performing the following command, otherwise the uninstallation may not be successful. + +```bash +helm uninstall kubeblocks --namespace kb-system +``` + +Helm does not delete CRD objects. You can delete the ones KubeBlocks created with the following commands: + +```bash +kubectl get crd -o name | grep kubeblocks.io | xargs kubectl delete +``` + + + + + +You can generate YAMLs from the KubeBlocks chart and uninstall using `kubectl`. Use `--version x.y.z` to specify a version and make sure the uninstalled version is the same as the installed one. + +```bash +helm template kubeblocks kubeblocks/kubeblocks --namespace kb-system --version x.y.z | kubectl delete -f - +``` + + + + ```bash kbcli kubeblocks uninstall ``` + + + + ## Uninstall kbcli Uninstall kbcli if you want to delete kbcli after your trial. Use the same option as the way you install kbcli. + For `curl`, run diff --git a/docs/user_docs/kubeblocks-for-apecloud-mysql/cluster-management/create-and-connect-an-apecloud-mysql-cluster.md b/docs/user_docs/kubeblocks-for-apecloud-mysql/cluster-management/create-and-connect-an-apecloud-mysql-cluster.md index fd05e9943c5..0a07921c19c 100644 --- a/docs/user_docs/kubeblocks-for-apecloud-mysql/cluster-management/create-and-connect-an-apecloud-mysql-cluster.md +++ b/docs/user_docs/kubeblocks-for-apecloud-mysql/cluster-management/create-and-connect-an-apecloud-mysql-cluster.md @@ -17,9 +17,9 @@ This tutorial shows how to create and connect to an ApeCloud MySQL cluster. ### Before you start -* [Install kbcli](./../../installation/install-with-kbcli/install-kbcli.md) if you want to create and connect a MySQL cluster by `kbcli`. -* Install KubeBlocks [by kbcli](./../../installation/install-with-kbcli/install-kubeblocks-with-kbcli.md) or [by Helm](./../../installation/install-with-helm/install-kubeblocks.md). -* Check whether the ApeCloud MySQL Addon is enabled. The ApeCloud MySQL Addon is enabled by KubeBlocks by default. If you disable it when installing KubeBlocks,[enable it](./../../installation/install-with-kbcli/install-addons.md#enabledisable-addons) first. +* [Install kbcli](./../../installation/install-kbcli.md) if you want to create and connect a MySQL cluster by `kbcli`. +* [Install KubeBlocks](./../../installation/install-kubeblocks.md). +* Check whether the ApeCloud MySQL Addon is enabled. The ApeCloud MySQL Addon is enabled by KubeBlocks by default. If you disable it when installing KubeBlocks,[enable it](./../../installation/install-addons.md) first. diff --git a/docs/user_docs/kubeblocks-for-apecloud-mysql/high-availability/high-availability.md b/docs/user_docs/kubeblocks-for-apecloud-mysql/high-availability/high-availability.md index 1275a1c2470..3fcb4b4d728 100644 --- a/docs/user_docs/kubeblocks-for-apecloud-mysql/high-availability/high-availability.md +++ b/docs/user_docs/kubeblocks-for-apecloud-mysql/high-availability/high-availability.md @@ -24,7 +24,7 @@ The faults here are all simulated by deleting a pod. When there are sufficient r ### Before you start -* Install KubeBlocks [by kbcli](./../../installation/install-with-kbcli/install-kubeblocks-with-kbcli.md) or [by Helm](./../../installation/install-with-helm/install-kubeblocks.md). +* [Install KubeBlocks](./../../installation/install-kubeblocks.md). * Create an ApeCloud MySQL RaftGroup, refer to [Create a MySQL cluster](./../cluster-management/create-and-connect-an-apecloud-mysql-cluster.md). * Run `kubectl get cd apecloud-mysql -o yaml` to check whether _rolechangedprobe_ is enabled in the ApeCloud MySQL RaftGroup (it is enabled by default). If the following configuration exists, it indicates that it is enabled: diff --git a/docs/user_docs/kubeblocks-for-apecloud-mysql/proxy/apecloud-mysql-proxy.md b/docs/user_docs/kubeblocks-for-apecloud-mysql/proxy/apecloud-mysql-proxy.md index ee758a460c2..2e5a8dd386d 100644 --- a/docs/user_docs/kubeblocks-for-apecloud-mysql/proxy/apecloud-mysql-proxy.md +++ b/docs/user_docs/kubeblocks-for-apecloud-mysql/proxy/apecloud-mysql-proxy.md @@ -13,7 +13,7 @@ import TabItem from '@theme/TabItem'; ## Before you start -1. [Install kbcli](./../../installation/install-with-kbcli/install-kbcli.md). +1. [Install kbcli](./../../installation/install-kbcli.md). 2. [Install Helm](https://helm.sh/docs/intro/install/). 3. Install KubeBlocks. @@ -26,7 +26,7 @@ import TabItem from '@theme/TabItem'; kbcli playground init --version='x.y.z' ``` - Or if you already have a Kubernetes cluster, you can install KubeBlocks [by kbcli](./../../installation/install-with-kbcli/install-kubeblocks-with-kbcli.md) or [by Helm](./../../installation/install-with-helm/install-kubeblocks.md) directly. + Or if you already have a Kubernetes cluster, you can [install KubeBlocks](./../../installation/install-kubeblocks.md) directly. 4. Prepare an ApeCloud MySQL RaftGroup named `mycluster` for demonstrating how to enable the proxy function for an existing cluster. Refer to [Create a MySQL cluster](./../cluster-management/create-and-connect-an-apecloud-mysql-cluster.md) for details. ## Create a Proxy Cluster diff --git a/docs/user_docs/kubeblocks-for-elasticsearch/manage-elasticsearch.md b/docs/user_docs/kubeblocks-for-elasticsearch/manage-elasticsearch.md index bbc4da8588b..06b22d98620 100644 --- a/docs/user_docs/kubeblocks-for-elasticsearch/manage-elasticsearch.md +++ b/docs/user_docs/kubeblocks-for-elasticsearch/manage-elasticsearch.md @@ -17,9 +17,9 @@ KubeBlocks supports the management of Elasticsearch. This tutorial illustrates h ## Before you start -- [Install kbcli](./../installation/install-with-kbcli/install-kbcli.md) if you want to manage your Elasticsearch cluster with `kbcli`. -- Install KubeBlocks [by kbcli](./../installation/install-with-kbcli/install-kubeblocks-with-kbcli.md) or [by Helm](./../installation/install-with-helm/install-kubeblocks.md). -- Install and enable the elasticsearch Addon [by kbcli](./../installation/install-with-kbcli/install-addons.md) or [by Helm](./../installation/install-with-helm/install-addons.md). +- [Install kbcli](./../installation/install-kbcli.md) if you want to manage your Elasticsearch cluster with `kbcli`. +- [Install KubeBlocks](./../installation/install-kubeblocks.md). +- [Install and enable the elasticsearch Addon](./../installation/install-addons.md). - To keep things isolated, create a separate namespace called `demo` throughout this tutorial. ```bash diff --git a/docs/user_docs/kubeblocks-for-kafka/cluster-management/create-a-kafka-cluster.md b/docs/user_docs/kubeblocks-for-kafka/cluster-management/create-a-kafka-cluster.md index 05243f80714..2efeae8e80b 100644 --- a/docs/user_docs/kubeblocks-for-kafka/cluster-management/create-a-kafka-cluster.md +++ b/docs/user_docs/kubeblocks-for-kafka/cluster-management/create-a-kafka-cluster.md @@ -15,9 +15,9 @@ This document shows how to create a Kafka cluster. ## Before you start -* [Install kbcli](./../../installation/install-with-kbcli/install-kbcli.md) if you want to create a Kafka cluster by `kbcli`. -* Install KubeBlocks [by kbcli](./../../installation/install-with-kbcli/install-kubeblocks-with-kbcli.md) or [by Helm](./../../installation/install-with-helm/install-kubeblocks.md). -* Make sure Kafka Addon is enabled with `kbcli addon list`. If this Addon is not enabled, enable it first. Both [kbccli](./../../installation/install-with-kbcli/install-addons.md) and [Helm](./../../installation/install-with-helm/install-addons.md) options are available. +* [Install kbcli](./../../installation/install-kbcli.md) if you want to create a Kafka cluster by `kbcli`. +* [Install KubeBlocks](./../../installation/install-kubeblocks.md). +* Make sure Kafka Addon is enabled with `kbcli addon list`. If this Addon is not enabled, [enable it](./../../installation/install-addons.md) first. diff --git a/docs/user_docs/kubeblocks-for-milvus/manage-milvus.md b/docs/user_docs/kubeblocks-for-milvus/manage-milvus.md index 43e227ee056..5f0459478b2 100644 --- a/docs/user_docs/kubeblocks-for-milvus/manage-milvus.md +++ b/docs/user_docs/kubeblocks-for-milvus/manage-milvus.md @@ -19,9 +19,9 @@ This tutorial illustrates how to create and manage a Milvus cluster by `kbcli`, ## Before you start -- [Install kbcli](./../installation/install-with-kbcli/install-kbcli.md) if you want to manage the Milvus cluster with `kbcli`. -- Install KubeBlocks [by kbcli](./../installation/install-with-kbcli/install-kubeblocks-with-kbcli.md) or [by Helm](./../installation/install-with-kbcli/install-kubeblocks-with-kbcli.md). -- Install and enable the milvus Addon [by kbcli](./../installation/install-with-kbcli/install-addons.md) or [by Helm](./../installation/install-with-helm/install-addons.md). +- [Install kbcli](./../installation/install-kbcli.md) if you want to manage the Milvus cluster with `kbcli`. +- [Install KubeBlocks](./../installation/install-kubeblocks.md). +- [Install and enable the milvus Addon](./../installation/install-addons.md). - To keep things isolated, create a separate namespace called `demo` throughout this tutorial. ```bash diff --git a/docs/user_docs/kubeblocks-for-mongodb/cluster-management/create-and-connect-to-a-mongodb-cluster.md b/docs/user_docs/kubeblocks-for-mongodb/cluster-management/create-and-connect-to-a-mongodb-cluster.md index f7b5ffcff47..258199444f7 100644 --- a/docs/user_docs/kubeblocks-for-mongodb/cluster-management/create-and-connect-to-a-mongodb-cluster.md +++ b/docs/user_docs/kubeblocks-for-mongodb/cluster-management/create-and-connect-to-a-mongodb-cluster.md @@ -17,9 +17,9 @@ This tutorial shows how to create and connect to a MongoDB cluster. ### Before you start -* [Install kbcli](./../../installation/install-with-kbcli/install-kbcli.md) if you want to create and connect a MySQL cluster by `kbcli`. -* Install KubeBlocks [by kbcli](./../../installation/install-with-kbcli/install-kubeblocks-with-kbcli.md) or [by Helm](./../../installation/install-with-helm/install-kubeblocks.md). -* Make sure the MongoDB Addon is enabled. If this addon is not enabled, enable it first. Both [kbcli](./../../installation/install-with-kbcli/install-addons.md) and [Helm](./../../installation/install-with-helm/install-addons.md) options are available. +* [Install kbcli](./../../installation/install-kbcli.md) if you want to create and connect a MySQL cluster by `kbcli`. +* [Install KubeBlocks](./../../installation/install-kubeblocks.md). +* Make sure the MongoDB Addon is enabled. If this addon is not enabled, [enable it](./../../installation/install-addons.md) first. diff --git a/docs/user_docs/kubeblocks-for-mysql-community-edition/cluster-management/create-and-connect-a-mysql-cluster.md b/docs/user_docs/kubeblocks-for-mysql-community-edition/cluster-management/create-and-connect-a-mysql-cluster.md index e1b546c5e50..2db1083e05b 100644 --- a/docs/user_docs/kubeblocks-for-mysql-community-edition/cluster-management/create-and-connect-a-mysql-cluster.md +++ b/docs/user_docs/kubeblocks-for-mysql-community-edition/cluster-management/create-and-connect-a-mysql-cluster.md @@ -17,9 +17,9 @@ This tutorial shows how to create and connect to a MySQL cluster. ### Before you start -* [Install kbcli](./../../installation/install-with-kbcli/install-kbcli.md). -* Install KubeBlocks [by kbcli](./../../installation/install-with-kbcli/install-kubeblocks-with-kbcli.md) or [by Helm](./../../installation/install-with-helm/install-kubeblocks.md). -* Make sure the MySQL Addon is enabled. The MySQL Addon is installed and enabled by KubeBlocks by default. If you disable it when installing KubeBlocks, [enable it](./../../installation/install-with-kbcli/install-addons.md) first. +* [Install kbcli](./../../installation/install-kbcli.md). +* [Install KubeBlocks](./../../installation/install-kubeblocks.md). +* Make sure the MySQL Addon is enabled. The MySQL Addon is installed and enabled by KubeBlocks by default. If you disable it when installing KubeBlocks, [enable it](./../../installation/install-addons.md) first. diff --git a/docs/user_docs/kubeblocks-for-mysql-community-edition/high-availability/high-availability.md b/docs/user_docs/kubeblocks-for-mysql-community-edition/high-availability/high-availability.md index 83613e94cba..0502026718f 100644 --- a/docs/user_docs/kubeblocks-for-mysql-community-edition/high-availability/high-availability.md +++ b/docs/user_docs/kubeblocks-for-mysql-community-edition/high-availability/high-availability.md @@ -24,7 +24,7 @@ The faults here are all simulated by deleting a pod. When there are sufficient r ### Before you start -* Install KubeBlocks [by kbcli](./../../installation/install-with-kbcli/install-kubeblocks-with-kbcli.md) or [by Helm](./../../installation/install-with-helm/install-kubeblocks.md). +* [Install KubeBlocks](./../../installation/install-kubeblocks.md). * Create a MySQL Replication Cluster, refer to [Create a MySQL cluster](./../cluster-management/create-and-connect-a-mysql-cluster.md). * Run `kubectl get cd mysql -o yaml` to check whether _rolechangedprobe_ is enabled in the MySQL Replication (it is enabled by default). If the following configuration exists, it indicates that it is enabled: diff --git a/docs/user_docs/kubeblocks-for-postgresql/cluster-management/create-and-connect-a-postgresql-cluster.md b/docs/user_docs/kubeblocks-for-postgresql/cluster-management/create-and-connect-a-postgresql-cluster.md index a582d886d6a..da0048345ba 100644 --- a/docs/user_docs/kubeblocks-for-postgresql/cluster-management/create-and-connect-a-postgresql-cluster.md +++ b/docs/user_docs/kubeblocks-for-postgresql/cluster-management/create-and-connect-a-postgresql-cluster.md @@ -17,9 +17,9 @@ This tutorial shows how to create and connect to a PostgreSQL cluster. ### Before you start -* [Install kbcli](./../../installation/install-with-kbcli/install-kbcli.md) if you want to manage the PostgreSQL cluster by `kbcli`. -* Install KubeBlocks [by kbcli](./../../installation/install-with-kbcli/install-kubeblocks-with-kbcli.md) or [by Helm](./../../installation/install-with-helm/install-kubeblocks.md). -* Make sure the PostgreSQL Addon is enabled. The PostgreSQL Addon is installed and enabled by KubeBlocks by default. But if you disable it when installing KubeBlocks, [enable it](./../../installation/install-with-kbcli/install-addons.md) first. +* [Install kbcli](./../../installation/install-kbcli.md) if you want to manage the PostgreSQL cluster by `kbcli`. +* [Install KubeBlocks](./../../installation/install-kubeblocks.md). +* Make sure the PostgreSQL Addon is enabled. The PostgreSQL Addon is installed and enabled by KubeBlocks by default. But if you disable it when installing KubeBlocks, [enable it](./../../installation/install-addons.md) first. diff --git a/docs/user_docs/kubeblocks-for-postgresql/high-availability/high-availability.md b/docs/user_docs/kubeblocks-for-postgresql/high-availability/high-availability.md index 9eaa9dfa912..48552eff946 100644 --- a/docs/user_docs/kubeblocks-for-postgresql/high-availability/high-availability.md +++ b/docs/user_docs/kubeblocks-for-postgresql/high-availability/high-availability.md @@ -14,8 +14,8 @@ KubeBlocks integrates [the open-source Patroni solution](https://patroni.readthe ## Before you start -* [Install kbcli](./../../installation/install-with-kbcli/install-kbcli.md) if you want to manage the PostreSQL cluster with `kbcli`. -* Install KubeBlocks [by kbcli](./../../installation/install-with-kbcli/install-kubeblocks-with-kbcli.md) or [by Helm](./../../installation/install-with-helm/install-kubeblocks.md). +* [Install kbcli](./../../installation/install-kbcli.md) if you want to manage the PostreSQL cluster with `kbcli`. +* [Install KubeBlocks](./../../installation/install-kubeblocks.md). * [Create a PostgreSQL Replication Cluster](./../cluster-management/create-and-connect-a-postgresql-cluster.md#create-a-postgresql-cluster). * Check whether the following role probe parameters exist to verify the role probe is enabled. diff --git a/docs/user_docs/kubeblocks-for-pulsar/cluster-management/create-pulsar-cluster-on-kubeblocks.md b/docs/user_docs/kubeblocks-for-pulsar/cluster-management/create-pulsar-cluster-on-kubeblocks.md index b4fe2ddd1b8..268dc31c843 100644 --- a/docs/user_docs/kubeblocks-for-pulsar/cluster-management/create-pulsar-cluster-on-kubeblocks.md +++ b/docs/user_docs/kubeblocks-for-pulsar/cluster-management/create-pulsar-cluster-on-kubeblocks.md @@ -29,8 +29,9 @@ Refer to the [Pulsar official document](https://pulsar.apache.org/docs/3.1.x/) f ## Before you start -* Install KubeBlocks [by kbcli](./../../installation/install-with-kbcli/install-kubeblocks-with-kbcli.md) or [by Helm](../../../user_docs/installation/install-with-helm/install-kubeblocks.md). -* Check whether the Pulsar Addon is enabled. If this Addon is disabled, [enable it](./../../installation/install-with-kbcli/install-addons.md#enabledisable-addons) first. +* [Install kbcli](./../../installation/install-kbcli.md) if you want to manage the StarRocks cluster with `kbcli`. +* [Install KubeBlocks](./../../installation/install-kubeblocks.md). +* Check whether the Pulsar Addon is enabled. If this Addon is disabled, [enable it](./../../installation/install-addons.md) first. * View all the database types and versions available for creating a cluster. diff --git a/docs/user_docs/kubeblocks-for-qdrant/manage-qdrant.md b/docs/user_docs/kubeblocks-for-qdrant/manage-qdrant.md index e121d10b33b..9fe611c714c 100644 --- a/docs/user_docs/kubeblocks-for-qdrant/manage-qdrant.md +++ b/docs/user_docs/kubeblocks-for-qdrant/manage-qdrant.md @@ -17,9 +17,9 @@ KubeBlocks supports the management of Qdrant. This tutorial illustrates how to c ## Before you start -- [Install kbcli](./../installation/install-with-kbcli/install-kbcli.md) if you want to manage the Qdrant cluster with `kbcli`. -- Install KubeBlocks [by kbcli](./../installation/install-with-kbcli/install-kubeblocks-with-kbcli.md) or [by Helm](./../installation/install-with-helm/install-kubeblocks.md). -- Install and enable the Qdrant Addon [by kbcli](./../installation/install-with-kbcli/install-addons.md) or [by Helm](./../installation/install-with-helm/install-addons.md). +- [Install kbcli](./../installation/install-kbcli.md) if you want to manage the Qdrant cluster with `kbcli`. +- [Install KubeBlocks](./../installation/install-kubeblocks.md). +- [Install and enable the Qdrant Addon](./../installation/install-addons.md). - To keep things isolated, create a separate namespace called `demo` throughout this tutorial. ```bash diff --git a/docs/user_docs/kubeblocks-for-rabbitmq/manage-rabbitmq.md b/docs/user_docs/kubeblocks-for-rabbitmq/manage-rabbitmq.md index aca7cd46740..cd9b5c6fc73 100644 --- a/docs/user_docs/kubeblocks-for-rabbitmq/manage-rabbitmq.md +++ b/docs/user_docs/kubeblocks-for-rabbitmq/manage-rabbitmq.md @@ -20,8 +20,8 @@ Currently, KubeBlocks only supports managing RabbitMQ by `kubectl`. ## Before you start -- Install KubeBlocks [by kbcli](./../installation/install-with-kbcli/install-kubeblocks-with-kbcli.md) or [by Helm](./../installation/install-with-helm/install-kubeblocks.md). -- Install and enable the rabbitmq addon [by kbcli](./../installation/install-with-kbcli/install-addons.md) or [by Helm](./../installation/install-with-helm/install-addons.md). +- [Install KubeBlocks](./../installation/install-kubeblocks.md). +- [Install and enable the rabbitmq addon](./../installation/install-addons.md). ## Create a cluster diff --git a/docs/user_docs/kubeblocks-for-redis/cluster-management/create-and-connect-a-redis-cluster.md b/docs/user_docs/kubeblocks-for-redis/cluster-management/create-and-connect-a-redis-cluster.md index 96e9c0ba53c..37ba5704f05 100644 --- a/docs/user_docs/kubeblocks-for-redis/cluster-management/create-and-connect-a-redis-cluster.md +++ b/docs/user_docs/kubeblocks-for-redis/cluster-management/create-and-connect-a-redis-cluster.md @@ -17,9 +17,9 @@ This tutorial shows how to create and connect to a Redis cluster. ### Before you start -* [Install kbcli](./../../installation/install-with-kbcli/install-kbcli.md) if you want to create a Redis cluster by `kbcli`. -* Install KubeBlocks [by kbcli](./../../installation/install-with-kbcli/install-kubeblocks-with-kbcli.md) or [by Helm](./../../installation/install-with-helm/install-kubeblocks.md). -* Make sure the Redis Addon is enabled. The Redis Addon is enabled by KubeBlocks by default. If you disable it when installing KubeBlocks, [enable it](./../../installation/install-with-kbcli/install-addons.md) first. +* [Install kbcli](./../../installation/install-kbcli.md) if you want to create a Redis cluster by `kbcli`. +* [Install KubeBlocks](./../../installation/install-kubeblocks.md). +* Make sure the Redis Addon is enabled. The Redis Addon is enabled by KubeBlocks by default. If you disable it when installing KubeBlocks, [enable it](./../../installation/install-addons.md) first. diff --git a/docs/user_docs/kubeblocks-for-redis/high-availability/high-availability.md b/docs/user_docs/kubeblocks-for-redis/high-availability/high-availability.md index abd9f188f5f..28efeb3e543 100644 --- a/docs/user_docs/kubeblocks-for-redis/high-availability/high-availability.md +++ b/docs/user_docs/kubeblocks-for-redis/high-availability/high-availability.md @@ -18,7 +18,7 @@ In the Redis Replication Cluster provided by KubeBlocks, Sentinel is deployed as ## Before you start -* Install KubeBlocks [by kbcli](./../../installation/install-with-kbcli/install-kubeblocks-with-kbcli.md) or [by Helm](./../../installation/install-with-helm/install-kubeblocks.md). +* [Install KubeBlocks](./../../installation/install-kubeblocks.md). * [Create a Redis Replication Cluster](./../cluster-management/create-and-connect-a-redis-cluster.md#create-a-redis-cluster). * Check the Switch Policy and the role probe. * Check whether the switch policy is `Noop`. diff --git a/docs/user_docs/kubeblocks-for-redis/redis-cluster-mode.md b/docs/user_docs/kubeblocks-for-redis/redis-cluster-mode.md index 0f771fcbfbe..b0c1ea2e317 100644 --- a/docs/user_docs/kubeblocks-for-redis/redis-cluster-mode.md +++ b/docs/user_docs/kubeblocks-for-redis/redis-cluster-mode.md @@ -30,7 +30,7 @@ Below is a brief introduction to the basic operations of Redis Cluster Mode. ### Before you start -* Install KubeBlocks [by kbcli](./../installation/install-with-kbcli/install-kubeblocks-with-kbcli.md) or [by Helm](../../user_docs/installation/install-with-helm/install-kubeblocks.md). +* [Install KubeBlocks](./../installation/install-kubeblocks.md). Make sure your KubeBlocks and addon are version 0.9 or above. * Make sure the Redis Addon is enabled. * View all the database types and versions available for creating a cluster. diff --git a/docs/user_docs/kubeblocks-for-starrocks/manage-starrocks.md b/docs/user_docs/kubeblocks-for-starrocks/manage-starrocks.md index 3475270d334..2756c7b2a3a 100644 --- a/docs/user_docs/kubeblocks-for-starrocks/manage-starrocks.md +++ b/docs/user_docs/kubeblocks-for-starrocks/manage-starrocks.md @@ -17,9 +17,9 @@ This tutorial illustrates how to create and manage a StarRocks cluster by `kbcli ## Before you start -- [Install kbcli](./../installation/install-with-kbcli/install-kbcli.md) if you want to manage the StarRocks cluster with `kbcli`. -- Install KubeBlocks [by kbcli](./../installation/install-with-kbcli/install-kubeblocks-with-kbcli.md) or [by Helm](./../installation/install-with-helm/install-kubeblocks.md). -- Install and enable the starrocks Addon [by kbcli](./../installation/install-with-kbcli/install-addons.md) or [by Helm](./../installation/install-with-helm/install-addons.md). +- [Install kbcli](./../installation/install-kbcli.md) if you want to manage the StarRocks cluster with `kbcli`. +- [Install KubeBlocks](./../installation/install-kubeblocks.md). +- [Install and enable the starrocks Addon](./../installation/install-addons.md). - To keep things isolated, create a separate namespace called `demo` throughout this tutorial. ```bash diff --git a/docs/user_docs/maintenance/backup-and-restore/backup/backup-repo.md b/docs/user_docs/maintenance/backup-and-restore/backup/backup-repo.md index 43322cd7253..59b5d679750 100644 --- a/docs/user_docs/maintenance/backup-and-restore/backup/backup-repo.md +++ b/docs/user_docs/maintenance/backup-and-restore/backup/backup-repo.md @@ -19,10 +19,10 @@ You can create multiple BackupRepos to suit different scenarios. For example, ba Make sure you have all the following prepared. -* [Install kbcli](./../../../installation/install-with-kbcli/install-kbcli.md). +* [Install kbcli](./../../../installation/install-kbcli.md). * [Install kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl). * [Install Helm](https://helm.sh/docs/intro/install/). -* Install KubeBlocks by [kbcli](./../../../installation/install-with-kbcli/install-kubeblocks-with-kbcli.md). +* [Install KubeBlocks](./../../../installation/install-kubeblocks.md). ## Install MinIO diff --git a/docs/user_docs/overview/supported-addons.md b/docs/user_docs/overview/supported-addons.md index d5316edf6eb..a479ff76b26 100644 --- a/docs/user_docs/overview/supported-addons.md +++ b/docs/user_docs/overview/supported-addons.md @@ -8,57 +8,27 @@ sidebar_label: Supported addons # Supported Addons -KubeBlocks, as a cloud-native data infrastructure based on Kubernetes, provides management and control for relational databases, NoSQL databases, vector databases, and stream computing systems; and these databases can be all added as addons. Besides databases, the KubeBlocks addon now also supports plugins for cloud environments and applications. +KubeBlocks uses Addons to extend support for various database engines, +And there are currently over 30 Addons available in the KubeBlocks repository. +Which can be further categorized as follows sections. For installing and enabling Addons, refer to install Addons [by kbcli](./../installation/install-with-kbcli/install-addons.md) or [by Helm](./../installation/install-with-helm/install-addons.md). -| Addons | Description | -|:----------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| apecloud-mysql | ApeCloud MySQL is a database that is compatible with MySQL syntax and achieves high availability through the utilization of the RAFT consensus protocol. | -| apecloud-postgresql | ApeCloud PostgreSQL is a database that is compatible with PostgreSQL syntax and achieves high availability through the utilization of the RAFT consensus protocol. | -| camellia-redis-proxy | Camellia Redis Proxy is a high-performance redis proxy developed using Netty4. | -| clickhouse | ClickHouse is a column-oriented database that enables its users to generate powerful analytics, using SQL queries, in real-time. | -| elasticsearch | Elasticsearch is a distributed, RESTful search engine optimized for speed and relevance on production-scale workloads. | -| etcd | etcd is a strongly consistent, distributed key-value store that provides a reliable way to store data that needs to be accessed by a distributed system or cluster of machines. | -| flink | Apache Flink is a framework and distributed processing engine for stateful computations over unbounded and bounded data streams. | -| greatsql | GreatSQL is a high performance open source relational database management system that can be used on common hardware for financial-grade application scenarios. | -| greptimedb | GreptimeDB is an open-source time-series database with a special focus on scalability, analytical capabilities and efficiency. | -| influxdb | InfluxDB enables real-time analytics by serving as a purpose-built database that optimizes processing and scaling for large time series data workloads. | -| kafka | Apache Kafka is an open-source distributed event streaming platform used by thousands of companies for high-performance data pipelines, streaming analytics, data integration, and mission-critical applications. | -| mariadb | MariaDB is a high performance open source relational database management system that is widely used for web and application servers. | -| milvus | Milvus is a flexible, reliable, & blazing-fast cloud-native, open-source vector database. | -| minio | MinIO is an object storage solution that provides an Amazon Web Services S3-compatible API and supports all core S3 features. | -| mogdb | MogDB is a stable and easy-to-use enterprise-ready relational database based on the openGauss open source database. | -| mongodb | MongoDB is a document-oriented NoSQL database used for high volume data storage. | -| mysql (Primary-Secondary replication) | -| nebula | NebulaGraph is an open source graph database that can store and process graphs with trillions of edges and vertices. | -| neon | Neon is Serverless Postgres built for the cloud. | -| oceanbase-ce | Unlimited scalable distributed database for data-intensive transactional and real-time operational analytics workloads, with ultra-fast performance that has once achieved world records in the TPC-C benchmark test. OceanBase has served over 400 customers across the globe and has been supporting all mission critical systems in Alipay. | -| official-postgresql | An official PostgreSQL cluster definition Helm chart for Kubernetes. | -| opengauss | openGauss is an open source relational database management system that is released with the Mulan PSL v2. | -| openldap | The OpenLDAP Project is a collaborative effort to develop a robust, commercial-grade, fully featured, and open source LDAP suite of applications and development tools. This chart provides KubeBlocks. | -| opensearch | Open source distributed and RESTful search engine. | -| opentenbase | OpenTenBase is an enterprise-level distributed HTAP open source database. | -| orchestrator | Orchestrator is a MySQL high availability and replication management tool, runs as a service and provides command line access, HTTP API and Web interface. | -| oriolebd | OrioleDB is a new storage engine for PostgreSQL, bringing a modern approach to database capacity, capabilities and performance to the world's most-loved database platform. | -| polardb-x | PolarDB-X is a cloud native distributed SQL Database designed for high concurrency, massive storage, complex querying scenarios. | -| postgresql | PostgreSQL is an advanced, enterprise class open source relational database that supports both SQL (relational) and JSON (non-relational) querying. | -| pulsar | Apache® Pulsar™ is an open-source, distributed messaging and streaming platform built for the cloud. | -| qdrant | Qdrant is a vector database & vector similarity search engine. | -| rabbitmq | RabbitMQ is a reliable and mature messaging and streaming broker. | -| redis | Redis is a fast, open source, in-memory, key-value data store. | -| risingwave | RisingWave is a distributed SQL database for stream processing. It is designed to reduce the complexity and cost of building real-time applications. | -| solr | Solr is the popular, blazing-fast, open source enterprise search platform built on Apache Lucene. | -| starrocks-ce | StarRocks is a next-gen, high-performance analytical data warehouse that enables real-time, multi-dimensional, and highly concurrent data analysis. | -| tdengine | TDengine™ is an industrial data platform purpose-built for the Industrial IoT, combining a time series database with essential features like stream processing, data subscription, and caching. | -| tidb | TiDB is an open-source, cloud-native, distributed, MySQL-Compatible database for elastic scale and real-time analytics. | -| victoria-metrics | VictoriaMetrics is a fast, cost-effective and scalable monitoring solution and time series database. | -| weaviate | Weaviate is an open-source vector database. | -| xinference | Xorbits Inference(Xinference) is a powerful and versatile library designed to serve language, speech recognition, and multimodal models. | -| yanshan | YashanDB is a database management system developed by Shenzhen Institute of Computing Science. | -| zookeeper | Apache ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services. | - -## Supported functions of addons +## Relational Databases + +MySQL and PostgreSQL are the two most popular open-source relational databases in the world, and they have branches/variants. + +### MySQL and its variants + +**Addon List** + +| Addons | Description | +|:----------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| mysql | This addon uses the community edition MySQL image officially released by Oracle. | +| apecloud-mysql | ApeCloud MySQL is a free, fully compatible drop-in replacement for MySQL Community Edition, offering enhanced high availability through a RAFT protocol replication plugin. The image is provided by ApeCloud. Additionally, ApeCloud MySQL includes an open-source proxy called WeScale, which provides features such as read-write splitting and connection pooling. | +| mariadb | MariaDB is a high performance open source relational database management system that is widely used for web and application servers. | + +**Supported Features** :::note diff --git a/docs/user_docs/try-out-on-playground/try-kubeblocks-on-cloud.md b/docs/user_docs/try-out-on-playground/try-kubeblocks-on-cloud.md index d2c0138ce6a..694b6ee5cdc 100644 --- a/docs/user_docs/try-out-on-playground/try-kubeblocks-on-cloud.md +++ b/docs/user_docs/try-out-on-playground/try-kubeblocks-on-cloud.md @@ -26,7 +26,7 @@ Make sure you have all the followings prepared. * [Install AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html) * [Install kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl) -* [Install kbcli](./../installation/install-with-kbcli/install-kbcli.md) +* [Install kbcli](./../installation/install-kbcli.md) ### Configure access key @@ -85,7 +85,7 @@ Make sure you have all the followings prepared. * Google Cloud account * [Install kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl) -* [Install kbcli](./../installation/install-with-kbcli/install-kbcli.md) +* [Install kbcli](./../installation/install-kbcli.md) ### Configure GCP environment @@ -156,7 +156,7 @@ Make sure you have all the followings prepared. * Tencent Cloud account * [Install kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl) -* [Install kbcli](./../installation/install-with-kbcli/install-kbcli.md) +* [Install kbcli](./../installation/install-kbcli.md) ### Configure TKE environment @@ -209,7 +209,7 @@ Make sure you have all the followings prepared. * Alibaba Cloud account. * [Install kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl). -* [Install kbcli](./../installation/install-with-kbcli/install-kbcli.md). +* [Install kbcli](./../installation/install-kbcli.md). ### Configure ACK environment diff --git a/docs/user_docs/try-out-on-playground/try-kubeblocks-on-your-laptop.md b/docs/user_docs/try-out-on-playground/try-kubeblocks-on-your-laptop.md index 730d499f8ab..201383eafb3 100644 --- a/docs/user_docs/try-out-on-playground/try-kubeblocks-on-your-laptop.md +++ b/docs/user_docs/try-out-on-playground/try-kubeblocks-on-your-laptop.md @@ -21,7 +21,7 @@ Meet the following requirements for a smooth user experience: * Make sure the following tools are installed on your laptop: * [Docker](https://docs.docker.com/get-docker/): v20.10.5 (runc ≥ v1.0.0-rc93) or above; * [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl): it is used to interact with Kubernetes clusters; - * [kbcli](./../installation/install-with-kbcli/install-kbcli.md): it is used for the interaction between Playground and KubeBlocks. + * [kbcli](./../installation/install-kbcli.md): it is used for the interaction between Playground and KubeBlocks. ## Initialize Playground diff --git a/i18n/zh-cn/user-docs/connect-databases/connect-to-database-in-production-environment.md b/i18n/zh-cn/user-docs/connect-databases/connect-to-database-in-production-environment.md index 415b64ef410..a780d681d32 100644 --- a/i18n/zh-cn/user-docs/connect-databases/connect-to-database-in-production-environment.md +++ b/i18n/zh-cn/user-docs/connect-databases/connect-to-database-in-production-environment.md @@ -96,26 +96,24 @@ kbcli cluster expose ${cluster-name} --type vpc --enable=true 此处以 MySQL 集群为例,在阿里云上为集群暴露 VPC 访问地址的方式如下: -```bash +```yaml kubectl apply -f - < @@ -136,26 +134,24 @@ kbcli cluster expose ${cluster-name} --type vpc --enable=false -```bash +```yaml kubectl apply -f - < @@ -192,26 +188,25 @@ kbcli cluster expose ${cluster-name} --type internet --enable=true 以 MySQL 集群为例,在阿里云上为集群暴露公网访问地址的方式如下: -```bash +```yaml kubectl apply -f - < @@ -238,26 +233,24 @@ kbcli cluster expose ${cluster-name} --type internet --enable=false -```bash +```yaml kubectl apply -f - < diff --git a/i18n/zh-cn/user-docs/create_database/overview-of-create-database.md b/i18n/zh-cn/user-docs/create_database/overview-of-create-database.md index 625879df95a..a8a0234d1e2 100644 --- a/i18n/zh-cn/user-docs/create_database/overview-of-create-database.md +++ b/i18n/zh-cn/user-docs/create_database/overview-of-create-database.md @@ -13,10 +13,10 @@ KubeBlocks 通过插件(Addon)机制支持多种数据库引擎。部署 Kub - [ApeCloud MySQL](./../kubeblocks-for-apecloud-mysql/cluster-management/create-and-connect-an-apecloud-mysql-cluster.md) - [MySQL 社区版](./../kubeblocks-for-mysql-community-edition/cluster-management/create-and-connect-a-mysql-cluster.md) - [PostgreSQL](./../kubeblocks-for-postgresql/cluster-management/create-and-connect-a-postgresql-cluster.md) -- [Redis](./../kubeblocks-for-redis/cluster-management/create-and-connect-a-redis-cluster.md) +- [Redis](./../kubeblocks-for-redis/cluster-management/create-and-connect-to-a-redis-cluster.md) - [MongoDB](./../kubeblocks-for-mongodb/cluster-management/create-and-connect-to-a-mongodb-cluster.md) - [Kafka](./../kubeblocks-for-kafka/cluster-management/create-a-kafka-cluster.md) -- [Pulsar](./../kubeblocks-for-pulsar/cluster-management/create-pulsar-cluster-on-kubeblocks.md) +- [Pulsar](./../kubeblocks-for-pulsar/cluster-management/create-pulsar-cluster-on-kb.md) - [RabbitMQ](./../kubeblocks-for-rabbitmq/manage-rabbitmq.md) - [Elasticsearch](./../kubeblocks-for-elasticsearch/manage-elasticsearch.md) - [StarRocks](./../kubeblocks-for-starrocks/manage-starrocks.md) diff --git a/i18n/zh-cn/user-docs/installation/install-addons.md b/i18n/zh-cn/user-docs/installation/install-addons.md new file mode 100644 index 00000000000..c12e52fe09d --- /dev/null +++ b/i18n/zh-cn/user-docs/installation/install-addons.md @@ -0,0 +1,182 @@ +--- +title: 安装引擎 +description: 使用 Helm 安装 KubeBlocks 支持的引擎 +keywords: [引擎, helm, KubeBlocks] +sidebar_position: 4 +sidebar_label: 安装引擎 +--- + +# 安装引擎 + +KubeBlocks v0.8.0 发布后,数据库引擎插件(Addon)与 KubeBlocks 解耦,KubeBlocks 默认安装了部分引擎,如需体验其它引擎,需通过索引安装。如果您卸载了部分引擎,也可通过本文步骤,重新安装。 + +本文以 elasticsearch 为例,可根据实际情况替换引擎名称。 + +官网引擎索引仓库为 [KubeBlocks 索引](https://github.com/apecloud/block-index)。引擎代码维护在 [KubeBlocks 引擎插件仓库](https://github.com/apecloud/kubeblocks-addons)。 + +:::note + +请确保 Addon 和 KubeBlocks 的大版本匹配。 + +例如,如果您当前使用的 KubeBlocks 版本是 v0.9.2,Addon 应安装对应的 v0.9.0,而不是其他版本(如 v0.8.0),否则系统将因版本不匹配产生报错。 + +::: + + + + + +1. (可选)添加 KubeBlocks 仓库。如果您使用 Helm 安装了 KubeBlocks 或此前已添加过该仓库,只需执行 `helm repo update`。 + + ```bash + helm repo add kubeblocks https://apecloud.github.io/helm-charts + helm repo update + ``` + +2. 查看引擎版本。 + + ```bash + helm search repo kubeblocks/elasticsearch --devel --versions + ``` + +3. 以 elasticsearch 为例,安装引擎。使用 `--version` 指定版本。 + + ```bash + helm install kb-addon-es kubeblocks/elasticsearch --namespace kb-system --create-namespace --version x.y.z + ``` + +4. 验证该引擎是否安装成功。 + + 如果状态显示为 `deployed`,则表明该引擎已成功安装。 + + ```bash + helm list -A + > + NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION + ...... + kb-addon-es kb-system 1 2024-11-27 10:04:59.730127 +0800 CST deployed elasticsearch-0.9.0 8.8.2 + ``` + +5. (可选)您可以执行以下命令卸载引擎。如果您已使用该引擎创建集群,请先删除集群。 + + ```bash + helm uninstall kb-addon-es --namespace kb-system + ``` + + + + + +1. 查看引擎仓库索引。 + + kbcli 默认创建名为 `kubeblocks` 的索引,可使用 `kbcli addon index list` 查看该索引。 + + ```bash + kbcli addon index list + > + INDEX URL + kubeblocks https://github.com/apecloud/block-index.git + ``` + + 如果命令执行结果未显示或者你想要添加自定义索引仓库,则表明索引未建立,可使用 `kbcli addon index add ` 命令手动添加索引。例如, + + ```bash + kbcli addon index add kubeblocks https://github.com/apecloud/block-index.git + ``` + + 如果不确定索引是否为最新版本,可使用如下命令更新索引。 + + ```bash + kbcli addon index update kubeblocks + ``` + +2. (可选)索引建立后,可以通过 `addon search` 命令检查想要安装的引擎是否在索引信息中存在。 + + ```bash + kbcli addon search elasticsearch + > + ADDON VERSION INDEX + elasticsearch 0.7.0 kubeblocks + elasticsearch 0.7.1 kubeblocks + elasticsearch 0.7.2 kubeblocks + elasticsearch 0.8.0 kubeblocks + elasticsearch 0.9.0 kubeblocks + ``` + +3. 安装引擎。 + + 当引擎有多个版本和索引源时,可使用 `--index` 指定索引源,`--version` 指定安装版本。系统默认以 `kubeblocks` 索引仓库为索引源,安装最新版本。 + + ```bash + kbcli addon install elasticsearch --index kubeblocks --version x.y.z + ``` + +4. 验证该引擎是否安装成功。 + + 如果状态显示为 `Enabled`,则表明该引擎已成功安装。 + + ```bash + kbcli addon list + > + NAME VERSION PROVIDER STATUS AUTO-INSTALL + elasticsearch 0.9.0 apecloud Enabled true + ``` + +5. (可选)您可以执行以下命令停用引擎。如果您已使用该引擎创建集群,请先删除集群。 + + ```bash + kbcli addon disable elasticsearch + ``` + + 您也可以卸载该引擎。 + + ```bash + kbcli addon uninstall elasticsearch + ``` + +:::note + +kbcli 支持启用/停用引擎。您可以按需调整引擎启用状态。此外,使用 kbcli 安装 KubeBlocks 时,系统默认安装但禁用了部分引擎,这类引擎的状态为 `Disabled`,您可以通过 kbcli 启用这类引擎。例如, + +```bash +kbcli addon list +> +NAME VERSION PROVIDER STATUS AUTO-INSTALL +alertmanager-webhook-adaptor 0.1.4 apecloud Disabled false +apecloud-otel-collector 0.1.2-beta.3 apecloud Disabled false +aws-load-balancer-controller 1.4.8 community Disabled false +csi-driver-nfs 4.5.0 community Disabled false +csi-hostpath-driver 0.7.0 community Disabled false +grafana 6.43.5 community Disabled false +llm 0.9.0 community Disabled false +prometheus 15.16.1 community Disabled false +qdrant 0.9.1 community Disabled false +victoria-metrics-agent 0.8.41 community Disabled false +``` + +* 启用引擎。 + + ```bash + kbcli addon enable qdrant + ``` + +* 禁用引擎。 + + ```bash + kbcli addon disable qdrant + ``` + +启用/禁用引擎后,查看引擎列表,检查引擎状态是否按需变更。 + +```bash +kbcli addon list +> +NAME VERSION PROVIDER STATUS AUTO-INSTALL +qdrant 0.9.1 community Enabled false +``` + +::: + + + + diff --git a/i18n/zh-cn/user-docs/installation/install-with-kbcli/install-kbcli.md b/i18n/zh-cn/user-docs/installation/install-kbcli.md similarity index 100% rename from i18n/zh-cn/user-docs/installation/install-with-kbcli/install-kbcli.md rename to i18n/zh-cn/user-docs/installation/install-kbcli.md diff --git a/i18n/zh-cn/user-docs/installation/install-with-helm/install-kubeblocks.md b/i18n/zh-cn/user-docs/installation/install-kubeblocks.md similarity index 63% rename from i18n/zh-cn/user-docs/installation/install-with-helm/install-kubeblocks.md rename to i18n/zh-cn/user-docs/installation/install-kubeblocks.md index 895e93561ab..a885b4d693a 100644 --- a/i18n/zh-cn/user-docs/installation/install-with-helm/install-kubeblocks.md +++ b/i18n/zh-cn/user-docs/installation/install-kubeblocks.md @@ -2,24 +2,25 @@ title: 安装 KubeBlocks description: 在现有的 Kubernetes 集群上使用 Helm 安装 KubeBlocks keywords: [污点, 亲和性, 容忍, 安装, kbcli, KubeBlocks] -sidebar_position: 1 +sidebar_position: 3 sidebar_label: 安装 KubeBlocks --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -# 安装 KubeBlocks +# 安装 KubeBlocks -KubeBlocks 是 Kubernetes 原生 operator,可通过 Helm 或者 kubectl 应用 YAML 文件安装 KubeBlocks。本文将介绍如何在现有的 Kubernetes 集群上部署 KubeBlocks。 +使用 Playground 创建一个新的 Kubernetes 集群并安装 KubeBlocks,是快速上手的一种方法。然而,在实际生产环境中,情况会复杂得多,应用程序在不同的命名空间中运行,还存在资源或权限限制。本文档将介绍如何在现有的 Kubernetes 集群上部署 KubeBlocks。 -如果您想要在本地环境试用 KubeBlocks,可通过 [Playground](./../../try-out-on-playground/try-kubeblocks-on-local-host.md) 试用,或者[先在本地创建 Kubernetes 测试集群](./../prerequisite/prepare-a-local-k8s-cluster.md),然后按照本文操作步骤安装 KubeBlocks。 +KubeBlocks 是 Kubernetes 原生 operator,可通过 Helm、 kubectl 应用 YAML 文件或者 kbcli 安装 KubeBlocks。 -:::note +如果您想要在本地环境试用 KubeBlocks,可通过 [Playground](./../../try-out-on-playground/try-kubeblocks-on-local-host.md) 试用,或者[先在本地创建 Kubernetes 测试集群](./../prepare-a-local-k8s-cluster/prepare-a-local-k8s-cluster.md),然后按照本文操作步骤安装 KubeBlocks。 -如果您使用 Helm 安装 KubeBlocks,卸载时也需使用 Helm。 +:::note -请确保您已安装 [kubectl](https://kubernetes.io/docs/tasks/tools/) 和 [Helm](https://helm.sh/docs/intro/install/)。 +- 请确保您安装和卸载 KubeBlocks 使用的方式保持一致,例如,如果您使用 Helm 安装 KubeBlocks,卸载时也需使用 Helm。 +- 请确保您已安装 [kubectl](https://kubernetes.io/docs/tasks/tools/),[Helm](https://helm.sh/docs/intro/install/) 或 [kbcli](./install-kbcli.md)。 ::: @@ -128,12 +129,56 @@ KubeBlocks 是 Kubernetes 原生 operator,可通过 Helm 或者 kubectl 应用 + + +执行 `kbcli kubeblocks install` 将 KubeBlocks 安装在 `kb-system` 命名空间中,或者使用 `--namespace` 指定一个命名空间。 + +```bash +kbcli kubeblocks install +``` + +如果想安装 KubeBlocks 的指定版本,请按照以下步骤操作: + +1. 查看可用的版本。 + + ```bash + kbcli kubeblocks list-versions + ``` + + 如需查看包含 alpha 和 beta 在内的版本,可执行以下命令。 + + ```bash + kbcli kb list-versions --devel --limit=100 + ``` + + 或者,你可以在 [KubeBlocks Release 页面](https://github.com/apecloud/kubeblocks/releases/)中查看可用的版本。 + +2. 使用 `--version` 指定版本。 + + ```bash + kbcli kubeblocks install --version=x.x.x + ``` + + :::note + + kbcli 默认安装最新版本。如果您的环境中已有正在运行的 KubeBlocks 实例,则需要安装与之匹配的 kbcli 版本。 + + 例如,如果您当前使用的 KubeBlocks 版本是 v0.8.3,kbcli 应安装对应的 v0.8.3,而不是更高版本(如 v0.9.0),否则系统将因版本不匹配产生报错。 + + ::: + + + ## 验证 KubeBlocks 安装 执行以下命令,检查 KubeBlocks 是否已成功安装。 + + + + ```bash kubectl -n kb-system get pods ``` @@ -155,3 +200,29 @@ prometheus-node-exporter-r6kvl 1/1 Running 0 prometheus-pushgateway-8555888c7d-xkgfc 1/1 Running 0 3m56s prometheus-server-5759b94fc8-686xp 2/2 Running 0 3m56s ``` + + + + + +```bash +kbcli kubeblocks status +``` + +***结果*** + +如果工作负载都显示已准备就绪,则表明已成功安装 KubeBlocks。 + +```bash +KubeBlocks is deployed in namespace: kb-system,version: x.x.x +> +KubeBlocks Workloads: +NAMESPACE KIND NAME READY PODS CPU(CORES) MEMORY(BYTES) CREATED-AT +kb-system Deployment kb-addon-snapshot-controller 1/1 N/A N/A Oct 13,2023 14:27 UTC+0800 +kb-system Deployment kubeblocks 1/1 N/A N/A Oct 13,2023 14:26 UTC+0800 +kb-system Deployment kubeblocks-dataprotection 1/1 N/A N/A Oct 13,2023 14:26 UTC+0800 +``` + + + + diff --git a/i18n/zh-cn/user-docs/installation/install-with-helm/_category_.yml b/i18n/zh-cn/user-docs/installation/install-with-helm/_category_.yml deleted file mode 100644 index 1444f832e04..00000000000 --- a/i18n/zh-cn/user-docs/installation/install-with-helm/_category_.yml +++ /dev/null @@ -1,4 +0,0 @@ -position: 3 -label: 使用 Helm 安装 -collapsible: true -collapsed: true \ No newline at end of file diff --git a/i18n/zh-cn/user-docs/installation/install-with-helm/install-addons.md b/i18n/zh-cn/user-docs/installation/install-with-helm/install-addons.md deleted file mode 100644 index c4c152e15f5..00000000000 --- a/i18n/zh-cn/user-docs/installation/install-with-helm/install-addons.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: 安装引擎 -description: 使用 Helm 安装 KubeBlocks 支持的引擎 -keywords: [引擎, helm, KubeBlocks] -sidebar_position: 3 -sidebar_label: 安装引擎 ---- - -# 安装引擎 - -KubeBlocks v0.8.0 发布后,数据库引擎插件(Addon)与 KubeBlocks 解耦,KubeBlocks 默认安装了部分引擎,如需体验其它引擎,需通过索引安装。如果您卸载了部分引擎,也可通过本文步骤,重新安装。 - -本文以 etcd 为例,可根据实际情况替换引擎名称。 - -官网引擎索引仓库为 [KubeBlocks 索引](https://github.com/apecloud/block-index)。引擎代码维护在 [KubeBlocks 引擎插件仓库](https://github.com/apecloud/kubeblocks-addons)。 - -1. (可选)添加 KubeBlocks 仓库。如果您使用 Helm 安装了 KubeBlocks 或此前已添加过该仓库,只需执行 `helm repo update`。 - - ```bash - helm repo add kubeblocks https://apecloud.github.io/helm-charts - helm repo update - ``` - -2. 查看引擎版本。 - - ```bash - helm search repo kubeblocks/etcd --devel --versions - ``` - -3. 以 etcd 为例,安装引擎。使用 `--version` 指定版本。 - - ```bash - helm install etcd kubeblocks/etcd --namespace kb-system --create-namespace --version x.y.z - ``` - -4. 验证该引擎是否安装成功。 - - 如果状态显示为 `deployed`,则表明该引擎已成功安装。 - - ```bash - helm list -A - > - NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION - ...... - etcd kb-system 1 2024-10-25 07:18:35.294326176 +0000 UTC deployed etcd-0.9.0 v3.5.6 - ``` - -5. (可选)您可以执行以下命令禁用引擎。 - - ```bash - helm uninstall etcd --namespace kb-system - ``` diff --git a/i18n/zh-cn/user-docs/installation/install-with-helm/uninstall-kubeblocks.md b/i18n/zh-cn/user-docs/installation/install-with-helm/uninstall-kubeblocks.md deleted file mode 100644 index 06d96c78c43..00000000000 --- a/i18n/zh-cn/user-docs/installation/install-with-helm/uninstall-kubeblocks.md +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: 卸载 KubeBlocks -description: 卸载 KubeBlocks -keywords: [kubeblocks, 卸载] -sidebar_position: 5 -sidebar_label: 卸载 KubeBlocks ---- - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -# 卸载 KubeBlocks - -卸载顺序: - -1. 如果已经创建了集群,请先删除集群。 - - ```bash - kubebctl delete cluster -n namespace - ``` - -2. 卸载 KubeBlocks。 - -## 卸载 KubeBlocks - - - - - -在执行以下命令前,请删除之前创建的所有集群和资源,否则卸载可能无法成功。 - -```bash -helm uninstall kubeblocks --namespace kb-system -``` - -Helm 不会删除 CRD 对象。请使用以下命令删除 KubeBlocks 创建的对象。 - -```bash -kubectl get crd -o name | grep kubeblocks.io | xargs kubectl delete -``` - - - - - -从 KubeBlocks chart 生成 YAML 文件,并使用 `kubectl` 进行卸载。使用 `--version x.y.z` 指定版本,确保卸载的版本与安装的版本相同。 - -```bash -helm template kubeblocks kubeblocks/kubeblocks --version x.y.z --namespace kb-system | kubectl delete -f - -``` - - - - diff --git a/i18n/zh-cn/user-docs/installation/install-with-kbcli/_category_.yml b/i18n/zh-cn/user-docs/installation/install-with-kbcli/_category_.yml deleted file mode 100644 index 45c03fec690..00000000000 --- a/i18n/zh-cn/user-docs/installation/install-with-kbcli/_category_.yml +++ /dev/null @@ -1,4 +0,0 @@ -position: 2 -label: 使用 kbcli 安装 -collapsible: true -collapsed: true \ No newline at end of file diff --git a/i18n/zh-cn/user-docs/installation/install-with-kbcli/install-addons.md b/i18n/zh-cn/user-docs/installation/install-with-kbcli/install-addons.md deleted file mode 100644 index 0db1b02f682..00000000000 --- a/i18n/zh-cn/user-docs/installation/install-with-kbcli/install-addons.md +++ /dev/null @@ -1,103 +0,0 @@ ---- -title: 安装引擎 -description: 安装 KubeBlocks 引擎 -keywords: [kbcli, kubeblocks, addons, 安装,引擎] -sidebar_position: 3 -sidebar_label: 安装引擎 ---- - -# 安装引擎 - -KubeBlocks v0.8.0 发布后,引擎(Addon)与 KubeBlocks 解耦,KubeBlocks 默认安装了部分引擎,如需体验其它引擎,需通过索引安装相关引擎。如果您卸载了部分引擎,也可通过本文步骤,重新安装。 - -本文以 etcd 为例,可根据实际情况替换引擎名称。 - -官网引擎索引仓库为 [KubeBlocks index](https://github.com/apecloud/block-index)。引擎代码维护在 [KubeBlocks addon repo](https://github.com/apecloud/kubeblocks-addons)。 - -## 使用索引安装引擎 - -1. 查看引擎仓库索引。 - - kbcli 默认创建名为 `kubeblocks` 的索引,可使用 `kbcli addon index list` 查看该索引。 - - ```bash - kbcli addon index list - > - INDEX URL - kubeblocks https://github.com/apecloud/block-index.git - ``` - - 如果命令执行结果未显示或者你想要添加自定义索引仓库,则表明索引未建立,可使用 `kbcli addon index add ` 命令手动添加索引。例如, - - ```bash - kbcli addon index add kubeblocks https://github.com/apecloud/block-index.git - ``` - - 如果不确定索引是否为最新版本,可使用如下命令更新索引。 - - ```bash - kbcli addon index update kubeblocks - ``` - -2. (可选)索引建立后,可以通过 `addon search` 命令检查想要安装的引擎是否在索引信息中存在。 - - ```bash - kbcli addon search etcd - > - ADDON VERSION INDEX - etcd 0.7.0 kubeblocks - etcd 0.8.0 kubeblocks - etcd 0.9.0 kubeblocks - ``` - -3. 安装引擎。 - - 当引擎有多个版本和索引源时,可使用 `--index` 指定索引源,`--version` 指定安装版本。系统默认以 `kubeblocks` 索引仓库 为索引源,安装最新版本。 - - ```bash - kbcli addon install etcd --index kubeblocks --version x.y.z - ``` - - **后续操作** - - 引擎安装完成后,可查看引擎列表、启用引擎。 - -## 查看引擎列表 - -执行 `kbcli addon list` 命令查看已经支持的引擎。 - -## 启用/禁用引擎 - -请按照以下步骤手动启用或禁用引擎。 - -***步骤:*** - -1. 执行 `kbcli addon enable` 启用引擎。 - - ***示例*** - - ```bash - kbcli addon enable etcd - ``` - - 执行 `kbcli addon disable` 禁用引擎。 - -2. 再次查看引擎列表,检查是否已启用引擎。 - - ```bash - kbcli addon list - ``` - -## 卸载引擎 - -您也可卸载已安装的引擎。如果已经创建了相关集群,请先删除集群。 - -```bash -kbcli cluster delete -``` - -卸载已安装的引擎。 - -```bash -kbcli addon uninstall etcd -``` diff --git a/i18n/zh-cn/user-docs/installation/install-with-kbcli/install-kubeblocks-with-kbcli.md b/i18n/zh-cn/user-docs/installation/install-with-kbcli/install-kubeblocks-with-kbcli.md deleted file mode 100644 index 6cc48b87e5f..00000000000 --- a/i18n/zh-cn/user-docs/installation/install-with-kbcli/install-kubeblocks-with-kbcli.md +++ /dev/null @@ -1,104 +0,0 @@ ---- -title: 用 kbcli 安装 KubeBlocks -description: 如何用 kbcli 安装 KubeBlocksInstall KubeBlocks -keywords: [taints, affinity, tolerance, 安装, kbcli, KubeBlocks] -sidebar_position: 2 -sidebar_label: 用 kbcli 安装 KubeBlocks ---- - -# 用 kbcli 安装 KubeBlocks - -使用 Playground 创建一个新的 Kubernetes 集群并安装 KubeBlocks,是快速上手的一种方法。然而,在实际生产环境中,情况会复杂得多,应用程序在不同的命名空间中运行,还存在资源或权限限制。本文档将介绍如何在现有的 Kubernetes 集群上部署 KubeBlocks。 - -如果您想要在本地环境试用 KubeBlocks,可通过 [Playground](./../../try-out-on-playground/try-kubeblocks-on-local-host.md) 试用,或者[先在本地创建 Kubernetes 测试集群](./../prerequisite/prepare-a-local-k8s-cluster.md),然后按照本文操作步骤安装 KubeBlocks。 - -## 环境准备 - -准备一个可访问的 Kubernetes 集群,版本要求 1.22 及以上。该集群应满足如下要求。 - - - - - - - - - - - - - - - - - - - - - - - - - - -
资源要求
控制面建议创建 1 个具有 4 核 CPU、4 GB 内存和 50 GB 存储空间的节点。
数据面 MySQL 建议至少创建 3 个具有 2 核 CPU、4 GB 内存和 50 GB 存储空间的节点。
PostgreSQL 建议至少创建 2 个具有 2 核 CPU、4 GB 内存和 50 GB 存储空间的节点。
Redis 建议至少创建 2 个具有 2 核 CPU、4 GB 内存和 50 GB 存储空间的节点。
MongoDB 建议至少创建 3 个具有 2 核 CPU、4 GB 内存和 50 GB 存储空间的节点。
- -## 安装步骤 - -执行 `kbcli kubeblocks install` 将 KubeBlocks 安装在 `kb-system` 命名空间中,或者使用 `--namespace` 指定一个命名空间。 - -```bash -kbcli kubeblocks install -``` - -如果想安装 KubeBlocks 的指定版本,请按照以下步骤操作: - -1. 查看可用的版本。 - - ```bash - kbcli kubeblocks list-versions - ``` - - 如需查看包含 alpha 和 beta 在内的版本,可执行以下命令。 - - ```bash - kbcli kb list-versions --devel --limit=100 - ``` - - 或者,你可以在 [KubeBlocks Release 页面](https://github.com/apecloud/kubeblocks/releases/)中查看可用的版本。 - -2. 使用 `--version` 指定版本。 - - ```bash - kbcli kubeblocks install --version=x.x.x - ``` - - :::note - - kbcli 默认安装最新版本。如果您的环境中已有正在运行的 KubeBlocks 实例,则需要安装与之匹配的 kbcli 版本。 - - 例如,如果您当前使用的 KubeBlocks 版本是 v0.8.3,kbcli 应安装对应的 v0.8.3,而不是更高版本(如 v0.9.0),否则系统将因版本不匹配产生报错。 - - ::: - -## 验证 KubeBlocks 安装 - -执行以下命令来检查 KubeBlocks 是否已成功安装。 - -```bash -kbcli kubeblocks status -``` - -***结果*** - -如果工作负载都显示已准备就绪,则表明已成功安装 KubeBlocks。 - -```bash -KubeBlocks is deployed in namespace: kb-system,version: x.x.x -> -KubeBlocks Workloads: -NAMESPACE KIND NAME READY PODS CPU(CORES) MEMORY(BYTES) CREATED-AT -kb-system Deployment kb-addon-snapshot-controller 1/1 N/A N/A Oct 13,2023 14:27 UTC+0800 -kb-system Deployment kubeblocks 1/1 N/A N/A Oct 13,2023 14:26 UTC+0800 -kb-system Deployment kubeblocks-dataprotection 1/1 N/A N/A Oct 13,2023 14:26 UTC+0800 -``` diff --git a/i18n/zh-cn/user-docs/installation/install-with-kbcli/uninstall-kbcli-and-kubeblocks.md b/i18n/zh-cn/user-docs/installation/uninstall-kubeblocks-and-kbcli.md similarity index 66% rename from i18n/zh-cn/user-docs/installation/install-with-kbcli/uninstall-kbcli-and-kubeblocks.md rename to i18n/zh-cn/user-docs/installation/uninstall-kubeblocks-and-kbcli.md index 7bb0fa52593..09320cf0e49 100644 --- a/i18n/zh-cn/user-docs/installation/install-with-kbcli/uninstall-kbcli-and-kubeblocks.md +++ b/i18n/zh-cn/user-docs/installation/uninstall-kubeblocks-and-kbcli.md @@ -1,36 +1,62 @@ --- -title: 卸载 kbcli 和 KubeBlocks -description: 卸载 kbcli 和 KubeBlocks -keywords: [kbcli, kubeblocks, 卸载] -sidebar_position: 4 -sidebar_label: 卸载 KubeBlocks 和 kbcli +title: 卸载 KubeBlocks +description: 卸载 KubeBlocks +keywords: [kubeblocks, 卸载] +sidebar_position: 5 +sidebar_label: 卸载 KubeBlocks 及 kbcli --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -# 卸载 KubeBlocks 和 kbcli +# 卸载 KubeBlocks 及 kbcli 卸载顺序: -1. 如果已经创建了集群,请先删除集群。 +1. 卸载前,请确保所有集群和备份已删除 - ```bash - kbcli cluster delete - ``` + ```bash + kubectl delete cluster -n namespace + ``` -2. 卸载 KubeBlocks。 + ```bash + kubectl delete backup -n namespace + ``` -3. 卸载 kbcli。 +2. 卸载 KubeBlocks。 ## 卸载 KubeBlocks -如果想在试用结束后删除 KubeBlocks,请执行以下操作: + + + + +在执行以下命令前,请删除之前创建的所有集群和资源,否则卸载可能无法成功。 ```bash -kbcli kubeblocks uninstall +helm uninstall kubeblocks --namespace kb-system ``` +Helm 不会删除 CRD 对象。请使用以下命令删除 KubeBlocks 创建的对象。 + +```bash +kubectl get crd -o name | grep kubeblocks.io | xargs kubectl delete +``` + + + + + +从 KubeBlocks chart 生成 YAML 文件,并使用 `kubectl` 进行卸载。使用 `--version x.y.z` 指定版本,确保卸载的版本与安装的版本相同。 + +```bash +helm template kubeblocks kubeblocks/kubeblocks --version x.y.z --namespace kb-system | kubectl delete -f - +``` + + + + + ## 卸载 kbcli 如果想在试用结束后删除 kbcli,请选择与安装 kbcli 时所使用的相同选项。 @@ -90,3 +116,4 @@ kbcli 会在 HOME 目录下创建一个名为 `~/.kbcli` 的隐藏文件夹,
+ diff --git a/i18n/zh-cn/user-docs/kubeblocks-for-apecloud-mysql/cluster-management/create-and-connect-a-mysql-cluster.md b/i18n/zh-cn/user-docs/kubeblocks-for-apecloud-mysql/cluster-management/create-and-connect-an-apecloud-mysql-cluster.md similarity index 95% rename from i18n/zh-cn/user-docs/kubeblocks-for-apecloud-mysql/cluster-management/create-and-connect-a-mysql-cluster.md rename to i18n/zh-cn/user-docs/kubeblocks-for-apecloud-mysql/cluster-management/create-and-connect-an-apecloud-mysql-cluster.md index 5c52dd7840b..6878db39579 100644 --- a/i18n/zh-cn/user-docs/kubeblocks-for-apecloud-mysql/cluster-management/create-and-connect-a-mysql-cluster.md +++ b/i18n/zh-cn/user-docs/kubeblocks-for-apecloud-mysql/cluster-management/create-and-connect-an-apecloud-mysql-cluster.md @@ -17,9 +17,9 @@ import TabItem from '@theme/TabItem'; ### 开始之前 -* 如果您想通过 `kbcli` 创建并连接 ApeCloud MySQL 集群,请先[安装 kbcli](./../../installation/install-with-kbcli/install-kbcli.md)。 -* 安装 KubeBlocks,可通过 [kbcli](./../../installation/install-with-kbcli/install-kubeblocks-with-kbcli.md) 或者 [Helm](./../../installation/install-with-helm/install-kubeblocks.md) 安装。 -* 确保 ApeCloud MySQL 引擎已启用。KubeBlocks 默认已安装 ApeCloud MySQL,如果您在安装 KubeBlocks 关闭/卸载了该引擎,可参考相关文档,再次启用/安装该引擎,可通过 [kbcli](./../../installation/install-with-kbcli/install-addons.md) 或者 [Helm](./../../installation/install-with-helm/install-addons.md) 操作。 +* 如果您想通过 `kbcli` 创建并连接 ApeCloud MySQL 集群,请先[安装 kbcli](./../../installation/install-kbcli.md)。 +* [安装 KubeBlocks](./../../installation/install-kubeblocks.md)。 +* 确保 ApeCloud MySQL 引擎已启用。KubeBlocks 默认已安装 ApeCloud MySQL,如果您在安装 KubeBlocks 关闭/卸载了该引擎,可参考相关文档,再次[启用/安装该引擎](./../../installation/install-addons.md)。 diff --git a/i18n/zh-cn/user-docs/kubeblocks-for-apecloud-mysql/high-availability/high-availability.md b/i18n/zh-cn/user-docs/kubeblocks-for-apecloud-mysql/high-availability/high-availability.md index e0e97084fcc..27b766b772a 100644 --- a/i18n/zh-cn/user-docs/kubeblocks-for-apecloud-mysql/high-availability/high-availability.md +++ b/i18n/zh-cn/user-docs/kubeblocks-for-apecloud-mysql/high-availability/high-availability.md @@ -24,7 +24,7 @@ import TabItem from '@theme/TabItem'; ### 开始之前 -* 安装 KubeBlocks,可通过 [kbcli](./../../installation/install-with-kbcli/install-kubeblocks-with-kbcli.md) 或 [Helm](./../../installation/install-with-helm/install-kubeblocks.md) 安装。 +* [安装 KubeBlocks](./../../installation/install-kubeblocks.md)。 * 创建一个 ApeCloud MySQL 集群版,详情可参考[创建 MySQL 集群](./../cluster-management/create-and-connect-a-mysql-cluster.md)。 * 执行 `kubectl get cd apecloud-mysql -o yaml` 检查 ApeCloud MySQL 集群版是否已启用 _rolechangedprobe_(默认情况下是启用的)。如果出现以下配置信息,则表明已启用: diff --git a/i18n/zh-cn/user-docs/kubeblocks-for-apecloud-mysql/proxy/apecloud-mysql-proxy.md b/i18n/zh-cn/user-docs/kubeblocks-for-apecloud-mysql/proxy/apecloud-mysql-proxy.md index 4441aa7308c..906b3d8f32a 100644 --- a/i18n/zh-cn/user-docs/kubeblocks-for-apecloud-mysql/proxy/apecloud-mysql-proxy.md +++ b/i18n/zh-cn/user-docs/kubeblocks-for-apecloud-mysql/proxy/apecloud-mysql-proxy.md @@ -13,7 +13,7 @@ import TabItem from '@theme/TabItem'; ## 开始之前 -1. [安装 kbcli](./../../installation/install-with-kbcli/install-kbcli.md)。 +1. [安装 kbcli](./../../installation/install-kbcli.md)。 2. [安装 Helm](https://helm.sh/docs/intro/install/)。 3. 安装 KubeBlocks。 @@ -26,7 +26,7 @@ import TabItem from '@theme/TabItem'; kbcli playground init --version='x.y.z' ``` - 如果已经有 Kubernetes 集群,可以通过 [kbcli](./../../installation/install-with-kbcli/install-kubeblocks-with-kbcli.md) 或 [Helm](./../../installation/install-with-helm/install-kubeblocks.md) 安装 KubeBlocks。 + 如果已经有 Kubernetes 集群,可以直接[安装 KubeBlocks](./../../installation/install-kubeblocks.md)。 4. 准备一个名为 mycluster 的 ApeCloud MySQL 集群版集群,用于演示如何为现有集群启用代理功能。详情请参考[创建并连接到 MySQL 集群](./../cluster-management/create-and-connect-a-mysql-cluster.md)。 ## 创建代理集群 diff --git a/i18n/zh-cn/user-docs/kubeblocks-for-elasticsearch/manage-elasticsearch.md b/i18n/zh-cn/user-docs/kubeblocks-for-elasticsearch/manage-elasticsearch.md index 7ec3f015720..c28f0b217e4 100644 --- a/i18n/zh-cn/user-docs/kubeblocks-for-elasticsearch/manage-elasticsearch.md +++ b/i18n/zh-cn/user-docs/kubeblocks-for-elasticsearch/manage-elasticsearch.md @@ -17,9 +17,9 @@ Elasticsearch 是一个分布式、RESTful 风格的搜索和数据分析引擎 ## 开始之前 -- 如果您想通过 `kbcli` 创建并连接 Elasticsearch 集群,请先[安装 kbcli](./../installation/install-with-kbcli/install-kbcli.md)。 -- 安装 KubeBlocks,可通过 [kbcli](./../installation/install-with-kbcli/install-kubeblocks-with-kbcli.md) 或 [Helm](./../installation/install-with-helm/install-kubeblocks.md) 安装。 -- 安装并启用 elasticsearch 引擎,可通过 [kbcli](./../installation/install-with-kbcli/install-addons.md) 或 [Helm](./../installation/install-with-helm/install-addons.md) 操作。 +- 如果您想通过 `kbcli` 创建并连接 Elasticsearch 集群,请先[安装 kbcli](./../installation/install-kbcli.md)。 +- [安装 KubeBlocks](./../installation/install-kubeblocks.md)。 +- [安装并启用 elasticsearch 引擎](./../installation/install-addons.md)。 ## 创建集群 @@ -85,7 +85,7 @@ EOF | 字段 | 定义 | |---------------------------------------|--------------------------------------| -| `spec.terminationPolicy` | 集群的终止策略,默认值为 `Delete`,有效值为 `DoNotTerminate`、`Halt`、`Delete` 和 `WipeOut`。

- `DoNotTerminate` 会阻止删除操作。

- `Halt` 会删除工作负载资源,如 statefulset 和 deployment 等,但是保留了 PVC 。

- `Delete` 在 `Halt` 的基础上进一步删除了 PVC。

- `WipeOut` 在 `Delete` 的基础上从备份存储的位置完全删除所有卷快照和快照数据。

| +| `spec.terminationPolicy` | 集群的终止策略,默认值为 `Delete`,有效值为 `DoNotTerminate`、`Halt`、`Delete` 和 `WipeOut`。 具体定义可参考 [终止策略](#终止策略)。| | `spec.affinity` | 为集群的 Pods 定义了一组节点亲和性调度规则。该字段可控制 Pods 在集群中节点上的分布。 | | `spec.affinity.podAntiAffinity` | 定义了不在同一 component 中的 Pods 的反亲和性水平。该字段决定了 Pods 以何种方式跨节点分布,以提升可用性和性能。 | | `spec.affinity.topologyKeys` | 用于定义 Pod 反亲和性和 Pod 分布约束的拓扑域的节点标签值。 | @@ -944,3 +944,80 @@ KubeBlocks 支持重启集群中的所有 Pod。当数据库出现异常时,
+ +## 删除集群 + +### 终止策略 + +:::note + +终止策略决定了删除集群的方式。 + +::: + +| **终止策略** | **删除操作** | +|:----------------------|:-------------------------------------------------------------------------------------------| +| `DoNotTerminate` | `DoNotTerminate` 禁止删除操作。 | +| `Halt` | `Halt` 删除集群资源(如 Pods、Services 等),但保留 PVC。停止其他运维操作的同时,保留了数据。但 `Halt` 策略在 v0.9.1 中已删除,设置为 `Halt` 的效果与 `DoNotTerminate` 相同。 | +| `Delete` | `Delete` 在 `Halt` 的基础上,删除 PVC 及所有持久数据。 | +| `WipeOut` | `WipeOut` 删除所有集群资源,包括外部存储中的卷快照和备份。使用该策略将会删除全部数据,特别是在非生产环境,该策略将会带来不可逆的数据丢失。请谨慎使用。 | + +执行以下命令查看终止策略。 + + + + + +```bash +kubectl get cluster mycluster -n demo +> +NAME CLUSTER-DEFINITION VERSION TERMINATION-POLICY STATUS AGE +mycluster Delete Running 4m29s +``` + + + + + +```bash +kbcli cluster list mycluster -n demo +> +NAME NAMESPACE CLUSTER-DEFINITION VERSION TERMINATION-POLICY STATUS CREATED-TIME +mycluster demo Delete Running Sep 27,2024 11:42 UTC+0800 +``` + + + + + +### 步骤 + +执行以下命令,删除集群。 + + + + + +```bash +kubectl delete cluster mycluster -n demo +``` + +如果想删除集群和所有相关资源,可以将终止策略修改为 `WipeOut`,然后再删除该集群。 + +```bash +kubectl patch -n demo cluster mycluster -p '{"spec":{"terminationPolicy":"WipeOut"}}' --type="merge" + +kubectl delete -n demo cluster mycluster +``` + + + + + +```bash +kbcli cluster delete mycluster -n demo +``` + + + + diff --git a/i18n/zh-cn/user-docs/kubeblocks-for-kafka/cluster-management/create-a-kafka-cluster.md b/i18n/zh-cn/user-docs/kubeblocks-for-kafka/cluster-management/create-a-kafka-cluster.md index 71813cc23c5..14176e94901 100644 --- a/i18n/zh-cn/user-docs/kubeblocks-for-kafka/cluster-management/create-a-kafka-cluster.md +++ b/i18n/zh-cn/user-docs/kubeblocks-for-kafka/cluster-management/create-a-kafka-cluster.md @@ -15,9 +15,9 @@ import TabItem from '@theme/TabItem'; ## 开始之前 -* 如果您想通过 `kbcli` 创建和管理集群,请先[安装 kbcli](./../../installation/install-with-kbcli/install-kbcli.md)。 -* 安装 KubeBlocks,可通过 [kbcli](./../../installation/install-with-kbcli/install-kubeblocks-with-kbcli.md) 或 [Helm](./../../installation/install-with-helm/install-kubeblocks.md) 安装。 -* 确保 Kafka 引擎 已启用。如果引擎未启用,可参考相关文档,启用该引擎,可通过 [kbcli](./../../installation/install-with-kbcli/install-addons.md) 或 [Helm](./../../installation/install-with-kbcli/install-addons.md) 操作。 +* 如果您想通过 `kbcli` 创建和管理集群,请先[安装 kbcli](./../../installation/install-kbcli.md)。 +* [安装 KubeBlocks](./../../installation/install-kubeblocks.md)。 +* 确保 Kafka 引擎 已启用。如果引擎未启用,可参考相关文档,[启用该引擎](./../../installation/install-addons.md)。 diff --git a/i18n/zh-cn/user-docs/kubeblocks-for-milvus/manage-milvus.md b/i18n/zh-cn/user-docs/kubeblocks-for-milvus/manage-milvus.md index 508f03145e8..faa21bdacc2 100644 --- a/i18n/zh-cn/user-docs/kubeblocks-for-milvus/manage-milvus.md +++ b/i18n/zh-cn/user-docs/kubeblocks-for-milvus/manage-milvus.md @@ -19,9 +19,9 @@ Milvus 是高度灵活、可靠且速度极快的云原生开源矢量数据库 ## 开始之前 -- 如果您想通过 `kbcli` 创建并连接 Milvus 集群,请先[安装 kbcli](./../installation/install-with-kbcli/install-kbcli.md)。 -- 安装 KubeBlocks,可通过 [kbcli](./../installation/install-with-kbcli/install-kubeblocks-with-kbcli.md) 或 [Helm](./../installation/install-with-helm/install-kubeblocks.md) 安装。 -- 安装并启用 milvus 引擎,可通过 [kbcli](./../installation/install-with-kbcli/install-addons.md) 或 [Helm](./../installation/install-with-helm/install-addons.md) 操作。 +- 如果您想通过 `kbcli` 创建并连接 Milvus 集群,请先[安装 kbcli](./../installation/install-kbcli.md)。 +- [安装 KubeBlocks](./../installation/install-kubeblocks.md)。 +- [安装并启用 milvus 引擎](./../installation/install-addons.md)。 - 为了保持隔离,本文档中创建一个名为 `demo` 的独立命名空间。 ```bash diff --git a/i18n/zh-cn/user-docs/kubeblocks-for-mongodb/cluster-management/create-and-connect-to-a-mongodb-cluster.md b/i18n/zh-cn/user-docs/kubeblocks-for-mongodb/cluster-management/create-and-connect-to-a-mongodb-cluster.md index e7b3265c0ca..6a12e758d21 100644 --- a/i18n/zh-cn/user-docs/kubeblocks-for-mongodb/cluster-management/create-and-connect-to-a-mongodb-cluster.md +++ b/i18n/zh-cn/user-docs/kubeblocks-for-mongodb/cluster-management/create-and-connect-to-a-mongodb-cluster.md @@ -17,9 +17,9 @@ import TabItem from '@theme/TabItem'; ### 开始之前 -* 如果您想通过 `kbcli` 创建并连接 MongoDB 集群,请先[安装 kbcli](./../../installation/install-with-kbcli/install-kbcli.md)。 -* 安装 KubeBlocks,可通过 [kbcli](./../../installation/install-with-kbcli/install-kubeblocks-with-kbcli.md) 或 [Helm](./../../installation/install-with-helm/install-kubeblocks.md)。 -* 确保 MongoDB 引擎已启用。如果引擎未安装/启用,可参考相关文档,安装/启用该引擎,可通过 [kbcli](./../../installation/install-with-kbcli/install-addons.md) 或者 [Helm](./../../installation/install-with-helm/install-addons.md) 操作。 +* 如果您想通过 `kbcli` 创建并连接 MongoDB 集群,请先[安装 kbcli](./../../installation/install-kbcli.md)。 +* [安装 KubeBlocks](./../../installation/install-kubeblocks.md)。 +* 确保 MongoDB 引擎已启用。如果引擎未安装/启用,可参考相关文档,[安装/启用该引擎](./../../installation/install-addons.md)。 diff --git a/i18n/zh-cn/user-docs/kubeblocks-for-mysql-community-edition/cluster-management/create-and-connect-a-mysql-cluster.md b/i18n/zh-cn/user-docs/kubeblocks-for-mysql-community-edition/cluster-management/create-and-connect-a-mysql-cluster.md index 63c0e277554..b3939e4c0da 100644 --- a/i18n/zh-cn/user-docs/kubeblocks-for-mysql-community-edition/cluster-management/create-and-connect-a-mysql-cluster.md +++ b/i18n/zh-cn/user-docs/kubeblocks-for-mysql-community-edition/cluster-management/create-and-connect-a-mysql-cluster.md @@ -17,9 +17,9 @@ import TabItem from '@theme/TabItem'; ### 开始之前 -* 如果您想通过 `kbcli` 创建并连接 ApeCloud MySQL 集群,请先[安装 kbcli](./../../installation/install-with-kbcli/install-kbcli.md)。 -* 安装 KubeBlocks,可通过 [kbcli](./../../installation/install-with-kbcli/install-kubeblocks-with-kbcli.md) 或 [Helm](./../../installation/install-with-helm/install-kubeblocks.md) 安装。 -* 确保 MySQL 引擎已启用。KubeBlocks 默认已安装 MySQL,如果您在安装 KubeBlocks 关闭/卸载了该引擎,可参考相关文档,再次启用/安装该引擎,可通过 [kbcli](./../../installation/install-with-kbcli/install-addons.md) 或者 [Helm](./../../installation/install-with-helm/install-addons.md) 操作。 +* 如果您想通过 `kbcli` 创建并连接 ApeCloud MySQL 集群,请先[安装 kbcli](./../../installation/install-kbcli.md)。 +* [安装 KubeBlocks](./../../installation/install-kubeblocks.md)。 +* 确保 MySQL 引擎已启用。KubeBlocks 默认已安装 MySQL,如果您在安装 KubeBlocks 关闭/卸载了该引擎,可参考相关文档,再次[启用/安装该引擎](./../../installation/install-addons.md)。 diff --git a/i18n/zh-cn/user-docs/kubeblocks-for-mysql-community-edition/high-availability/high-availability.md b/i18n/zh-cn/user-docs/kubeblocks-for-mysql-community-edition/high-availability/high-availability.md index 42d78667c8e..2a2d7a22481 100644 --- a/i18n/zh-cn/user-docs/kubeblocks-for-mysql-community-edition/high-availability/high-availability.md +++ b/i18n/zh-cn/user-docs/kubeblocks-for-mysql-community-edition/high-availability/high-availability.md @@ -24,7 +24,7 @@ import TabItem from '@theme/TabItem'; ### 开始之前 -* 安装 KubeBlocks,可通过 [kbcli](./../../installation/install-with-kbcli/install-kubeblocks-with-kbcli.md) 或 [Helm](./../../installation/install-with-helm/install-kubeblocks.md) 安装。 +* [安装 KubeBlocks](./../../installation/install-kubeblocks.md)。 * 创建 MySQL 主备版集群,详情可参考 [创建 MySQL 集群](./../cluster-management/create-and-connect-a-mysql-cluster.md)。 * 执行 `kubectl get cd mysql -o yaml` 检查 MySQL 集群版是否已启用 _rolechangedprobe_(默认情况下是启用的)。如果出现以下配置信息,则表明已启用: diff --git a/i18n/zh-cn/user-docs/kubeblocks-for-postgresql/cluster-management/create-and-connect-a-postgresql-cluster.md b/i18n/zh-cn/user-docs/kubeblocks-for-postgresql/cluster-management/create-and-connect-a-postgresql-cluster.md index 588cd8c6442..6b30bebb92a 100644 --- a/i18n/zh-cn/user-docs/kubeblocks-for-postgresql/cluster-management/create-and-connect-a-postgresql-cluster.md +++ b/i18n/zh-cn/user-docs/kubeblocks-for-postgresql/cluster-management/create-and-connect-a-postgresql-cluster.md @@ -17,9 +17,9 @@ import TabItem from '@theme/TabItem'; ### 开始之前 -* 如果您想通过 `kbcli` 创建并连接 PostgreSQL 集群,请先[安装 kbcli](./../../installation/install-with-kbcli/install-kbcli.md)。 -* 安装 KubeBlocks,可通过 [kbcli](./../../installation/install-with-kbcli/install-kubeblocks-with-kbcli.md) 或 [Helm](./../../installation/install-with-helm/install-kubeblocks.md) 安装。 -* 确保 PostgreSQL 引擎已启用。KubeBlocks 默认已安装 PostreSQL,如果您在安装 KubeBlocks 时关闭/卸载了该引擎,可参考相关文档,再次启用/安装该引擎,可通过 [kbcli](./../../installation/install-with-kbcli/install-addons.md) 或者 [Helm](./../../installation/install-with-helm/install-addons.md) 操作。 +* 如果您想通过 `kbcli` 创建并连接 PostgreSQL 集群,请先[安装 kbcli](./../../installation/install-kbcli.md)。 +* [安装 KubeBlocks](./../../installation/install-kubeblocks.md)。 +* 确保 PostgreSQL 引擎已启用。KubeBlocks 默认已安装 PostreSQL,如果您在安装 KubeBlocks 时关闭/卸载了该引擎,可参考相关文档,再次[启用/安装该引擎](./../../installation/install-addons.md)。 diff --git a/i18n/zh-cn/user-docs/kubeblocks-for-postgresql/high-availability/high-availability.md b/i18n/zh-cn/user-docs/kubeblocks-for-postgresql/high-availability/high-availability.md index 8d3f720f4f4..2e4f54b71a2 100644 --- a/i18n/zh-cn/user-docs/kubeblocks-for-postgresql/high-availability/high-availability.md +++ b/i18n/zh-cn/user-docs/kubeblocks-for-postgresql/high-availability/high-availability.md @@ -14,7 +14,7 @@ KubeBlocks 集成[开源的 Patroni 方案](https://patroni.readthedocs.io/en/la ## 开始之前 -* 安装 KubeBlocks,可通过 [kbcli](./../../installation/install-with-kbcli/install-kubeblocks-with-kbcli.md) 或 [Helm](./../../installation/install-with-helm/install-kubeblocks.md) 安装。 +* [安装 KubeBlocks](./../../installation/install-kubeblocks.md)。 * [创建 PostgreSQL 主备版](./../cluster-management/create-and-connect-a-postgresql-cluster.md)。 * 检查切换策略和角色探测参数。 * 检查切换策略是否为 `Noop`。 diff --git a/i18n/zh-cn/user-docs/kubeblocks-for-pulsar/cluster-management/create-pulsar-cluster-on-kb.md b/i18n/zh-cn/user-docs/kubeblocks-for-pulsar/cluster-management/create-pulsar-cluster-on-kb.md index c32650b8a6d..b7122fed3b9 100644 --- a/i18n/zh-cn/user-docs/kubeblocks-for-pulsar/cluster-management/create-pulsar-cluster-on-kb.md +++ b/i18n/zh-cn/user-docs/kubeblocks-for-pulsar/cluster-management/create-pulsar-cluster-on-kb.md @@ -29,9 +29,9 @@ KubeBlocks 可以通过良好的抽象快速集成新引擎,并支持 Pulsar ### 开始之前 -* 如果您想通过 `kbcli` 创建和管理集群,请先[安装 kbcli](./../../installation/install-with-kbcli/install-kbcli.md)。 -* 安装 KubeBlocks,可通过 [kbcli](./../../installation/install-with-kbcli/install-kubeblocks-with-kbcli.md) 或 [Helm](./../../installation/install-with-helm/install-kubeblocks.md) 安装。 -* 确保 Pulsar 引擎已启用。如果引擎未启用,可参考相关文档,启用该引擎,可通过 [kbcli](./../../installation/install-with-kbcli/install-addons.md) 或 [Helm](./../../installation/install-with-helm/install-addons.md) 操作。 +* 如果您想通过 `kbcli` 创建和管理集群,请先[安装 kbcli](./../../installation/install-kbcli.md)。 +* [安装 KubeBlocks](./../../installation/install-kubeblocks.md)。 +* 确保 Pulsar 引擎已启用。如果引擎未启用,可参考相关文档,[启用该引擎](./../../installation/install-addons.md)。 * 查看可用于创建集群的数据库类型和版本。 diff --git a/i18n/zh-cn/user-docs/kubeblocks-for-qdrant/manage-qdrant.md b/i18n/zh-cn/user-docs/kubeblocks-for-qdrant/manage-qdrant.md index d0c7897653d..24d27cd2d5a 100644 --- a/i18n/zh-cn/user-docs/kubeblocks-for-qdrant/manage-qdrant.md +++ b/i18n/zh-cn/user-docs/kubeblocks-for-qdrant/manage-qdrant.md @@ -19,9 +19,9 @@ Qdrant(读作:quadrant)是向量相似性搜索引擎和向量数据库。 ## 开始之前 -- 如果您想通过 `kbcli` 创建和管理集群,请先[安装 kbcli](./../installation/install-with-kbcli/install-kbcli.md)。 -- 安装 KubeBlocks,可通过 [kbcli](./../installation/install-with-kbcli/install-kubeblocks-with-kbcli.md) 或 [Helm](./../installation/install-with-helm/install-kubeblocks.md) 安装。 -- 安装并启用 qdrant 引擎,可通过 [kbcli](./../installation/install-with-kbcli/install-addons.md) 或 [Helm](./../installation/install-with-helm/install-addons.md) 操作。 +- 如果您想通过 `kbcli` 创建和管理集群,请先[安装 kbcli](./../installation/install-kbcli.md)。 +- [安装 KubeBlocks](./../installation/install-kubeblocks.md)。 +- [安装并启用 qdrant 引擎](./../installation/install-addons.md)。 - 为了保持隔离,本文档中创建一个名为 `demo` 的独立命名空间。 ```bash diff --git a/i18n/zh-cn/user-docs/kubeblocks-for-rabbitmq/_category_.yml b/i18n/zh-cn/user-docs/kubeblocks-for-rabbitmq/_category_.yml new file mode 100644 index 00000000000..4cb5c8130e4 --- /dev/null +++ b/i18n/zh-cn/user-docs/kubeblocks-for-rabbitmq/_category_.yml @@ -0,0 +1,4 @@ +position: 21 +label: KubeBlocks for RabbitMQ +collapsible: true +collapsed: true \ No newline at end of file diff --git a/i18n/zh-cn/user-docs/kubeblocks-for-rabbitmq/manage-rabbitmq.md b/i18n/zh-cn/user-docs/kubeblocks-for-rabbitmq/manage-rabbitmq.md new file mode 100644 index 00000000000..ebd32c20c44 --- /dev/null +++ b/i18n/zh-cn/user-docs/kubeblocks-for-rabbitmq/manage-rabbitmq.md @@ -0,0 +1,629 @@ +--- +title: 用 KubeBlocks 管理 RabbitMQ +description: 如何使用 KubeBlocks 管理 RabbitMQ +keywords: [rabbitmq, 消息队列, streaming, broker] +sidebar_position: 1 +sidebar_label: 用 KubeBlocks 管理 RabbitMQ +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +# 用 KubeBlocks 管理 RabbitMQ + +RabbitMQ 是可靠且成熟的消息和流处理中间件,支持在云环境、本地数据中心或个人计算机上部署。 + +本文档展示了如何通过 kbcli、kubectl 等方式创建和管理 RabbitMQ 集群。您可以在 [GitHub 仓库](https://github.com/apecloud/kubeblocks-addons/tree/main/examples/rabbitmq)查看 YAML 示例。 + +:::note + +当前,KubeBlocks 仅支持通过 `kubectl` 管理 RabbitMQ 集群. + +::: + +## 开始之前 + +- 安装 KubeBlocks,可通过 [kbcli](./../installation/install-with-kbcli/install-kubeblocks-with-kbcli.md) 或 [Helm](./../installation/install-with-helm/install-kubeblocks.md) 安装. +- 安装并启用 rabbitmq 引擎,可通过 [kbcli](./../installation/install-with-kbcli/install-addons.md) 或 [Helm](./../installation/install-with-helm/install-addons.md)操作. + +## 创建集群 + +KubeBlocks 通过 `Cluster` 定义集群。以下是创建 RabbitMQ 集群的示例。Pod 默认分布在不同节点。但如果您只有一个节点可用于部署集群,可将 `spec.affinity.topologyKeys` 设置为 `null`。 + +:::note + +生产环境中,不建议将所有副本部署在同一个节点上,因为这可能会降低集群的可用性。 + +::: + +```bash +cat < +NAME CLUSTER-DEFINITION VERSION TERMINATION-POLICY STATUS AGE +mycluster Delete Running 47m +``` + +#### 步骤 + + + + + +1. 对指定的集群应用 OpsRequest,可根据您的需求配置参数。 + + ```bash + kubectl apply -f - < + NAME TYPE CLUSTER STATUS PROGRESS AGE + ops-vertical-scaling VerticalScaling mycluster Succeed 3/3 6m + ``` + + 如果有报错,可执行 `kubectl describe ops -n demo` 命令查看该运维操作的相关事件,协助排障。 + +3. 当 OpsRequest 状态为 `Succeed` 或集群状态再次回到 `Running` 后,查看相应资源是否变更。 + + ```bash + kubectl describe cluster mycluster -n demo + ``` + + + + + +1. 修改 YAML 文件中 `spec.componentSpecs.resources` 的配置。`spec.componentSpecs.resources` 控制资源的请求值和限制值,修改参数值将触发垂直扩缩容。 + + ```bash + kubectl edit cluster mycluster -n demo + ``` + + 在编辑器中修改 `spec.componentSpecs.resources` 的值。 + + ```yaml + ... + spec: + componentSpecs: + - name: rabbitmq + componentDefRef: rabbitmq + replicas: 3 + resources: # 修改 resources 中的参数值 + requests: + memory: "2Gi" + cpu: "1" + limits: + memory: "4Gi" + cpu: "2" + ... + ``` + +2. 当集群状态再次回到 `Running` 后,查看相应资源是否变更。 + + ```bash + kubectl describe cluster mycluster -n demo + ``` + + + + + +### 水平伸缩 + +水平扩展改变 Pod 的数量。例如,您可以将副本从三个扩展到五个。 + +从 v0.9.0 开始,KubeBlocks 还支持了指定实例扩缩容。可通过 [水平扩缩容文档](./../maintenance/scale/horizontal-scale.md) 文档了解更多细节和示例。 + +#### 开始之前 + +确认集群状态是否为 `Running`。否则,后续相关操作可能会失败。 + +```bash +kubectl get cluster mycluster -n demo +> +NAME CLUSTER-DEFINITION VERSION TERMINATION-POLICY STATUS AGE +mycluster Delete Running 47m +``` + +#### 步骤 + + + + + +1. 对指定的集群应用 OpsRequest,可根据您的需求配置参数。 + + 以下示例演示了增加 2 个副本。 + + ```bash + kubectl apply -f - < + NAME TYPE CLUSTER STATUS PROGRESS AGE + ops-horizontal-scaling HorizontalScaling mycluster Succeed 2/2 6m + ``` + + 如果有报错,可执行 `kubectl describe ops -n demo` 命令查看该运维操作的相关事件,协助排障。 + +3. 当 OpsRequest 状态为 `Succeed` 或集群状态再次回到 `Running` 后,查看相应资源是否变更。 + + ```bash + kubectl describe cluster mycluster -n demo + ``` + + + + + +1. 修改 YAML 文件中 `spec.componentSpecs.replicas` 的配置。`spec.componentSpecs.replicas` 定义了 pod 数量,修改该参数将触发集群水平扩缩容。 + + ```bash + kubectl edit cluster mycluster -n demo + ``` + + 在编辑器中修改 `spec.componentSpecs.replicas` 的值。 + + ```yaml + ... + spec: + componentSpecs: + - name: rabbitmq + componentDefRef: rabbitmq + replicas: 1 # 修改参数值 + ... + ``` + +2. 当集群状态再次回到 `Running` 后,查看相关资源是否变更。 + + ```bash + kubectl describe cluster mycluster -n demo + ``` + + + + + +## 磁盘扩容 + +### 开始之前 + +确认集群状态是否为 `Running`。否则,后续相关操作可能会失败。 + +```bash +kubectl get cluster mycluster -n demo +> +NAME CLUSTER-DEFINITION VERSION TERMINATION-POLICY STATUS AGE +mycluster Delete Running 47m +``` + +### 步骤 + + + + + +1. 应用 OpsRequest。根据需求更改 storage 的值,并执行以下命令来更改集群的存储容量。 + + ```bash + kubectl apply -f - < + NAME TYPE CLUSTER STATUS PROGRESS AGE + ops-volume-expansion VolumeExpansion mycluster Succeed 1/1 6m + ``` + + 如果有报错,可执行 `kubectl describe ops -n demo` 命令查看该运维操作的相关事件,协助排障。 + +3. 当 OpsRequest 状态为 `Succeed` 或集群状态再次回到 `Running` 后,查看相应资源是否变更。 + + ```bash + kubectl describe cluster mycluster -n demo + ``` + + + + + +1. 修改集群 YAML 文件中 `spec.componentSpecs.volumeClaimTemplates.spec.resources` 的值。 + + `spec.componentSpecs.volumeClaimTemplates.spec.resources` 定义了 Pod 存储资源信息,修改该数值将触发集群磁盘扩容。 + + ```bash + kubectl edit cluster mycluster -n demo + ``` + + 在编辑器中修改 `spec.componentSpecs.volumeClaimTemplates.spec.resources` 的值。 + + ```yaml + ... + spec: + componentSpecs: + - name: rabbitmq + componentDefRef: rabbitmq + replicas: 2 + volumeClaimTemplates: + - name: data + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 40Gi # 修改该参数值 + terminationPolicy: Delete + ... + ``` + +2. 当集群状态再次回到 `Running` 后,查看相应资源是否变更。 + + ```bash + kubectl describe cluster mycluster -n demo + ``` + + + + + +## 停止/启动集群 + +您可以停止/启动集群以释放计算资源。当集群停止时,其计算资源将被释放,也就是说 Kubernetes 的 Pod 将被释放,但其存储资源仍将被保留。您也可以重新启动该集群,使其恢复到停止集群前的状态。 + +### 停止集群 + +1. 配置集群名称,并执行以下命令来停止该集群。 + + + + + + ```bash + kubectl apply -f - < + + + + 将 replicas 的值修改为 0,删除 pod。 + + ```yaml + apiVersion: apps.kubeblocks.io/v1alpha1 + kind: Cluster + metadata: + name: mycluster + namespace: demo + spec: + terminationPolicy: Delete + affinity: + podAntiAffinity: Preferred + topologyKeys: + - kubernetes.io/hostname + componentSpecs: + - name: rabbitmq + componentDef: rabbitmq + serviceVersion: 3.13.2 + replicas: 0 + serviceAccountName: kb-mycluster + resources: + limits: + cpu: "0.5" + memory: "0.5Gi" + requests: + cpu: "0.5" + memory: "0.5Gi" + volumeClaimTemplates: + - name: data + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20Gi + services: + ``` + + + + + +2. 查看集群状态,确认集群是否已停止。 + + ```bash + kubectl get cluster mycluster -n demo + ``` + +### 启动集群 + +1. 配置集群名称,并执行以下命令来启动该集群。 + + + + + + ```bash + kubectl apply -f - < + + + + 将 replicas 数值修改为初始值,启动集群。 + + ```yaml + apiVersion: apps.kubeblocks.io/v1alpha1 + kind: Cluster + metadata: + name: mycluster + namespace: demo + spec: + terminationPolicy: Delete + affinity: + podAntiAffinity: Preferred + topologyKeys: + - kubernetes.io/hostname + componentSpecs: + - name: rabbitmq + componentDef: rabbitmq + serviceVersion: 3.13.2 + replicas: 3 + serviceAccountName: kb-mycluster + resources: + limits: + cpu: "0.5" + memory: "0.5Gi" + requests: + cpu: "0.5" + memory: "0.5Gi" + volumeClaimTemplates: + - name: data + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20Gi + services: + ``` + + + + + +2. 查看集群状态,确认集群是否已再次运行。 + + ```bash + kubectl get cluster mycluster -n demo + ``` + +## 重启集群 + +1. 执行以下命令,重启集群。 + + ```bash + kubectl apply -f - < +NAME CLUSTER-DEFINITION VERSION TERMINATION-POLICY STATUS AGE +mycluster Delete Running 47m +``` + +### 步骤 + +执行以下命令,删除集群。 + +```bash +kubectl delete cluster mycluster -n demo +``` + +如果想删除集群和所有相关资源,可以将终止策略修改为 `WipeOut`,然后再删除该集群。 + +```bash +kubectl patch -n demo cluster mycluster -p '{"spec":{"terminationPolicy":"WipeOut"}}' --type="merge" + +kubectl delete -n demo cluster mycluster +``` diff --git a/i18n/zh-cn/user-docs/kubeblocks-for-redis/cluster-management/create-and-connect-to-a-redis-cluster.md b/i18n/zh-cn/user-docs/kubeblocks-for-redis/cluster-management/create-and-connect-to-a-redis-cluster.md index 0f2f4636aeb..6fc662dca70 100644 --- a/i18n/zh-cn/user-docs/kubeblocks-for-redis/cluster-management/create-and-connect-to-a-redis-cluster.md +++ b/i18n/zh-cn/user-docs/kubeblocks-for-redis/cluster-management/create-and-connect-to-a-redis-cluster.md @@ -17,9 +17,9 @@ import TabItem from '@theme/TabItem'; ### 开始之前 -* 如果您想通过 `kbcli` 创建并连接 MongoDB 集群,请先[安装 kbcli](./../../installation/install-with-kbcli/install-kbcli.md)。 -* 安装 KubeBlocks,可通过 [kbcli](./../../installation/install-with-kbcli/install-kubeblocks-with-kbcli.md) 或 [Helm](./../../installation/install-with-helm/install-kubeblocks.md)。 -* 确保 Redis 引擎已启用。如果未启用,可通过 [kbcli](./../../installation/install-with-kbcli/install-addons.md) 或者 [Helm](./../../installation/install-with-helm/install-addons.md) 操作。 +* 如果您想通过 `kbcli` 创建并连接 MongoDB 集群,请先[安装 kbcli](./../../installation/install-kbcli.md)。 +* [安装 KubeBlocks](./../../installation/install-kubeblocks.md)。 +* 确保 Redis 引擎已启用。如果未启用,请先[启用该引擎](./../../installation/install-addons.md)。 diff --git a/i18n/zh-cn/user-docs/kubeblocks-for-redis/high-availability/high-availability.md b/i18n/zh-cn/user-docs/kubeblocks-for-redis/high-availability/high-availability.md index 13141146f62..75557c155f9 100644 --- a/i18n/zh-cn/user-docs/kubeblocks-for-redis/high-availability/high-availability.md +++ b/i18n/zh-cn/user-docs/kubeblocks-for-redis/high-availability/high-availability.md @@ -18,7 +18,7 @@ Redis Sentinel 是 Redis 官方推荐的主备集群高可用性解决方案, ## 开始之前 -* 安装 KubeBlocks,可通过 [kbcli](./../../installation/install-with-kbcli/install-kubeblocks-with-kbcli.md) 或 [Helm](./../../installation/install-with-helm/install-kubeblocks.md) 安装。 +* [安装 KubeBlocks](./../../installation/install-kubeblocks.md)。 * [创建 Redis 主备版集群](./../../kubeblocks-for-redis/cluster-management/create-and-connect-to-a-redis-cluster.md#创建集群)。 * 检查切换策略和角色探测参数。 * 检查切换策略是否为 `Noop`。 diff --git a/i18n/zh-cn/user-docs/kubeblocks-for-redis/redis-cluster-mode.md b/i18n/zh-cn/user-docs/kubeblocks-for-redis/redis-cluster-mode.md index 8b19d277cd7..a9fdd61062a 100644 --- a/i18n/zh-cn/user-docs/kubeblocks-for-redis/redis-cluster-mode.md +++ b/i18n/zh-cn/user-docs/kubeblocks-for-redis/redis-cluster-mode.md @@ -31,7 +31,7 @@ Redis Cluster 还提供集群的节点间通信和数据迁移机制。当集群 ### 开始之前 -* [安装 KubeBlocks](./../installation/install-kubeblocks.md)。 +* 安装 KubeBlocks,可通过 [kbcli](./../installation/install-with-kbcli/install-kubeblocks-with-kbcli.md) 或 [Helm](./../installation/install-with-helm/install-kubeblocks.md) 安装。 - KubeBlocks 及 Addon 的版本都需要 0.9 版本以上。 * 确保 Redis 引擎已启用。 * 查看可用于创建集群的数据库类型和版本。 diff --git a/i18n/zh-cn/user-docs/kubeblocks-for-starrocks/manage-starrocks.md b/i18n/zh-cn/user-docs/kubeblocks-for-starrocks/manage-starrocks.md index 94f1cedd441..1a5b0c4271f 100644 --- a/i18n/zh-cn/user-docs/kubeblocks-for-starrocks/manage-starrocks.md +++ b/i18n/zh-cn/user-docs/kubeblocks-for-starrocks/manage-starrocks.md @@ -17,9 +17,9 @@ StarRocks 是一款高性能分析型数据仓库,使用向量化、MPP 架构 ## 开始之前 -- 如果您想通过 `kbcli` 创建并连接 StarRocks 集群,请先[安装 kbcli](./../installation/install-with-kbcli/install-kbcli.md)。 -- 安装 KubeBlocks,可通过 [kbcli](./../installation/install-with-kbcli/install-kubeblocks-with-kbcli.md) 或 [Helm](./../installation/install-with-helm/install-kubeblocks.md) 安装。 -- 安装并启用 starrocks 引擎,可通过 [kbcli](./../installation/install-with-kbcli/install-addons.md) 或 [Helm](./../installation/install-with-helm/install-addons.md) 操作。 +- 如果您想通过 `kbcli` 创建并连接 StarRocks 集群,请先[安装 kbcli](./../installation/install-kbcli.md)。 +- [安装 KubeBlocks](./../installation/install-kubeblocks.md)。 +- [安装并启用 starrocks 引擎](./../installation/install-addons.md)。 ## 创建集群 @@ -94,7 +94,7 @@ EOF |---------------------------------------|--------------------------------------| | `spec.clusterDefinitionRef` | 集群定义 CRD 的名称,用来定义集群组件。 | | `spec.clusterVersionRef` | 集群版本 CRD 的名称,用来定义集群版本。 | -| `spec.terminationPolicy` | 集群的终止策略,默认值为 `Delete`,有效值为 `DoNotTerminate`、`Halt`、`Delete` 和 `WipeOut`。

- `DoNotTerminate` 会阻止删除操作。

- `Halt` 会删除工作负载资源,如 statefulset 和 deployment 等,但是保留了 PVC 。

- `Delete` 在 `Halt` 的基础上进一步删除了 PVC。

- `WipeOut` 在 `Delete` 的基础上从备份存储的位置完全删除所有卷快照和快照数据。

| +| `spec.terminationPolicy` | 集群的终止策略,默认值为 `Delete`,有效值为 `DoNotTerminate`、`Halt`、`Delete` 和 `WipeOut`。具体定义可参考 [终止策略](#终止策略)。 | | `spec.affinity` | 为集群的 Pods 定义了一组节点亲和性调度规则。该字段可控制 Pods 在集群中节点上的分布。 | | `spec.affinity.podAntiAffinity` | 定义了不在同一 component 中的 Pods 的反亲和性水平。该字段决定了 Pods 以何种方式跨节点分布,以提升可用性和性能。 | | `spec.affinity.topologyKeys` | 用于定义 Pod 反亲和性和 Pod 分布约束的拓扑域的节点标签值。 | @@ -578,7 +578,7 @@ mycluster demo starrocks starrocks-3.1.1 Delete 如果有报错,可执行 `kubectl describe ops -n demo` 命令查看该运维操作的相关事件,协助排障。 -3. 查看相应资源是否变更。 +3. 当 OpsRequest 状态为 `Succeed` 或集群状态再次回到 `Running` 后,查看相应资源是否变更。 ```bash kubectl describe cluster mycluster -n demo @@ -616,7 +616,7 @@ mycluster demo starrocks starrocks-3.1.1 Delete terminationPolicy: Delete ``` -2. 查看相应资源是否变更。 +2. 当集群状态再次回到 `Running` 后,查看相应资源是否变更。 ```bash kubectl describe cluster mycluster -n demo @@ -738,26 +738,26 @@ mycluster demo starrocks starrocks-3.1.1 Delete kbcli cluster stop mycluster -n demo ``` -
- +
+ 2. 查看集群状态,确认集群是否已停止。 - + ```bash - kbcli cluster list mycluster -n demo + kubectl get cluster mycluster -n demo ``` - + ```bash - kubectl get cluster mycluster -n demo + kbcli cluster list mycluster -n demo ``` @@ -831,18 +831,18 @@ mycluster demo starrocks starrocks-3.1.1 Delete - + ```bash - kbcli cluster list mycluster -n demo + kubectl get cluster mycluster -n demo ``` - + ```bash - kubectl get cluster mycluster -n demo + kbcli cluster list mycluster -n demo ``` @@ -928,3 +928,80 @@ KubeBlocks 支持重启集群中的所有 Pod。当数据库出现异常时, + +## 删除集群 + +### 终止策略 + +:::note + +终止策略决定了删除集群的方式。 + +::: + +| **终止策略** | **删除操作** | +|:----------------------|:-------------------------------------------------------------------------------------------| +| `DoNotTerminate` | `DoNotTerminate` 禁止删除操作。 | +| `Halt` | `Halt` 删除集群资源(如 Pods、Services 等),但保留 PVC。停止其他运维操作的同时,保留了数据。但 `Halt` 策略在 v0.9.1 中已删除,设置为 `Halt` 的效果与 `DoNotTerminate` 相同。 | +| `Delete` | `Delete` 在 `Halt` 的基础上,删除 PVC 及所有持久数据。 | +| `WipeOut` | `WipeOut` 删除所有集群资源,包括外部存储中的卷快照和备份。使用该策略将会删除全部数据,特别是在非生产环境,该策略将会带来不可逆的数据丢失。请谨慎使用。 | + +执行以下命令查看终止策略。 + + + + + +```bash +kubectl get cluster mycluster -n demo +> +NAME CLUSTER-DEFINITION VERSION TERMINATION-POLICY STATUS AGE +mycluster starrocks starrocks-ce-3.1.1 Delete Running 47m +``` + + + + + +```bash +kbcli cluster list -n demo +> +NAME NAMESPACE CLUSTER-DEFINITION VERSION TERMINATION-POLICY STATUS CREATED-TIME +mycluster demo starrocks starrocks-3.1.1 Delete Running Jul 17,2024 19:06 UTC+0800 +``` + + + + + +### 步骤 + +执行以下命令,删除集群。 + + + + + +```bash +kubectl delete cluster mycluster -n demo +``` + +如果想删除集群和所有相关资源,可以将终止策略修改为 `WipeOut`,然后再删除该集群。 + +```bash +kubectl patch -n demo cluster mycluster -p '{"spec":{"terminationPolicy":"WipeOut"}}' --type="merge" + +kubectl delete -n demo cluster mycluster +``` + + + + + +```bash +kbcli cluster delete mycluster -n demo +``` + + + + diff --git a/i18n/zh-cn/user-docs/kubeblocks-for-weaviate/_category_.yml b/i18n/zh-cn/user-docs/kubeblocks-for-weaviate/_category_.yml deleted file mode 100644 index c669e840380..00000000000 --- a/i18n/zh-cn/user-docs/kubeblocks-for-weaviate/_category_.yml +++ /dev/null @@ -1,4 +0,0 @@ -position: 17 -label: 用 KubeBlocks 管理 Weaviate -collapsible: true -collapsed: true diff --git a/i18n/zh-cn/user-docs/kubeblocks-for-weaviate/manage-weaviate.md b/i18n/zh-cn/user-docs/kubeblocks-for-weaviate/manage-weaviate.md deleted file mode 100644 index ee855bb1928..00000000000 --- a/i18n/zh-cn/user-docs/kubeblocks-for-weaviate/manage-weaviate.md +++ /dev/null @@ -1,303 +0,0 @@ ---- -title: 用 KubeBlocks 管理 Weaviate -description: 如何用 KubeBlocks 管理 Weaviate -keywords: [weaviate, 向量数据库] -sidebar_position: 1 -sidebar_label: 用 KubeBlocks 管理 Weaviate ---- - -# 用 KubeBlocks 管理 Weaviate - -生成式人工智能的爆火引发了人们对向量数据库的关注。Weaviate 是开源向量数据库,可简化人工智能应用程序的开发。内置向量和混合搜索、易于连接的机器学习模型以及对数据隐私的关注使各级开发人员能够更快地构建、迭代和扩展 AI 功能。 - -## 开始之前 - -- [安装 kbcli](./../installation/install-with-kbcli/install-kbcli.md)。 -- [安装 KubeBlocks](./../installation/install-with-kbcli/install-kubeblocks-with-kbcli.md)。 -- [安装并启用 weaviate 引擎](./../overview/database-engines-supported.md#使用引擎)。 - -## 创建集群 - -***步骤:*** - -1. 创建集群 - - ```bash - kbcli cluster create weaviate --cluster-definition=weaviate - ``` - - 如需创建多副本 Weaviate 集群,可使用以下命令,设置副本数量。 - - ```bash - kbcli cluster create weaviate --cluster-definition=weaviate --set replicas=3 - ``` - -:::note - -执行以下命令,查看更多集群创建的选项和默认值。 - -```bash -kbcli cluster create --help -``` - -::: - -2. 查看集群是否已创建。 - - ```bash - kbcli cluster list - > - NAME NAMESPACE CLUSTER-DEFINITION VERSION TERMINATION-POLICY STATUS CREATED-TIME - weaviate default weaviate weaviate-1.18.0 Delete Running Jul 05,2024 17:42 UTC+0800 - ``` - -3. 查看集群信息。 - - ```bash - kbcli cluster describe weaviate - > - Name: weaviate Created Time: Jul 05,2024 17:42 UTC+0800 - NAMESPACE CLUSTER-DEFINITION VERSION STATUS TERMINATION-POLICY - default weaviate weaviate-1.18.0 Running Delete - - Endpoints: - COMPONENT MODE INTERNAL EXTERNAL - weaviate ReadWrite weaviate-weaviate.default.svc.cluster.local:8080 - - Topology: - COMPONENT INSTANCE ROLE STATUS AZ NODE CREATED-TIME - weaviate weaviate-weaviate-0 Running minikube/192.168.49.2 Jul 05,2024 17:42 UTC+0800 - - Resources Allocation: - COMPONENT DEDICATED CPU(REQUEST/LIMIT) MEMORY(REQUEST/LIMIT) STORAGE-SIZE STORAGE-CLASS - weaviate false 1 / 1 1Gi / 1Gi data:20Gi standard - - Images: - COMPONENT TYPE IMAGE - weaviate weaviate docker.io/semitechnologies/weaviate:1.19.6 - - Data Protection: - BACKUP-REPO AUTO-BACKUP BACKUP-SCHEDULE BACKUP-METHOD BACKUP-RETENTION RECOVERABLE-TIME - ``` - -## 连接集群 - -Weaviate 提供 HTTP 访问协议,使用端口 8080 进行通信。您可通过本地主机访问集群。 - -```bash -curl http://localhost:8080/v1/meta | jq -``` - -## 监控集群 - -对于测试环境,您可以执行以下命令,打开 Grafana 监控大盘。 - -1. 查看内置监控引擎,确认监控引擎已启用。如果未启用,可参考[该文档](./../overview/database-engines-supported.md#使用引擎)启用引擎。 - - ```bash - # View all addons supported - kbcli addon list - ... - grafana Helm Enabled true - alertmanager-webhook-adaptor Helm Enabled true - prometheus Helm Enabled alertmanager true - ... - ``` - -2. 查看集群监控功能是否开启。可通过查看集群 YAML 文件中是否显示 `disableExporter: false`,如果有该字段,则说明集群监控功能已开启。 - - ```bash - kubectl get cluster weaviate -o yaml - > - apiVersion: apps.kubeblocks.io/v1alpha1 - kind: Cluster - metadata: - ...... - spec: - ...... - componentSpecs: - ...... - disableExporter: false - ``` - - 如果输出结果未显示 `disableExporter: false`,则说明集群未开启监控功能,可执行以下命令,开启该功能。 - - ```bash - kbcli cluster update weaviate --disable-exporter=false - ``` - -3. 查看大盘列表。 - - ```bash - kbcli dashboard list - > - NAME NAMESPACE PORT CREATED-TIME - kubeblocks-grafana kb-system 13000 Jul 24,2023 11:38 UTC+0800 - kubeblocks-prometheus-alertmanager kb-system 19093 Jul 24,2023 11:38 UTC+0800 - kubeblocks-prometheus-server kb-system 19090 Jul 24,2023 11:38 UTC+0800 - ``` - -4. 打开监控大盘网页控制台。 - - ```bash - kbcli dashboard open kubeblocks-grafana - ``` - -对于生产环境,强烈建议您搭建专属监控系统或者购买第三方监控服务,详情可参考[监控文档](./../observability/monitor-database.md#生产环境)。 - -## 扩缩容 - -### 水平扩缩容 - -水平扩展改变 Pod 的数量。例如,您可以将副本从三个扩展到五个。 - -从 v0.9.0 开始,KubeBlocks 还支持了指定实例扩缩容。可通过 [水平扩缩容 API 文档](./../../api-docs/maintenance/scale/horizontal-scale.md) 文档了解更多细节和示例。 - -#### 开始之前 - -确认集群状态是否为 `Running`。否则,后续相关操作可能会失败。 - -```bash -kbcli cluster list weaviate -> -NAME NAMESPACE CLUSTER-DEFINITION VERSION TERMINATION-POLICY STATUS CREATED-TIME -weaviate default weaviate weaviate-1.18.0 Delete Running Jul 24,2023 11:38 UTC+0800 -``` - -#### 步骤 - -执行以下命令进行水平扩缩容。 - -```bash -kbcli cluster hscale weaviate --replicas=3 --components=weaviate -``` - -- `--components` 表示准备进行水平扩容的组件名称。 -- `--replicas` 表示指定组件的副本数。 根据需要设定数值,进行扩缩容。 - -执行 `kbcli cluster hscale` 后会输出一条 ops 相关命令,可使用该命令查看扩缩容任务进度。 - -```bash -kbcli cluster describe-ops weaviate-horizontalscaling-xpdwz -n default -``` - -也可通过以下命令,查看扩缩容任务是否完成。 - -```bash -kbcli cluster describe weaviate -``` - -### 垂直扩缩容 - -#### 开始之前 - -确认集群状态是否为 `Running`。否则,后续相关操作可能会失败。 - -```bash -kbcli cluster list weaviate -> -NAME NAMESPACE CLUSTER-DEFINITION VERSION TERMINATION-POLICY STATUS CREATED-TIME -weaviate default weaviate weaviate-1.18.0 Delete Running Jul 24,2023 11:38 UTC+0800 -``` - -#### 步骤 - -执行以下命令进行垂直扩缩容。 - -```bash -kbcli cluster vscale weaviate --cpu=0.5 --memory=512Mi --components=weaviate -``` - -执行 `kbcli cluster vscale` 后会输出一条 ops 相关命令,可使用该命令查看扩缩容任务进度。 - -```bash -kbcli cluster describe-ops weaviate-verticalscaling-rpw2l -n default -``` - -也可通过以下命令,查看扩缩容任务是否完成。 - -```bash -kbcli cluster describe weaviate -``` - -## 磁盘扩容 - -***步骤:*** - -```bash -kbcli cluster volume-expand weaviate --storage=40Gi --components=weaviate -t data -``` - -执行磁盘扩容任务可能需要几分钟。 - -执行 `kbcli cluster volume-expand` 后会输出一条 ops 相关命令,可使用该命令查看扩缩容任务进度。 - -```bash -kbcli cluster describe-ops weaviate-volumeexpansion-5pbd2 -n default -``` - -也可通过以下命令,查看磁盘扩容任务是否完成。 - -```bash -kbcli cluster describe weaviate -``` - -## 重启集群 - -1. 执行以下命令,重启集群。 - - 配置 `components` 和 `ttlSecondsAfterSucceed` 的值,执行以下命令来重启指定集群。 - - ```bash - kbcli cluster restart weaviate --components="weaviate" \ - --ttlSecondsAfterSucceed=30 - ``` - - - `components` 表示需要重启的组件名称。 - - `ttlSecondsAfterSucceed` 表示重启成功后 OpsRequest 作业的生存时间。 - -2. 验证重启是否成功。 - - 检查集群状态,验证重启操作是否成功。 - - ```bash - kbcli cluster list weaviate - > - NAME NAMESPACE CLUSTER-DEFINITION VERSION TERMINATION-POLICY STATUS CREATED-TIME - weaviate default weaviate weaviate-1.18.0 Delete Running Jul 05,2024 18:42 UTC+0800 - ``` - - - STATUS=Updating 表示集群正在重启中。 - - STATUS=Running 表示集群已重启。 - -## 停止/启动集群 - -你可以停止/启动集群以释放计算资源。当集群被停止时,其计算资源将被释放,也就是说 Kubernetes 的 Pod 将被释放,但其存储资源仍将被保留。如果你希望通过快照从原始存储中恢复集群资源,请重新启动该集群。 - -## 停止集群 - -1. 配置集群名称,并执行以下命令来停止该集群。 - - ```bash - kbcli cluster stop weaviate - ``` - -2. 查看集群状态,确认集群是否已停止。 - - ```bash - kbcli cluster list - ``` - -### 启动集群 - -1. 配置集群名称,并执行以下命令来启动该集群。 - - ```bash - kbcli cluster start weaviate - ``` - -2. 查看集群状态,确认集群是否已再次运行。 - - ```bash - kbcli cluster list - ``` diff --git a/i18n/zh-cn/user-docs/kubeblocks-for-xinference/_category_.yml b/i18n/zh-cn/user-docs/kubeblocks-for-xinference/_category_.yml deleted file mode 100644 index 5f89333d640..00000000000 --- a/i18n/zh-cn/user-docs/kubeblocks-for-xinference/_category_.yml +++ /dev/null @@ -1,4 +0,0 @@ -position: 19 -label: 用 KubeBlocks 管理 Xinference -collapsible: true -collapsed: true \ No newline at end of file diff --git a/i18n/zh-cn/user-docs/kubeblocks-for-xinference/manage-xinference.md b/i18n/zh-cn/user-docs/kubeblocks-for-xinference/manage-xinference.md deleted file mode 100644 index 05a1da23e7c..00000000000 --- a/i18n/zh-cn/user-docs/kubeblocks-for-xinference/manage-xinference.md +++ /dev/null @@ -1,179 +0,0 @@ ---- -title: 用 KubeBlocks 管理 Xinference -description: 如何用 KubeBlocks 管理 Xinference -keywords: [xinference, LLM, AI] -sidebar_position: 1 -sidebar_label: 用 KubeBlocks 管理 Xinference ---- - -# 用 KubeBlocks 管理 Xinference - -Xorbits Inference (Xinference) 是一个开源平台,用于简化各种 AI 模型的运行和集成。借助 Xinference,您可以使用任何开源 LLM、嵌入模型和多模态模型在云端或本地环境中运行推理,并创建强大的 AI 应用。 - -## 开始之前 - -- [安装 kbcli](./../installation/install-with-kbcli/install-kbcli.md)。 -- [安装 KubeBlocks](./../installation/install-with-kbcli/install-kubeblocks-with-kbcli.md)。 -- [安装并启用 xinference 引擎](./../overview/database-engines-supported.md#使用引擎)。 - -## 创建集群 - -***步骤:*** - -1. 创建集群。 - - ```bash - kbcli cluster create mycluster --cluster-definition=xinference - ``` - - 如需创建多副本 Weaviate 集群,可使用以下命令,设置副本数量。 - - ```bash - kbcli cluster create mycluster --cluster-definition=xinference --set replicas=3 - ``` - - 您也可使用 `--set` 指定 CPU、memory、存储的值。 - - ```bash - kbcli cluster create mycluster --cluster-definition=xinference --set cpu=1,memory=2Gi,storage=10Gi - ``` - -:::note - -执行以下命令,查看更多集群创建的选项和默认值。 - -```bash -kbcli cluster create --help -``` - -::: - -2. 查看集群是否已创建。 - - ```bash - kbcli cluster list - > - NAME NAMESPACE CLUSTER-DEFINITION VERSION TERMINATION-POLICY STATUS CREATED-TIME - mycluster default xinference xinference-0.11.0 Delete Running Jul 17,2024 17:24 UTC+0800 - ``` - -3. 查看集群信息。 - - ```bash - kbcli cluster describe mycluster - > - Name: mycluster Created Time: Jul 17,2024 17:29 UTC+0800 - NAMESPACE CLUSTER-DEFINITION VERSION STATUS TERMINATION-POLICY - default xinference xinference-0.11.0 Running Delete - - Endpoints: - COMPONENT MODE INTERNAL EXTERNAL - xinference ReadWrite mycluster-xinference.default.svc.cluster.local:9997 - - Topology: - COMPONENT INSTANCE ROLE STATUS AZ NODE CREATED-TIME - xinference mycluster-xinference-0 Running minikube/192.168.49.2 Jul 17,2024 17:29 UTC+0800 - - Resources Allocation: - COMPONENT DEDICATED CPU(REQUEST/LIMIT) MEMORY(REQUEST/LIMIT) STORAGE-SIZE STORAGE-CLASS - xinference false 1 / 1 1Gi / 1Gi data:20Gi standard - - Images: - COMPONENT TYPE IMAGE - xinference xinference docker.io/xprobe/xinference:v0.11.0 - - Show cluster events: kbcli cluster list-events -n default mycluster - ``` - -## 垂直扩缩容 - -#### 开始之前 - -确认集群状态是否为 `Running`。否则,后续相关操作可能会失败。 - -```bash -kbcli cluster list -> - NAME NAMESPACE CLUSTER-DEFINITION VERSION TERMINATION-POLICY STATUS CREATED-TIME - mycluster default xinference xinference-0.11.0 Delete Running Jul 05,2024 17:29 UTC+0800 -``` - -#### 步骤 - -执行以下命令进行垂直扩缩容。 - -```bash -kbcli cluster vscale mycluster --cpu=0.5 --memory=512Mi --components=xinference -``` - -执行 `kbcli cluster vscale` 后会输出一条 ops 相关命令,可使用该命令查看扩缩容任务进度。 - -```bash -kbcli cluster describe-ops mycluster-verticalscaling-smx8b -n default -``` - -也可通过以下命令,查看扩缩容任务是否完成。 - -```bash -kbcli cluster describe mycluster -``` - -## 重启集群 - -1. 执行以下命令,重启集群。 - - 配置 `components` 和 `ttlSecondsAfterSucceed` 的值,执行以下命令来重启指定集群。 - - ```bash - kbcli cluster restart mycluster --components="xinference" \ - --ttlSecondsAfterSucceed=30 - ``` - - - `components` 表示需要重启的组件名称。 - - `ttlSecondsAfterSucceed` 表示重启成功后 OpsRequest 作业的生存时间。 - -2. 验证重启是否成功。 - - 检查集群状态,验证重启操作是否成功。 - - ```bash - kbcli cluster list mycluster - > - NAME NAMESPACE CLUSTER-DEFINITION VERSION TERMINATION-POLICY STATUS CREATED-TIME - mycluster default xinference xinference-0.11.0 Delete Running Jul 05,2024 18:42 UTC+0800 - ``` - - - STATUS=Updating 表示集群正在重启中。 - - STATUS=Running 表示集群已重启。 - -## 停止/启动集群 - -你可以停止/启动集群以释放计算资源。当集群被停止时,其计算资源将被释放,也就是说 Kubernetes 的 Pod 将被释放,但其存储资源仍将被保留。如果你希望通过快照从原始存储中恢复集群资源,请重新启动该集群。 - -## 停止集群 - -1. 配置集群名称,并执行以下命令来停止该集群。 - - ```bash - kbcli cluster stop mycluster - ``` - -2. 查看集群状态,确认集群是否已停止。 - - ```bash - kbcli cluster list - ``` - -### 启动集群 - -1. 配置集群名称,并执行以下命令来启动该集群。 - - ```bash - kbcli cluster start mycluster - ``` - -2. 查看集群状态,确认集群是否已再次运行。 - - ```bash - kbcli cluster list - ``` diff --git a/i18n/zh-cn/user-docs/maintenance/backup-and-restore/backup/backup-repo.md b/i18n/zh-cn/user-docs/maintenance/backup-and-restore/backup/backup-repo.md index 6c781d86746..3eeddb30c07 100644 --- a/i18n/zh-cn/user-docs/maintenance/backup-and-restore/backup/backup-repo.md +++ b/i18n/zh-cn/user-docs/maintenance/backup-and-restore/backup/backup-repo.md @@ -21,10 +21,10 @@ BackupRepo 是备份数据的存储仓库,支持配置 OSS(阿里云对象 请确保你已经: -* [安装 kbcli](./../../../installation/install-with-kbcli/install-kbcli.md)。 +* [安装 kbcli](./../../../installation/install-kbcli.md)。 * [安装 kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl)。 * [安装 Helm](https://helm.sh/docs/intro/install/)。 -* 安装 KubeBlocks。如果未安装,可通过 [kbcli](./../../../installation/install-with-kbcli/install-kubeblocks-with-kbcli.md) 或 [Helm](./../../../installation/install-with-helm/install-kubeblocks.md) 进行安装。 +* [安装 KubeBlocks](./../../../installation/install-kubeblocks.md)。 ## 安装 MinIO diff --git a/i18n/zh-cn/user-docs/observability/monitor-database.md b/i18n/zh-cn/user-docs/observability/monitor-database.md index 120adc69042..a477a4687d7 100644 --- a/i18n/zh-cn/user-docs/observability/monitor-database.md +++ b/i18n/zh-cn/user-docs/observability/monitor-database.md @@ -31,7 +31,7 @@ KubeBlocks 以插件(Addon)形式集成了许多开源监控组件,如 Pro -1. 查看所有支持的引擎,确保监控引擎已启用。可参考[此文档](./../installation/install-with-kbcli/install-kbcli.md),查看安装或启用引擎的详细说明。 +1. 查看所有支持的引擎,确保监控引擎已启用。可参考[此文档](./../installation/install-addons.md),查看安装或启用引擎的详细说明。 ```bash # 查看内置支持的所有引擎 diff --git a/i18n/zh-cn/user-docs/try-out-on-playground/try-kubeblocks-on-cloud.md b/i18n/zh-cn/user-docs/try-out-on-playground/try-kubeblocks-on-cloud.md index 382a71f0842..1645c293805 100644 --- a/i18n/zh-cn/user-docs/try-out-on-playground/try-kubeblocks-on-cloud.md +++ b/i18n/zh-cn/user-docs/try-out-on-playground/try-kubeblocks-on-cloud.md @@ -27,7 +27,7 @@ import TabItem from '@theme/TabItem'; - [安装 AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)。 - [安装 kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl)。 -- [安装 kbcli](./../installation/install-with-kbcli/install-kbcli.md)。 +- [安装 kbcli](./../installation/install-kbcli.md)。 ### 配置访问密钥 @@ -85,7 +85,7 @@ kbcli cluster list 请确保已经: - 拥有 Google Cloud 账户。 - [安装 kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl)。 -- [安装 kbcli](./../installation/install-with-kbcli/install-kbcli.md)。 +- [安装 kbcli](./../installation/install-kbcli.md)。 ### 配置 GCP 环境 @@ -156,7 +156,7 @@ kbcli cluster list 请确保已经: - 拥有腾讯云账户。 - [安装 kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl)。 -- [安装 kbcli](./../installation/install-with-kbcli/install-kbcli.md)。 +- [安装 kbcli](./../installation/install-kbcli.md)。 ### 配置 TKE 环境 @@ -208,7 +208,7 @@ kbcli cluster list 请确保已经: - 拥有阿里云账户。 - [安装 kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl)。 -- [安装 kbcli](./../installation/install-with-kbcli/install-kbcli.md)。 +- [安装 kbcli](./../installation/install-kbcli.md)。 ### 配置 ACK 环境 diff --git a/i18n/zh-cn/user-docs/try-out-on-playground/try-kubeblocks-on-local-host.md b/i18n/zh-cn/user-docs/try-out-on-playground/try-kubeblocks-on-local-host.md index 91286456f7f..73e297da52e 100644 --- a/i18n/zh-cn/user-docs/try-out-on-playground/try-kubeblocks-on-local-host.md +++ b/i18n/zh-cn/user-docs/try-out-on-playground/try-kubeblocks-on-local-host.md @@ -22,7 +22,7 @@ sidebar_label: 在本地使用 KubeBlocks * 在电脑上已安装: * [Docker](https://docs.docker.com/get-docker/):v20.10.5(runc ≥ v1.0.0-rc93)或更高版本; * [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl):用于与 Kubernetes 集群进行交互; - * [kbcli](./../installation/install-with-kbcli/install-kbcli.md):用于 Playground 和 KubeBlocks 之间的交互。 + * [kbcli](./../installation/install-kbcli.md):用于 Playground 和 KubeBlocks 之间的交互。 ## 初始化 Playground