Update quickstarts - enable pluggable components in Chinese and English

Signed-off-by: Ray Zhou <ray@yunify.com>
This commit is contained in:
Ray Zhou 2020-11-26 12:06:12 +08:00
parent ab89550168
commit 82d29dffe0
2 changed files with 136 additions and 149 deletions

View File

@ -18,11 +18,11 @@ This tutorial demonstrates how to enable pluggable components of KubeSphere both
| logging | KubeSphere logging system | Provide flexible logging functions for log query, collection and management in a unified console. Additional log collectors can be added, such as Elasticsearch, Kafka and Fluentd. |
| metrics_server | HPA | The Horizontal Pod Autoscaler automatically scales the number of pods based on needs. |
| networkpolicy | Network policy | Allow network isolation within the same cluster, which means firewalls can be set up between certain instances (Pods). |
| notification | KubeSphere notification system | Allow users to set `AlertManager` as its sender. Receivers include Email, WeChat Work, and Slack. |
| notification | KubeSphere notification system | Allows users to receive alerts from [Alertmanager](../../cluster-administration/cluster-wide-alerting-and-notification/alertmanager/) and then send notifications to various receivers including Email, Wechat Work and Slack. (DingTalk and Webhook are supported in the latest version of [Notification Manager](https://github.com/kubesphere/notification-manager).) |
| openpitrix | KubeSphere App Store | Provide an app store for Helm-based applications and allow users to manage apps throughout the entire lifecycle. |
| servicemesh | KubeSphere Service Mesh (Istio-based) | Provide fine-grained traffic management, observability and tracing, and visualized traffic topology. |
For more information about each component, see [Overview of Enable Pluggable Components](../../pluggable-components/).
For more information about each component, see [Overview of Enable Pluggable Components](../../pluggable-components/overview/).
{{< notice note >}}
@ -40,45 +40,41 @@ When you implement multi-node installation of KubeSphere on Linux, you need to c
1. In the tutorial of [Installing KubeSphere on Linux](../../installing-on-linux/introduction/multioverview/), you create a default file **config-sample.yaml**. Modify the file by executing the following command:
```bash
vi config-sample.yaml
```
{{< notice note >}}
```bash
vi config-sample.yaml
```
{{< notice note >}}
If you adopt [All-in-one Installation](../../quick-start/all-in-one-on-linux/), you do not need to create a config-sample.yaml file as you can create a cluster directly. Generally, the all-in-one mode is for users who are new to KubeSphere and look to get familiar with the system. If you want to enable pluggable components in this mode (e.g. for testing purpose), refer to the [following section](#enable-pluggable-components-after-installation) to see how pluggable components can be installed after installation.
{{</ notice >}}
{{</ notice >}}
2. In this file, enable the pluggable components you want to install by changing `false` to `true` for `enabled`. Here is [an example file](https://github.com/kubesphere/kubekey/blob/release-1.0/docs/config-example.md) for your reference. Save the file after you finish.
3. Create a cluster using the configuration file:
```bash
./kk create cluster -f config-sample.yaml
```
```bash
./kk create cluster -f config-sample.yaml
```
### Installing on Kubernetes
When you install KubeSphere on Kubernetes, you need to execute `kubectl apply -f` first for the installer file [kubesphere-installer.yaml](https://github.com/kubesphere/ks-installer/releases/download/v3.0.0/kubesphere-installer.yaml) as stated in the tutorial of [Installing KubeSphere on Kubernetes](../../installing-on-kubernetes/introduction/overview/). After that, follow the steps below to enable pluggable components:
When you install KubeSphere on Kubernetes, you need to use [ks-installer](https://github.com/kubesphere/ks-installer/) by applying two yaml files as below.
1. Download the file [cluster-configuration.yaml](https://github.com/kubesphere/ks-installer/releases/download/v3.0.0/cluster-configuration.yaml) and copy and paste the content of it to a local `cluster-configuration.yaml` file.
1. First download the file [cluster-configuration.yaml](https://github.com/kubesphere/ks-installer/releases/download/v3.0.0/cluster-configuration.yaml) and open it for editing.
```bash
vi cluster-configuration.yaml
```
```bash
vi cluster-configuration.yaml
```
2. To enable the pluggable component you want to install, change `false` to `true` for `enabled` under the component in this file.
3. Save this local file and execute the following command to apply it.
```bash
kubectl apply -f cluster-configuration.yaml
```
3. Save this local file and execute the following commands to apply it.
{{< notice warning >}}
```bash
kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.0.0/kubesphere-installer.yaml
You must apply the `kubesphere-installer.yaml` file first before you apply the file `cluster-configuration.yaml`. Wrong execution order or the failure to apply either file can result in installation failure.
{{</ notice >}}
kubectl apply -f cluster-configuration.yaml
```
Whether you install KubeSphere on Linux or on Kubernetes, you can check the status of the components you have enabled in the web console of KubeSphere after installation. Go to **Components**, and you can see an image below:
@ -90,68 +86,62 @@ KubeSphere web console provides a convenient way for users to view and operate o
1. Log in the console as `admin`. Click **Platform** in the top-left corner and select **Clusters Management**.
![clusters-management](https://ap3.qingstor.com/kubesphere-website/docs/20200828111130.png)
![clusters-management](https://ap3.qingstor.com/kubesphere-website/docs/20200828111130.png)
2. Click **CRDs** and enter `clusterconfiguration` in the search bar. Click the result to view its detailed page.
![crds](https://ap3.qingstor.com/kubesphere-website/docs/20200828111321.png)
{{< notice info >}}
![crds](https://ap3.qingstor.com/kubesphere-website/docs/20200828111321.png)
{{< notice info >}}
A Custom Resource Definition (CRD) allows users to create a new type of resources without adding another API server. They can use these resources like any other native Kubernetes objects.
{{</ notice >}}
{{</ notice >}}
3. In **Resource List**, click the three dots on the right of `ks-installer` and select **Edit YAML**.
![edit-ks-installer](https://ap3.qingstor.com/kubesphere-website/docs/20200827182002.png)
![edit-ks-installer](https://ap3.qingstor.com/kubesphere-website/docs/20200827182002.png)
4. In this yaml file, enable the pluggable components you want to install by changing `false` to `true` for `enabled`. After you finish, click **Update** to save the configuration.
![enable-components](https://ap3.qingstor.com/kubesphere-website/docs/20200828112036.png)
![enable-components](https://ap3.qingstor.com/kubesphere-website/docs/20200828112036.png)
5. You can use the web kubectl to check the installation process by executing the following command:
```bash
kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l app=ks-install -o jsonpath='{.items[0].metadata.name}') -f
```
{{< notice tip >}}
```bash
kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l app=ks-install -o jsonpath='{.items[0].metadata.name}') -f
```
{{< notice tip >}}
You can find the web kubectl tool by clicking the hammer icon in the bottom-right corner of the console.
{{</ notice >}}
{{</ notice >}}
6. The output will display a message as below if the component is successfully installed.
```bash
#####################################################
### Welcome to KubeSphere! ###
#####################################################
```yaml
#####################################################
### Welcome to KubeSphere! ###
#####################################################
Console: http://192.168.0.2:30880
Account: admin
Password: P@88w0rd
Console: http://192.168.0.2:30880
Account: admin
Password: P@88w0rd
NOTES
1. After logging into the console, please check the
monitoring status of service components in
the "Cluster Management". If any service is not
ready, please wait patiently until all components
are ready.
2. Please modify the default password after login.
NOTES
1. After logging into the console, please check the
monitoring status of service components in
the "Cluster Management". If any service is not
ready, please wait patiently until all components
are ready.
2. Please modify the default password after login.
#####################################################
https://kubesphere.io 20xx-xx-xx xx:xx:xx
#####################################################
```
#####################################################
https://kubesphere.io 20xx-xx-xx xx:xx:xx
#####################################################
```
7. In **Components**, you can see the status of different components.
![components](https://ap3.qingstor.com/kubesphere-website/docs/20200828115111.png)
{{< notice tip >}}
![components](https://ap3.qingstor.com/kubesphere-website/docs/20200828115111.png)
{{< notice tip >}}
If you do not see relevant components in the above image, some pods may not be ready yet. You can execute `kubectl get pod --all-namespaces` through kubectl to see the status of pods.
{{</ notice >}}
{{</ notice >}}

View File

@ -1,9 +1,9 @@
---
title: "启用可插拔功能组件"
keywords: 'KubeSphere, Kubernetes, 可插拔, 功能组件'
keywords: 'KubeSphereKubernetes可插拔功能组件'
description: '启用可插拔功能组件'
linkTitle: "Enable Pluggable Components"
linkTitle: "启用可插拔功能组件"
weight: 3060
---
@ -11,24 +11,24 @@ weight: 3060
| 配置项 | 功能组件 | 描述 |
| ------------------ | ------------------------------------- | ------------------------------------------------------------ |
| alerting | KubeSphere 告警通知系统 | 使用户能够自定义警报策略,以不同的时间间隔和警报级别及时向接收者发送消息。 |
| auditing | KubeSphere 审计日志系统 | 按时间顺序记录不同租户在平台中的操作活动。 |
| devops | KubeSphere DevOps 系统 | 一站式 DevOps 方案,内置 Jenkins 流水线与 B2I & S2I。 |
| events | KubeSphere 事件系统 | 提供一个图形化的web控制台,用于导出、过滤和警告多租户 Kubernetes 集群中的 Kubernetes 事件。 |
| logging | KubeSphere 日志系统 | 在统一的控制台中提供灵活的日志查询、收集和管理日志功能。可以添加其他日志收集器例如Elasticsearch、Kafka 和 Fluentd。 |
| metrics_server | HPA | 能够根据 pod 数量进行动态伸缩,使运行在上面的服务对指标的变化有一定的自适应能力。 |
| networkpolicy | 网络策略 | 可以在同一个集群内部之间设置网络策略(比如限制或阻止某些实例 pod 之间的网络请求)。 |
| notification | KubeSphere 通知系统 | 允许用户将 AlertManager 设置为发件人并发送告警邮件。可以使用的方式有:电子邮件、微信和 Slack。 |
| openpitrix | KubeSphere 应用商店 | 基于 Helm 的应用程序商店,允许用户在整个生命周期中管理应用程序。 |
| servicemesh | KubeSphere 服务网格 (基于 Istio) | 支持灰度发布、流量拓扑、流量治理、Tracing。 |
| alerting | KubeSphere 告警通知系统 | 使用户能够自定义警报策略,在不同的时间段和用不同的警报级别及时地向接收者发送消息。|
| auditing | KubeSphere 审计日志系统 | 按时间顺序记录不同租户在平台中的操作活动。|
| devops | KubeSphere DevOps 系统 | 一站式 DevOps 方案,内置 Jenkins 流水线与 B2I & S2I。|
| events | KubeSphere 事件系统 | 提供一个图形化的 Web 控制台,用于导出、过滤和警告多租户 Kubernetes 集群中的 Kubernetes 事件。|
| logging | KubeSphere 日志系统 | 在统一的控制台中提供灵活的查询、收集和管理日志功能。可以添加其他日志收集器例如Elasticsearch、Kafka 和 Fluentd。|
| metrics_server | HPA | 根据设定指标对 Pod 数量进行动态伸缩,使运行在上面的服务对指标的变化有一定的自适应能力。|
| networkpolicy | 网络策略 | 可以在同一个集群内部之间设置网络策略(比如限制或阻止某些实例 Pod 之间的网络请求)。|
| notification | KubeSphere 通知系统 | 允许用户将 [Alertmanager](../../cluster-administration/cluster-wide-alerting-and-notification/alertmanager/) 发送出来的告警通知到不同渠道,包括电子邮件、微信和 Slack。最新版本的 [Notification Manager](https://github.com/kubesphere/notification-manager) 支持钉钉和 Webhook。|
| openpitrix | KubeSphere 应用商店 | 基于 Helm 的应用程序商店,允许用户管理应用的整个生命周期。|
| servicemesh | KubeSphere 服务网格 (基于 Istio) | 支持灰度发布、流量拓扑、流量治理、流量跟踪。|
有关每个组件的更多信息,请参见启用可插拔组件概述
有关每个组件的更多信息,请参见[启用可插拔组件概览](../../pluggable-components/overview/)
{{< notice note >}}
- 如果您使用 KubeKey 在 Linux 上安装 KubeSphere默认情况下除了 `metrics_server` 之外,不会启用上述组件。但是,如果在现有的 Kubernetes 集群上安装 KubeSphere则安装程序中 `metrics_server` 仍处于禁用状态。这是因为组件可能已经安装在您的环境中,特别是对于云托管的 Kubernetes 集群。
- `multicluster` 不在本教程中介绍。如果要启用此功能,则需要为 `clusterRole` 设置相应的值。有关详细信息,请参见[多群集管理](../../multicluster-management/).
- 在安装前,请确保您的机器符合硬件要求。如果您想启用所有的可拔插组件,建议您的机器配置如下: CPU ≥ 8 Cores, 内存 ≥ 16 G, 磁盘空间 ≥ 100 G。
- 如果您使用 KubeKey 在 Linux 上安装 KubeSphere默认情况下除了`metrics_server`之外,不会启用上述组件。但是,如果在现有的 Kubernetes 集群上安装 KubeSphere则安装程序中`metrics_server`仍处于禁用状态。这是因为您的环境可能已经安装了这个组件,特别是对于云托管的 Kubernetes 集群。
- `multicluster`不在本教程中介绍。如果要启用此功能,则需要为`clusterRole`设置相应的值。有关详细信息,请参见[多群集管理](../../multicluster-management/).
- 在安装前,请确保您的机器符合硬件要求。如果想启用所有的可拔插组件建议机器配置如下CPU ≥ 8 Cores内存 ≥ 16 G磁盘空间 ≥ 100 G。
{{</ notice >}}
@ -38,114 +38,111 @@ weight: 3060
在 Linux 上安装 KubeSphere 时,需要创建一个配置文件,该文件列出所有 KubeSphere 组件。
1. 在教程 [在 Linux 上安装 KubeSphere](../../installing-on-linux/introduction/multioverview/), 你可以创建一个默认配置文件: **config-sample.yaml**。通过执行以下命令来修改文件:
1. 在教程 [在 Linux 上安装 KubeSphere](../../installing-on-linux/introduction/multioverview/),您需要创建一个默认文件名为 **config-sample.yaml** 的配置文件。通过执行以下命令来修改文件:
```bash
vi config-sample.yaml
```
```bash
vi config-sample.yaml
```
{{< notice note >}}
{{< notice note >}}
如果采用 [All-in-one 模式安装](../../quick-start/all-in-one-on-linux/),您无需创建 config-sample.yaml 文件,因为 all-in-one 模式可以一条命令直接创建集群。通常all-in-one 模式适用于刚接触 KubeSphere 并希望快速熟悉该系统的用户。如果要在此模式下启用可插拔组件(例如,出于测试目的),请参阅[安装后启用可插拔组件](#安装后启用可插拔组件)。
{{</ notice >}}
如果您采用 [All-in-one 模式安装](../../quick-start/all-in-one-on-linux/), 您无需创建 config-sample.yaml 文件,因为 all-in-one 模式可以直接创建集群。 通常all-in-one 模式适用于刚接触 KubeSphere 并希望熟悉该系统的用户。 如果要在此模式下启用可插拔组件(例如,出于测试目的),请参阅以下部分,了解如何在安装后安装可插拔组件。
2. 在此文件中,将`enabled`的值`false`改为`true`。这是[示例文件](https://github.com/kubesphere/kubekey/blob/release-1.0/docs/config-example.md)供您参考,修改完成后保存文件。
{{</ notice >}}
2. 在此文件中, 将 `enabled` 的值 `false` 改为 `true`。 这是 [示例文件](https://github.com/kubesphere/kubekey/blob/master/docs/config-example.md) 供您参考。修改完成后保存文件。
3. 使用配置文件创建集群:
```bash
./kk create cluster -f config-sample.yaml
```
```bash
./kk create cluster -f config-sample.yaml
```
### 在 Kubernetes 上安装
Kubernetes 上安装 KubeSphere 时, 需要下载文件 [cluster-configuration.yaml](https://github.com/kubesphere/ks-installer/releases/download/v3.0.0/cluster-configuration.yaml) 用于群集设置。如果要安装可插拔组件, 请不要直接使用 `kubectl apply -f` 来应用配置
已有 Kubernetes 集群上安装 KubeSphere 时,需要部署 [ks-installer](https://github.com/kubesphere/ks-installer/) 的两个 yaml 文件,如下面所示
1. [在 Kubernetes 上安装 KubeSphere](../../installing-on-kubernetes/introduction/overview/) 教程中, 您首先通过命令 `kubectl apply -f` 应用配置文件 [kubesphere-installer.yaml](https://github.com/kubesphere/ks-installer/releases/download/v3.0.0/kubesphere-installer.yaml)。 之后要启用可插拔组件请创建本地文件cluster-configuration.yaml。
```bash
vi cluster-configuration.yaml
```
1. 首先下载 [cluster-configuration.yaml](https://github.com/kubesphere/ks-installer/releases/download/v3.0.0/cluster-configuration.yaml) 文件,然后打开并开始编辑。
2. 复制文件 [cluster-configuration.yaml](https://github.com/kubesphere/ks-installer/releases/download/v3.0.0/cluster-configuration.yaml) 中所有的内容并将其粘贴到刚创建的本地文件中。
3. 在这个本地文件 cluster-configuration.yaml 中, `enabled` 的值 `false` 改为 `true` 。 [示例文件](https://github.com/kubesphere/ks-installer/blob/master/deploy/cluster-configuration.yaml) 供您参考。 编辑完成后请保存文件。
4. 执行以下命令开始安装:
```bash
vi cluster-configuration.yaml
```
```bash
kubectl apply -f cluster-configuration.yaml
```
2. 在这个本地文件 cluster-configuration.yaml 中,将`enabled`的值`false`改为`true`,编辑完成后请保存文件。
无论是在Linux上还是在Kubernetes上安装KubeSphere安装后都可以在KubeSphere的Web控制台中检查已启用组件的状态。转到 **服务组件**, 您可以看到以下图片:
3. 执行以下命令开始安装:
```bash
kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.0.0/kubesphere-installer.yaml
kubectl apply -f cluster-configuration.yaml
```
无论是在 Linux 上还是在 Kubernetes 上安装 KubeSphere安装后都可以在 KubeSphere 的 Web 控制台中检查已启用组件的状态。转到**服务组件**,可以看到类似如下图片:
![KubeSphere-components](/images/docs/quickstart/kubesphere-components-zh.png)
## 安装后启用可插拔组件
KubeSphere Web 控制台使用户更方便来查看和使用不同的资源。 要在安装后启用可插拔组件,只需要在控制台中直接进行一些调整。 对于那些习惯使用 Kubernete s命令行工具 kubectl 的人来说,由于该工具已集成到控制台中,因此使用 KubeSphere 将毫无困难。
KubeSphere Web 控制台使用户更方便来查看和使用不同的资源。要在安装后启用可插拔组件,只需要在控制台中直接进行一些调整。对于那些习惯使用 Kubernetes 命令行工具 kubectl 的人来说,由于该工具已集成到控制台中,因此使用 KubeSphere 将毫无困难。
1. 以 `admin` 身份登录控制台。 点击左上角的 **平台管理** ,然后选择 **集群管理**
1. 以`admin`身份登录控制台。点击左上角的 **平台管理** ,然后选择 **集群管理**
![clusters-management](/images/docs/quickstart/clusters-management-zh.png)
![clusters-management](/images/docs/quickstart/clusters-management-zh.png)
2. 点击 **自定义资源 CRD** 然后在搜索栏中输入 `clusterconfiguration` 单击结果以查看其详细页面。
2. 点击 **自定义资源 CRD**,然后在搜索栏中输入`clusterconfiguration`,单击搜索结果进入其详细页面。
![crds](/images/docs/quickstart/crds-zh.png)
![crds](/images/docs/quickstart/crds-zh.png)
{{< notice info >}}
{{< notice info >}}
自定义资源定义CRD允许用户在不添加其他 API 服务器的情况下创建新类型的资源,用户可以像使用其它 Kubernetes 内置对象一样使用这些自定义资源。
{{</ notice >}}
自定义资源定义CRD允许用户在不添加其他 API 服务器的情况下创建新类型的资源。它们可以像其他本地 Kubernetes 对象一样使用这些资源。
3. 在 **资源列表** 中,点击`ks-installer`右侧的三个点,然后选择右侧的 **编辑配置文件**
{{</ notice >}}
![edit-ks-installer](/images/docs/quickstart/edit-ks-installer-zh.png)
3. 在 **资源列表** 中, 点击 `ks-installer` 右侧的三个点,然后选择右侧的 **编辑配置文件**
4. 在配置文件中,将`enabled`的`false`更改为`true`,以启用要安装的可插拔组件。完成后,单击 **更新** 以保存配置
![edit-ks-installer](/images/docs/quickstart/edit-ks-installer-zh.png)
![enable-components](/images/docs/quickstart/enable-components-zh.png)
4. 在配置文件中, 将 `enabled``false` 更改为 `true` ,以启用要安装的可插拔组件。 完成后,单击 **更新** 以保存配置。
5. 通过执行以下命令,使用 Web kubectl 来检查安装过程:
![enable-components](/images/docs/quickstart/enable-components-zh.png)
5. 您可以通过执行以下命令,使用 Web kubectl 来检查安装过程:
```bash
kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l app=ks-install -o jsonpath='{.items[0].metadata.name}') -f
```
{{< notice tip >}}
```bash
kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l app=ks-install -o jsonpath='{.items[0].metadata.name}') -f
```
{{< notice tip >}}
您可以通过单击控制台右下角的锤子图标来找到 web kubectl 工具。
{{</ notice >}}
{{</ notice >}}
6. 如果组件安装成功,输出将显示以下消息。
```bash
#####################################################
### Welcome to KubeSphere! ###
#####################################################
```yaml
#####################################################
### Welcome to KubeSphere! ###
#####################################################
Console: http://192.168.0.2:30880
Account: admin
Password: P@88w0rd
Console: http://192.168.0.2:30880
Account: admin
Password: P@88w0rd
NOTES
1. After logging into the console, please check the
monitoring status of service components in
the "Cluster Management". If any service is not
ready, please wait patiently until all components
are ready.
2. Please modify the default password after login.
NOTES
1. After logging into the console, please check the
monitoring status of service components in
the "Cluster Management". If any service is not
ready, please wait patiently until all components
are ready.
2. Please modify the default password after login.
#####################################################
https://kubesphere.io 20xx-xx-xx xx:xx:xx
#####################################################
```
#####################################################
https://kubesphere.io 20xx-xx-xx xx:xx:xx
#####################################################
```
7. 在 **服务组件**, 您可以查看不同组件的状态。
7. 在 **服务组件** 中可以查看不同组件的状态。
![components](/images/docs/quickstart/kubesphere-components-zh.png)
![components](/images/docs/quickstart/kubesphere-components-zh.png)
{{< notice tip >}}
{{< notice tip >}}
如果您在上图中看不到相关组件,可能是一些 pod 尚未准备好。 您可以通过 kubectl 执行 `kubectl get pod --all-namespaces` 来查看 pod 的状态。
{{</ notice >}}
如果在上图中看不到相关组件,可能是一些 Pod 尚未准备好,可以通过 kubectl 执行`kubectl get pod --all-namespaces`来查看 Pod 的状态。
{{</ notice >}}