Update edge node guide

Signed-off-by: Sherlock113 <sherlockxu@yunify.com>
This commit is contained in:
Sherlock113 2021-05-28 14:42:15 +08:00
parent 90e9cab997
commit 75c0b66dc2
4 changed files with 47 additions and 59 deletions

View File

@ -36,12 +36,6 @@ You need to install a container runtime and configure EdgeMesh on your edge node
[KubeEdge](https://docs.kubeedge.io/en/docs/) supports several container runtimes including Docker, containerd, CRI-O and Virtlet. For more information, see [the KubeEdge documentation](https://docs.kubeedge.io/en/docs/advanced/cri/).
{{< notice note >}}
If you use Docker as the container runtime for your edge node, Docker v19.3.0 or later must be installed so that KubeSphere can get Pod metrics of it.
{{</ notice >}}
### Configure EdgeMesh
Perform the following steps to configure [EdgeMesh](https://kubeedge.io/en/docs/advanced/edgemesh/) on your edge node.
@ -160,6 +154,29 @@ To make sure edge nodes can successfully talk to your cluster, you must forward
done
```
## Custom Configurations
To customize some configurations of an edge node, such as download URL and KubeEdge version, create a [ConfigMap](../../../project-user-guide/configuration/configmaps/) as below:
```yaml
apiVersion: v1
data:
region: zh # Download region.
version: v1.6.2 # The version of KubeEdge to be installed. Allowed values are v1.5.0, v1.6.0, v1.6.1 and v1.6.2 (default).
kind: ConfigMap
metadata:
name: edge-watcher-config
namespace: kubeedge
```
{{< notice note >}}
- You can specify `zh` or `en` for the field `region`. `zh` is the default value and the default download link is `https://kubeedge.pek3b.qingstor.com/bin/v1.6.1/$arch/keadm-v1.6.1-linux-$arch.tar.gz`. If you set `region` to `en`, the download link will be `https://github.com/kubesphere/kubeedge/releases/download/v1.6.1-kubesphere/keadm-v1.6.1-linux-amd64.tar.gz`.
- The ConfigMap does not affect the configurations of exiting edge nodes in your cluster. It is only used to change the KubeEdge configurations to be used on a new edge node. More specifically, it decides [the command automatically created by KubeSphere mentioned above](#add-an-edge-node) which needs to be executed on the edge node.
- While you can change the KubeEdge version to be installed on an edge node, it is recommended that the cloud and edge modules have the same KubeEdge version.
{{</ notice >}}
## Remove an Edge Node
Before you remove an edge node, delete all your workloads running on it.

View File

@ -187,26 +187,3 @@ iptables-hphgf 1/1 Running 0 5
CloudCore may malfunction (`CrashLoopBackOff`) if `kubeedge.cloudCore.cloudHub.advertiseAddress` was not set when you enabled KubeEdge. In this case, run `kubectl -n kubeedge edit cm cloudcore` to add the public IP address of your cluster or an IP address that can be accessed by edge nodes.
{{</ notice >}}
## Custom Configurations
After you enable KubeEdge, you can manually create a [ConfigMap](../../project-user-guide/configuration/configmaps/) to customize some configurations, such as the download URL of `keadm` and the version of KubeEdge. Local configurations will be dynamically updated based on the ConfigMap.
Here is an example of the ConfigMap:
```yaml
apiVersion: v1
data:
region: zh # Download region.
version: v1.6.1 # The default installed version of KubeEdge.
kind: ConfigMap
metadata:
name: edge-watcher-config
namespace: kubeedge
```
{{< notice note >}}
You can specify `zh` or `en` for the field `region`. `zh` is the default value and the default download link is `https://kubeedge.pek3b.qingstor.com/bin/v1.6.1/$arch/keadm-v1.6.1-linux-$arch.tar.gz`. If you set `region` to `en`, the download link will be `https://github.com/kubesphere/kubeedge/releases/download/v1.6.1-kubesphere/keadm-v1.6.1-linux-amd64.tar.gz`.
{{</ notice >}}

View File

@ -36,12 +36,6 @@ KubeSphere 利用 [KubeEdge](https://kubeedge.io/zh/) 将原生容器化应用
[KubeEdge](https://docs.kubeedge.io/zh/docs/) 支持多种容器运行时,包括 Docker、containerd、CRI-O 和 Virtlet。有关更多信息请参见 [KubeEdge 文档](https://docs.kubeedge.io/zh/docs/advanced/cri/)。
{{< notice note >}}
如果您的边缘节点使用 Docker 作为容器运行时,为确保 KubeSphere 可以获取 Pod 指标,请务必在边缘节点上安装 Docker v19.3.0 或更高版本。
{{</ notice >}}
### 配置 EdgeMesh
执行以下步骤以在边缘节点上配置 [EdgeMesh](https://kubeedge.io/zh/docs/advanced/edgemesh/)。
@ -160,6 +154,29 @@ KubeSphere 利用 [KubeEdge](https://kubeedge.io/zh/) 将原生容器化应用
done
```
## 自定义配置
若要对边缘节点的部分配置(例如下载 URL 和 KubeEdge 版本)自定义,您可以如下创建一个 [ConfigMap](../../../project-user-guide/configuration/configmaps/)
```yaml
apiVersion: v1
data:
region: zh # 下载区域。
version: v1.6.1 # KubeEdge 的安装版本。可用的值包括 v1.5.0、v1.6.0、v1.6.1 和 v1.6.2(默认)。
kind: ConfigMap
metadata:
name: edge-watcher-config
namespace: kubeedge
```
{{< notice note >}}
- 对于 `region` 字段,您可以指定 `zh``en`。默认值为 `zh`,默认下载链接为 `https://kubeedge.pek3b.qingstor.com/bin/v1.6.1/$arch/keadm-v1.6.1-linux-$arch.tar.gz`。若将 `region` 设置为 `en`,下载链接将变为 `https://github.com/kubesphere/kubeedge/releases/download/v1.6.1-kubesphere/keadm-v1.6.1-linux-amd64.tar.gz`
- 该 ConfigMap 不会影响您集群中现有边缘节点的配置,仅用于修改新添加的边缘节点的配置。确切地说,该 ConfigMap 会决定上文中[由 KubeSphere 自动生成的命令](#添加边缘节点),即您之后在边缘节点上需要运行的命令。
- 虽然您可以变更在边缘节点上安装的 KubeEdge 版本,建议您的云端和边端组件使用相同的 KubeEdge 版本。
{{</ notice >}}
## 移除边缘节点
移除边缘节点之前,请删除在该节点上运行的全部工作负载。

View File

@ -187,27 +187,4 @@ iptables-hphgf 1/1 Running 0 5
如果您在启用 KubeEdge 时未设置 `kubeedge.cloudCore.cloudHub.advertiseAddress`,则 CloudCore 无法正常运行 (`CrashLoopBackOff`)。在这种情况下,请运行 `kubectl -n kubeedge edit cm cloudcore` 添加集群的公共 IP 地址或边缘节点可以访问的 IP 地址。
{{</ notice >}}
## 自定义配置
启用 KubeEdge 后,您可以手动创建一个 [ConfigMap](../../project-user-guide/configuration/configmaps/) 来自定义某些配置,比如 `keadm` 的下载 URL、KubeEdge 的版本等等。本地配置将基于该 ConfigMap 进行动态更新。
以下是 ConfigMap 的示例:
```yaml
apiVersion: v1
data:
region: zh # 下载区域。
version: v1.6.1 # KubeEdge 的默认安装版本。
kind: ConfigMap
metadata:
name: edge-watcher-config
namespace: kubeedge
```
{{< notice note >}}
对于 `region` 字段,您可以指定 `zh``en`。默认值为 `zh`,默认下载链接为 `https://kubeedge.pek3b.qingstor.com/bin/v1.6.1/$arch/keadm-v1.6.1-linux-$arch.tar.gz`。若将 `region` 设置为 `en`,下载链接将变为 `https://github.com/kubesphere/kubeedge/releases/download/v1.6.1-kubesphere/keadm-v1.6.1-linux-amd64.tar.gz`
{{</ notice >}}
{{</ notice >}}