From 335fc019b120cf386973efab3fefe9d09ad40ab6 Mon Sep 17 00:00:00 2001 From: weizhoublue <45163302+weizhoublue@users.noreply.github.com> Date: Tue, 31 Oct 2023 08:36:16 +0800 Subject: [PATCH] optimize doc (#2484) * optimize doc Signed-off-by: weizhou.lan@daocloud.io * optimize doc Signed-off-by: weizhou.lan@daocloud.io * a Signed-off-by: weizhou.lan@daocloud.io * a Signed-off-by: weizhou.lan@daocloud.io * a Signed-off-by: weizhou.lan@daocloud.io * s Signed-off-by: weizhou.lan@daocloud.io * optimize docs --------- Signed-off-by: weizhou.lan@daocloud.io Co-authored-by: Jeanine-tw <76861242+Jeanine-tw@users.noreply.github.com> --- docs/mkdocs.yml | 30 +++++---- docs/usage/egress-zh_CN.md | 3 + docs/usage/egress.md | 3 + .../cloud/get-started-alibaba-zh_CN.md | 2 +- .../install/cloud/get-started-alibaba.md | 6 +- .../install/cloud/get-started-aws-zh_CN.md | 2 +- .../overlay/get-started-calico-zh_cn.md | 12 +--- .../install/overlay/get-started-calico.md | 11 +-- .../overlay/get-started-cilium-zh_cn.md | 12 +--- .../install/overlay/get-started-cilium.md | 12 +--- .../underlay/get-started-calico-zh_CN.md | 2 + .../install/underlay/get-started-calico.md | 2 + .../underlay/get-started-macvlan-zh_CN.md | 2 +- .../install/underlay/get-started-macvlan.md | 2 +- .../install/underlay/get-started-ovs-zh_CN.md | 56 ++++++---------- .../usage/install/underlay/get-started-ovs.md | 67 ++++++++----------- .../underlay/get-started-sriov-zh_CN.md | 5 +- .../install/underlay/get-started-sriov.md | 5 +- .../underlay/get-started-weave-zh_CN.md | 2 + .../install/underlay/get-started-weave.md | 2 + docs/usage/kubevirt-zh_CN.md | 3 +- docs/usage/network-topology-zh_CN.md | 6 +- docs/usage/network-topology.md | 6 +- docs/usage/rdma-zh_CN.md | 43 ++++++------ docs/usage/rdma.md | 38 ++++++----- docs/usage/reserved-ip-zh_CN.md | 23 +------ docs/usage/reserved-ip.md | 23 +------ docs/usage/route-zh_CN.md | 0 docs/usage/route.md | 2 + docs/usage/service-zh_CN.md | 3 + docs/usage/service.md | 3 + docs/usage/spider-multus-config-zh_CN.md | 21 +----- docs/usage/spider-multus-config.md | 21 +----- docs/usage/spider-subnet-zh_CN.md | 23 +------ docs/usage/spider-subnet.md | 23 +------ docs/usage/statefulset-zh_CN.md | 23 +------ docs/usage/statefulset.md | 23 +------ docs/usage/third-party-controller-zh_CN.md | 3 + docs/usage/third-party-controller.md | 2 + test/Makefile | 3 +- test/Makefile.defs | 6 +- test/scripts/debugEnv.sh | 20 +++--- 42 files changed, 196 insertions(+), 360 deletions(-) create mode 100644 docs/usage/egress-zh_CN.md create mode 100644 docs/usage/egress.md create mode 100644 docs/usage/route-zh_CN.md create mode 100644 docs/usage/service.md create mode 100644 docs/usage/third-party-controller-zh_CN.md diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index e517c78457..3ada4a805e 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -46,21 +46,21 @@ markdown_extensions: nav: - README.md - - GetStarted: usage/readme.md + - Get Started: usage/readme.md - Installation: - - Underlay installation: + - Underlay Installation: - Calico: usage/install/underlay/get-started-calico.md - Weave: usage/install/underlay/get-started-weave.md - Macvlan: usage/install/underlay/get-started-kind.md - Ovs: usage/install/underlay/get-started-ovs.md - - SRIOV: usage/install/underlay/get-started-sriov.md - - Overlay installation: + - SR-IOV: usage/install/underlay/get-started-sriov.md + - Overlay Installation: - Calico: usage/install/overlay/get-started-calico.md - Cilium: usage/install/overlay/get-started-cilium.md - - Public cloud installation: - - alibaba cloud: usage/install/cloud/get-started-alibaba.md - - vmware vsphere: usage/install/cloud/get-started-vmware.md - - openstack: usage/install/cloud/get-started-openstack.md + - Public Cloud Installation: + - Alibaba Cloud: usage/install/cloud/get-started-alibaba.md + - VWware vSphere: usage/install/cloud/get-started-vmware.md + - OpenStack: usage/install/cloud/get-started-openstack.md - Upgrading: usage/install/upgrade.md - Usage: - SpiderMultusConfig: usage/spider-multus-config.md @@ -71,12 +71,14 @@ nav: - IPAM for custom controllers: usage/third-party-controller.md - IPAM for StatefulSet: usage/statefulset.md - IPAM of Reserved IP: usage/reserved-ip.md - - Multiple interfaces: usage/multi-interfaces-annotation.md - - IPv6 support: usage/ipv6.md - - Route support: usage/route.md + - MultipleInterfaces: usage/multi-interfaces-annotation.md + - Egress Policy: usage/egress.md + - IPv6 Support: usage/ipv6.md + - Route Support: usage/route.md + - Service Support: usage/service.md - Plugin coordinator: usage/coordinator.md - Plugin ifacer: usage/ifacer.md - - node-based topology: usage/network-topology.md + - Node-based Topology: usage/network-topology.md - RDMA: usage/rdma.md - Kubevirt: usage/kubevirt.md - FAQ: usage/debug.md @@ -84,7 +86,7 @@ nav: - Architecture: concepts/arch.md - IPAM: concepts/ipam.md - IPAM Performance: concepts/ipam-performance.md - - IO Performance: concepts/io-performance.md + - I/O Performance: concepts/io-performance.md - Blogs: concepts/blog.md - Reference: - Annotations: reference/annotation.md @@ -99,7 +101,7 @@ nav: - CRD SpiderEndpoint: reference/crd-spiderendpoint.md - CRD SpiderReservedIP: reference/crd-spiderreservedip.md - Coordinatorr plugin: reference/plugin-coordinator.md - - Ifacer plugin: reference/plugin-ifacer.md + - ifacer plugin: reference/plugin-ifacer.md - IPAM plugin: reference/plugin-ipam.md - Development: - Contribution Guide: develop/contributing.md diff --git a/docs/usage/egress-zh_CN.md b/docs/usage/egress-zh_CN.md new file mode 100644 index 0000000000..b0760c0c60 --- /dev/null +++ b/docs/usage/egress-zh_CN.md @@ -0,0 +1,3 @@ +# Egress Policy + +[**English**](./egress.md) | **简体中文** diff --git a/docs/usage/egress.md b/docs/usage/egress.md new file mode 100644 index 0000000000..ca21a5c0be --- /dev/null +++ b/docs/usage/egress.md @@ -0,0 +1,3 @@ +# Egress Policy + +**English** | [**简体中文**](./egress-zh_CN.md) diff --git a/docs/usage/install/cloud/get-started-alibaba-zh_CN.md b/docs/usage/install/cloud/get-started-alibaba-zh_CN.md index 6affa5ea10..8d7f6534d3 100644 --- a/docs/usage/install/cloud/get-started-alibaba-zh_CN.md +++ b/docs/usage/install/cloud/get-started-alibaba-zh_CN.md @@ -55,7 +55,7 @@ helm install spiderpool spiderpool/spiderpool --namespace kube-system --set ipam > > Spiderpool 可以为控制器类型为:`Statefulset` 的应用副本固定 IP 地址。在公有云的 Underlay 网络场景中,云主机只能使用限定的 IP 地址,当 StatefulSet 类型的应用副本漂移到其他节点,但由于原固定的 IP 在其他节点是非法不可用的,新的 Pod 将出现网络不可用的问题。对此场景,将 `ipam.enableStatefulSet` 设置为 `false`,禁用该功能。 > -> 通过 `multus.multusCNI.defaultCniCRName` 指定集群的 Multus clusterNetwork,clusterNetwork 是 Multus 插件的一个特定字段,用于指定 Pod 的默认网络接口。 +> 通过 `multus.multusCNI.defaultCniCRName` 指定 multus 默认使用的 CNI 的 NetworkAttachmentDefinition 实例名。如果 `multus.multusCNI.defaultCniCRName` 选项不为空,则安装后会自动生成一个数据为空的 NetworkAttachmentDefinition 对应实例。如果 `multus.multusCNI.defaultCniCRName` 选项不为空,会尝试通过 /etc/cni/net.d 目录下的第一个 CNI 配置来创建对应的 NetworkAttachmentDefinition 实例,否则会自动生成一个名为 `default` 的 NetworkAttachmentDefinition 实例,以完成 multus 的安装。 ### 安装 CNI 配置 diff --git a/docs/usage/install/cloud/get-started-alibaba.md b/docs/usage/install/cloud/get-started-alibaba.md index 8f4f887524..012e9ef5bd 100644 --- a/docs/usage/install/cloud/get-started-alibaba.md +++ b/docs/usage/install/cloud/get-started-alibaba.md @@ -50,12 +50,12 @@ helm install spiderpool spiderpool/spiderpool --namespace kube-system --set ipam ``` > If IPVlan is not installed in your cluster, you can specify the Helm parameter `--set plugins.installCNI=true` to install IPVlan in your cluster. -> +> > If you are using a cloud server from a Chinese mainland cloud provider, you can enhance image pulling speed by specifying the parameter `--set global.imageRegistryOverride=ghcr.m.daocloud.io`. > > Spiderpool allows for fixed IP addresses for application replicas with a controller type of `StatefulSet`. However, in the underlay network scenario of public clouds, cloud instances are limited to using specific IP addresses. When StatefulSet replicas migrate to different nodes, the original fixed IP becomes invalid and unavailable on the new node, causing network unavailability for the new Pods. To address this issue, set `ipam.enableStatefulSet` to `false` to disable this feature. > -> Specify the Multus clusterNetwork for the cluster using `multus.multusCNI.defaultCniCRName`. `clusterNetwork` is a specific field within the Multus plugin used to define the default network interface for Pods. +> Specify the name of the NetworkAttachmentDefinition instance for the default CNI used by Multus via `multus.multusCNI.defaultCniCRName`. If the `multus.multusCNI.defaultCniCRName` option is provided, an empty NetworkAttachmentDefinition instance will be automatically generated upon installation. Otherwise, Multus will attempt to create a NetworkAttachmentDefinition instance based on the first CNI configuration found in the /etc/cni/net.d directory. If no suitable configuration is found, a NetworkAttachmentDefinition instance named `default` will be created to complete the installation of Multus. ### Install CNI @@ -116,7 +116,7 @@ ipvlan-eth0 10m ipvlan-eth1 10m ``` -### Create IPPools +### Create IP Pools The Spiderpool's CRD, `SpiderIPPool`, introduces the following fields: `nodeName`, `multusName`, and `ips`: diff --git a/docs/usage/install/cloud/get-started-aws-zh_CN.md b/docs/usage/install/cloud/get-started-aws-zh_CN.md index 7f8e4d9f06..ded54cdeb7 100644 --- a/docs/usage/install/cloud/get-started-aws-zh_CN.md +++ b/docs/usage/install/cloud/get-started-aws-zh_CN.md @@ -83,7 +83,7 @@ helm install spiderpool spiderpool/spiderpool --namespace kube-system --set ipam > > - Spiderpool 可以为控制器类型为:`Statefulset` 的应用副本固定 IP 地址。在公有云的 Underlay 网络场景中,云主机只能使用限定的 IP 地址,当 StatefulSet 类型的应用副本漂移到其他节点,但由于原固定的 IP 在其他节点是非法不可用的,新的 Pod 将出现网络不可用的问题。对此场景,将 `ipam.enableStatefulSet` 设置为 `false`,禁用该功能。 > -> - 通过 `multus.multusCNI.defaultCniCRName` 指定 Multus 默认使用的 CNI 的 NetworkAttachmentDefinition 实例名。如果 `multus.multusCNI.defaultCniCRName` 选项不为空,则安装后会自动生成一个数据为空的 NetworkAttachmentDefinition 对应实例。如果 `multus.multusCNI.defaultCniCRName` 选项不为空,会尝试通过 /etc/cni/net.d 目录下的第一个 CNI 配置来创建对应的 NetworkAttachmentDefinition 实例,否则会自动生成一个名为 `default` 的 NetworkAttachmentDefinition 实例,以完成 Multus 的安装。 +> - 通过 `multus.multusCNI.defaultCniCRName` 指定 multus 默认使用的 CNI 的 NetworkAttachmentDefinition 实例名。如果 `multus.multusCNI.defaultCniCRName` 选项不为空,则安装后会自动生成一个数据为空的 NetworkAttachmentDefinition 对应实例。如果 `multus.multusCNI.defaultCniCRName` 选项不为空,会尝试通过 /etc/cni/net.d 目录下的第一个 CNI 配置来创建对应的 NetworkAttachmentDefinition 实例,否则会自动生成一个名为 `default` 的 NetworkAttachmentDefinition 实例,以完成 multus 的安装。 ### 安装 CNI 配置 diff --git a/docs/usage/install/overlay/get-started-calico-zh_cn.md b/docs/usage/install/overlay/get-started-calico-zh_cn.md index e11db2d042..d5c8598bd5 100644 --- a/docs/usage/install/overlay/get-started-calico-zh_cn.md +++ b/docs/usage/install/overlay/get-started-calico-zh_cn.md @@ -20,13 +20,6 @@ ~# kubectl wait --for=condition=ready -l k8s-app=calico-node pod -n kube-system ``` -- 如果你的集群中每个节点 `/opt/cni/bin`下未安装 [cni plugins](https://www.cni.dev/plugins/current/) 。可参考以下的命令安装: - - ```shell - ~# wget https://github.com/containernetworking/plugins/releases/download/v1.3.0/cni-plugins-linux-amd64-v1.3.0.tgz - ~# tar xvfzp ./cni-plugins-linux-amd64-v1.3.0.tgz -C /opt/cni/bin - ``` - - Helm 二进制 ## 安装 Spiderpool @@ -39,8 +32,9 @@ ~# helm install spiderpool spiderpool/spiderpool --namespace kube-system --set coordinator.mode=overlay --wait ``` -> 默认情况下,Spiderpool 会自动安装 Multus 组件, 如果您已经在本地安装了 Multus, 你可以使用以下命令跳过安装 Multus: `helm install spiderpool spiderpool/spiderpool --namespace kube-system --set multus.install=false` -> 需要指定 coordinator 运行在 overlay 模式 +> 如果您的集群未安装 Macvlan CNI, 可指定 Helm 参数 `--set plugins.installCNI=true` 安装 Macvlan 到每个节点。 +> +> 通过 `multus.multusCNI.defaultCniCRName` 指定 multus 默认使用的 CNI 的 NetworkAttachmentDefinition 实例名。如果 `multus.multusCNI.defaultCniCRName` 选项不为空,则安装后会自动生成一个数据为空的 NetworkAttachmentDefinition 对应实例。如果 `multus.multusCNI.defaultCniCRName` 选项不为空,会尝试通过 /etc/cni/net.d 目录下的第一个 CNI 配置来创建对应的 NetworkAttachmentDefinition 实例,否则会自动生成一个名为 `default` 的 NetworkAttachmentDefinition 实例,以完成 multus 的安装。 等待安装完成,查看 Spiderpool 组件状态: diff --git a/docs/usage/install/overlay/get-started-calico.md b/docs/usage/install/overlay/get-started-calico.md index 3b93d19401..0cec5987e7 100644 --- a/docs/usage/install/overlay/get-started-calico.md +++ b/docs/usage/install/overlay/get-started-calico.md @@ -20,12 +20,6 @@ This page showcases the utilization of `Spiderpool`, a comprehensive Underlay ne ~# kubectl wait --for=condition=ready -l k8s-app=calico-node pod -n kube-system ``` -- If the [cni plugins](https://www.cni.dev/plugins/current/) are not installed under `/opt/cni/bin` on each node of your cluster, follow the commands below for installation: - - ```shell - ~# wget https://github.com/containernetworking/plugins/releases/download/v1.3.0/cni-plugins-linux-amd64-v1.3.0.tgz - ~# tar xvfzp ./cni-plugins-linux-amd64-v1.3.0.tgz -C /opt/cni/bin - ``` - Helm binary @@ -39,8 +33,9 @@ Follow the command below to install Spiderpool: ~# helm install spiderpool spiderpool/spiderpool --namespace kube-system --set coordinator.mode=overlay --wait ``` -> By default, Spiderpool automatically installs Multus. However, if Multus has been already installed, you can skip the installation via the following command: `helm install spiderpool spiderpool/spiderpool --namespace kube-system --set multus.install=false` -> It is necessary to specify that the coordinator operates in overlay mode +> If Macvlan CNI is not installed in your cluster, you can install it on each node by using the Helm parameter `--set plugins.installCNI=true`. +> +> Specify the name of the NetworkAttachmentDefinition instance for the default CNI used by Multus via `multus.multusCNI.defaultCniCRName`. If the `multus.multusCNI.defaultCniCRName` option is provided, an empty NetworkAttachmentDefinition instance will be automatically generated upon installation. Otherwise, Multus will attempt to create a NetworkAttachmentDefinition instance based on the first CNI configuration found in the /etc/cni/net.d directory. If no suitable configuration is found, a NetworkAttachmentDefinition instance named `default` will be created to complete the installation of Multus. Check the status of Spiderpool after the installation is complete: diff --git a/docs/usage/install/overlay/get-started-cilium-zh_cn.md b/docs/usage/install/overlay/get-started-cilium-zh_cn.md index caf3ecb363..3fbf7fbc07 100644 --- a/docs/usage/install/overlay/get-started-cilium-zh_cn.md +++ b/docs/usage/install/overlay/get-started-cilium-zh_cn.md @@ -21,13 +21,6 @@ ~# kubectl wait --for=condition=ready -l k8s-app=cilium pod -n kube-system ``` -- 如果你的集群中每个节点 `/opt/cni/bin`下未安装 [cni plugins](https://www.cni.dev/plugins/current/) 。可参考以下的命令安装: - - ```shell - ~# wget https://github.com/containernetworking/plugins/releases/download/v1.3.0/cni-plugins-linux-amd64-v1.3.0.tgz - ~# tar xvfzp ./cni-plugins-linux-amd64-v1.3.0.tgz -C /opt/cni/bin - ``` - - Helm 二进制 ## 安装 Spiderpool @@ -40,8 +33,9 @@ ~# helm install spiderpool spiderpool/spiderpool --namespace kube-system --set coordinator.mode=overlay --wait ``` -> 默认情况下,Spiderpool 会自动安装 Multus 组件, 如果您已经在本地安装了 Multus, 你可以使用以下命令跳过安装 Multus: `helm install spiderpool spiderpool/spiderpool --namespace kube-system --set multus.install=false` -> 需要指定 coordinator 运行在 overlay 模式 +> 如果您的集群未安装 Macvlan CNI, 可指定 Helm 参数 `--set plugins.installCNI=true` 安装 Macvlan 到每个节点。 +> +> 通过 `multus.multusCNI.defaultCniCRName` 指定 multus 默认使用的 CNI 的 NetworkAttachmentDefinition 实例名。如果 `multus.multusCNI.defaultCniCRName` 选项不为空,则安装后会自动生成一个数据为空的 NetworkAttachmentDefinition 对应实例。如果 `multus.multusCNI.defaultCniCRName` 选项不为空,会尝试通过 /etc/cni/net.d 目录下的第一个 CNI 配置来创建对应的 NetworkAttachmentDefinition 实例,否则会自动生成一个名为 `default` 的 NetworkAttachmentDefinition 实例,以完成 multus 的安装。 等待安装完成,查看 Spiderpool 组件状态: diff --git a/docs/usage/install/overlay/get-started-cilium.md b/docs/usage/install/overlay/get-started-cilium.md index 07f1015244..e1d171c3e6 100644 --- a/docs/usage/install/overlay/get-started-cilium.md +++ b/docs/usage/install/overlay/get-started-cilium.md @@ -21,13 +21,6 @@ This page showcases the utilization of `Spiderpool`, a comprehensive Underlay ne ~# kubectl wait --for=condition=ready -l k8s-app=cilium pod -n kube-system ``` -- If the [cni plugins](https://www.cni.dev/plugins/current/) are not installed under `/opt/cni/bin` on each node of your cluster, follow the commands below for installation: - - ```shell - ~# wget https://github.com/containernetworking/plugins/releases/download/v1.3.0/cni-plugins-linux-amd64-v1.3.0.tgz - ~# tar xvfzp ./cni-plugins-linux-amd64-v1.3.0.tgz -C /opt/cni/bin - ``` - - Helm binary ## Install Spiderpool @@ -40,8 +33,9 @@ Follow the command below to install Spiderpool: ~# helm install spiderpool spiderpool/spiderpool --namespace kube-system --set coordinator.mode=overlay --wait ``` -> By default, Spiderpool automatically installs Multus. However, if Multus has been already installed, you can skip the installation via the following command: `helm install spiderpool spiderpool/spiderpool --namespace kube-system --set multus.install=false` -> It is necessary to specify that coordinator operates in overlay mode +> If Macvlan CNI is not installed in your cluster, you can install it on each node by using the Helm parameter `--set plugins.installCNI=true`. +> +> Specify the name of the NetworkAttachmentDefinition instance for the default CNI used by Multus via `multus.multusCNI.defaultCniCRName`. If the `multus.multusCNI.defaultCniCRName` option is provided, an empty NetworkAttachmentDefinition instance will be automatically generated upon installation. Otherwise, Multus will attempt to create a NetworkAttachmentDefinition instance based on the first CNI configuration found in the /etc/cni/net.d directory. If no suitable configuration is found, a NetworkAttachmentDefinition instance named `default` will be created to complete the installation of Multus. Check the status of Spiderpool after the installation is complete: diff --git a/docs/usage/install/underlay/get-started-calico-zh_CN.md b/docs/usage/install/underlay/get-started-calico-zh_CN.md index c6f6845f74..cfee855f22 100644 --- a/docs/usage/install/underlay/get-started-calico-zh_CN.md +++ b/docs/usage/install/underlay/get-started-calico-zh_CN.md @@ -29,6 +29,8 @@ helm install spiderpool spiderpool/spiderpool --namespace kube-system --set mult ``` > 如果您是国内用户,可以指定参数 `--set global.imageRegistryOverride=ghcr.m.daocloud.io` 避免 Spiderpool 的镜像拉取失败。 +> +> 通过 `multus.multusCNI.defaultCniCRName` 指定 multus 默认使用的 CNI 的 NetworkAttachmentDefinition 实例名。如果 `multus.multusCNI.defaultCniCRName` 选项不为空,则安装后会自动生成一个数据为空的 NetworkAttachmentDefinition 对应实例。如果 `multus.multusCNI.defaultCniCRName` 选项不为空,会尝试通过 /etc/cni/net.d 目录下的第一个 CNI 配置来创建对应的 NetworkAttachmentDefinition 实例,否则会自动生成一个名为 `default` 的 NetworkAttachmentDefinition 实例,以完成 multus 的安装。 创建 Pod 使用的 SpiderIPPool 实例: diff --git a/docs/usage/install/underlay/get-started-calico.md b/docs/usage/install/underlay/get-started-calico.md index 49d8e1739d..7ad73dc871 100644 --- a/docs/usage/install/underlay/get-started-calico.md +++ b/docs/usage/install/underlay/get-started-calico.md @@ -29,6 +29,8 @@ helm install spiderpool spiderpool/spiderpool --namespace kube-system --set mult ``` > If you are mainland user who is not available to access ghcr.io,You can specify the parameter `-set global.imageRegistryOverride=ghcr.m.daocloud.io` to avoid image pulling failures for Spiderpool. +> +> Specify the name of the NetworkAttachmentDefinition instance for the default CNI used by Multus via `multus.multusCNI.defaultCniCRName`. If the `multus.multusCNI.defaultCniCRName` option is provided, an empty NetworkAttachmentDefinition instance will be automatically generated upon installation. Otherwise, Multus will attempt to create a NetworkAttachmentDefinition instance based on the first CNI configuration found in the /etc/cni/net.d directory. If no suitable configuration is found, a NetworkAttachmentDefinition instance named `default` will be created to complete the installation of Multus. Create the SpiderIPPool instance used by the Pod: diff --git a/docs/usage/install/underlay/get-started-macvlan-zh_CN.md b/docs/usage/install/underlay/get-started-macvlan-zh_CN.md index 61cda8bd4a..5de4fffc0e 100644 --- a/docs/usage/install/underlay/get-started-macvlan-zh_CN.md +++ b/docs/usage/install/underlay/get-started-macvlan-zh_CN.md @@ -32,7 +32,7 @@ Spiderpool 可用作 Underlay 网络场景下提供固定 IP 的一种解决方 > > 如果您是国内用户,可以指定参数 `--set global.imageRegistryOverride=ghcr.m.daocloud.io` 避免 Spiderpool 的镜像拉取失败。 > - > 通过 `multus.multusCNI.defaultCniCRName` 指定集群的 Multus clusterNetwork,clusterNetwork 是 Multus 插件的一个特定字段,用于指定 Pod 的默认网络接口。 + > 通过 `multus.multusCNI.defaultCniCRName` 指定 multus 默认使用的 CNI 的 NetworkAttachmentDefinition 实例名。如果 `multus.multusCNI.defaultCniCRName` 选项不为空,则安装后会自动生成一个数据为空的 NetworkAttachmentDefinition 对应实例。如果 `multus.multusCNI.defaultCniCRName` 选项不为空,会尝试通过 /etc/cni/net.d 目录下的第一个 CNI 配置来创建对应的 NetworkAttachmentDefinition 实例,否则会自动生成一个名为 `default` 的 NetworkAttachmentDefinition 实例,以完成 multus 的安装。 2. 创建 SpiderIPPool 实例。 diff --git a/docs/usage/install/underlay/get-started-macvlan.md b/docs/usage/install/underlay/get-started-macvlan.md index 82c1c37d4b..5cac8025ca 100644 --- a/docs/usage/install/underlay/get-started-macvlan.md +++ b/docs/usage/install/underlay/get-started-macvlan.md @@ -30,7 +30,7 @@ Spiderpool provides a solution for assigning static IP addresses in underlay net > > If you are mainland user who is not available to access ghcr.io,You can specify the parameter `-set global.imageRegistryOverride=ghcr.m.daocloud.io` to avoid image pulling failures for Spiderpool. > - > Specify the Multus clusterNetwork of the cluster through `multus.multusCNI.defaultCniCRName`, clusterNetwork is a specific field of the Multus plugin, which is used to specify the default network interface of the Pod. + > Specify the name of the NetworkAttachmentDefinition instance for the default CNI used by Multus via `multus.multusCNI.defaultCniCRName`. If the `multus.multusCNI.defaultCniCRName` option is provided, an empty NetworkAttachmentDefinition instance will be automatically generated upon installation. Otherwise, Multus will attempt to create a NetworkAttachmentDefinition instance based on the first CNI configuration found in the /etc/cni/net.d directory. If no suitable configuration is found, a NetworkAttachmentDefinition instance named `default` will be created to complete the installation of Multus. 2. Create a SpiderIPPool instance. diff --git a/docs/usage/install/underlay/get-started-ovs-zh_CN.md b/docs/usage/install/underlay/get-started-ovs-zh_CN.md index d3fbd3c31d..d7dce51089 100644 --- a/docs/usage/install/underlay/get-started-ovs-zh_CN.md +++ b/docs/usage/install/underlay/get-started-ovs-zh_CN.md @@ -4,6 +4,8 @@ Spiderpool 可用作 Underlay 网络场景下提供固定 IP 的一种解决方案,本文将以 [Multus](https://github.com/k8snetworkplumbingwg/multus-cni)、[Ovs-cni](https://github.com/k8snetworkplumbingwg/ovs-cni) 、[Spiderpool](https://github.com/spidernet-io/spiderpool) 为例,搭建一套完整的 Underlay 网络解决方案,该方案能将可用的网桥公开为节点资源,供集群使用。 +[`ovs-cni`](https://github.com/k8snetworkplumbingwg/ovs-cni) 是一个基于 Open vSwitch(OVS)的 Kubernetes CNI 插件,它提供了一种在 Kubernetes 集群中使用 OVS 进行网络虚拟化的方式。 + ## 先决条件 1. 一个多节点的 Kubernetes 集群 @@ -19,36 +21,37 @@ Spiderpool 可用作 Underlay 网络场景下提供固定 IP 的一种解决方 ~# sudo systemctl start openvswitch-switch ``` -## 安装 Ovs-cni - -[`ovs-cni`](https://github.com/k8snetworkplumbingwg/ovs-cni) 是一个基于 Open vSwitch(OVS)的 Kubernetes CNI 插件,它提供了一种在 Kubernetes 集群中使用 OVS 进行网络虚拟化的方式。 - -确认节点上是否存在二进制文件 /opt/cni/bin/ovs 。如果节点上不存在该二进制文件,可在安装 Spiderpool 时通过指定 Helm 参数安装: - -```bash -helm install spiderpool spiderpool/spiderpool --namespace kube-system --set plugins.installOvsCNI=true -``` - -Ovs-cni 不会配置网桥,由用户创建它们,并将它们连接到 L2、L3 网络。以下是创建网桥的示例,请在每个节点上执行: +## 安装 Spiderpool -1. 创建 Open vSwitch 网桥。 +1. 安装 Spiderpool。 ```bash - ~# ovs-vsctl add-br br1 + helm repo add spiderpool https://spidernet-io.github.io/spiderpool + helm repo update spiderpool + helm install spiderpool spiderpool/spiderpool --namespace kube-system --set multus.multusCNI.defaultCniCRName="ovs-conf" --set plugins.installOvsCNI=true ``` -2. 网络接口连接到网桥 + > 如果未安装 ovs-cni, 可以通过 Helm 参数 '-set plugins.installOvsCNI=true' 安装它。 + > + > 如果您是国内用户,可以指定参数 `--set global.imageRegistryOverride=ghcr.m.daocloud.io` 以帮助您快速的拉取镜像。 + > + > 通过 `multus.multusCNI.defaultCniCRName` 指定 multus 默认使用的 CNI 的 NetworkAttachmentDefinition 实例名。如果 `multus.multusCNI.defaultCniCRName` 选项不为空,则安装后会自动生成一个数据为空的 NetworkAttachmentDefinition 对应实例。如果 `multus.multusCNI.defaultCniCRName` 选项不为空,会尝试通过 /etc/cni/net.d 目录下的第一个 CNI 配置来创建对应的 NetworkAttachmentDefinition 实例,否则会自动生成一个名为 `default` 的 NetworkAttachmentDefinition 实例,以完成 multus 的安装。 + +2. 在每个节点上配置 Open vSwitch 网桥。 - 此过程取决于您的平台,以下命令只是示例说明,它可能会破坏您的系统。首先使用 `ip link show` 查询主机的可用接口,示例中使用主机上的接口:`eth0` 为例。 + 创建网桥并配置网桥,以 `eth0` 为例。 ```bash + ~# ovs-vsctl add-br br1 ~# ovs-vsctl add-port br1 eth0 ~# ip addr add /<子网掩码> dev br1 ~# ip link set br1 up ~# ip route add default via <默认网关IP> dev br1 ``` -3. 创建后,可以在每个节点上查看到如下的网桥信息: + 请把以上命令配置在系统行动脚本中,以在主机重启时能够生效 + + 创建后,可以在每个节点上查看到如下的网桥信息: ```bash ~# ovs-vsctl show @@ -64,22 +67,7 @@ Ovs-cni 不会配置网桥,由用户创建它们,并将它们连接到 L2、 ovs_version: "2.17.3" ``` -## 安装 Spiderpool - -1. 安装 Spiderpool。 - - ```bash - helm repo add spiderpool https://spidernet-io.github.io/spiderpool - helm repo update spiderpool - helm install spiderpool spiderpool/spiderpool --namespace kube-system --set multus.multusCNI.defaultCniCRName="ovs-conf" --set plugins.installOvsCNI=true - ``` - - > 如果未安装 ovs-cni, 可以通过 Helm 参数 '-set plugins.installOvsCNI=true' 安装它。 - > 如果您是国内用户,可以指定参数 `--set global.imageRegistryOverride=ghcr.m.daocloud.io` 以帮助您快速的拉取镜像。 - > - > 通过 `multus.multusCNI.defaultCniCRName` 指定集群的 Multus clusterNetwork,clusterNetwork 是 Multus 插件的一个特定字段,用于指定 Pod 的默认网络接口。 - -2. 创建 SpiderIPPool 实例。 +3. 创建 SpiderIPPool 实例。 Pod 会从该 IP 池中获取 IP,进行 Underlay 的网络通讯,所以该 IP 池的子网需要与接入的 Underlay 子网对应。以下是创建相关的 SpiderIPPool 示例: @@ -100,7 +88,7 @@ Ovs-cni 不会配置网桥,由用户创建它们,并将它们连接到 L2、 EOF ``` -3. 验证安装: +4. 验证安装: ```bash ~# kubectl get po -n kube-system |grep spiderpool @@ -115,7 +103,7 @@ Ovs-cni 不会配置网桥,由用户创建它们,并将它们连接到 L2、 ~# ``` -4. Spiderpool 为简化书写 JSON 格式的 Multus CNI 配置,它提供了 SpiderMultusConfig CR 来自动管理 Multus NetworkAttachmentDefinition CR。如下是创建 Ovs SpiderMultusConfig 配置的示例: +5. Spiderpool 为简化书写 JSON 格式的 Multus CNI 配置,它提供了 SpiderMultusConfig CR 来自动管理 Multus NetworkAttachmentDefinition CR。如下是创建 Ovs SpiderMultusConfig 配置的示例: * 确认 ovs-cni 所需的网桥名称,本例子以 br1 为例: diff --git a/docs/usage/install/underlay/get-started-ovs.md b/docs/usage/install/underlay/get-started-ovs.md index 2a7dd5d641..3eafe10ece 100644 --- a/docs/usage/install/underlay/get-started-ovs.md +++ b/docs/usage/install/underlay/get-started-ovs.md @@ -4,6 +4,8 @@ Spiderpool can be used as a solution to provide fixed IPs in an Underlay network scenario, and this article will use [Multus](https://github.com/k8snetworkplumbingwg/multus-cni), [Ovs-cni](https://github.com/k8snetworkplumbingwg/ovs-cni), and [Spiderpool](https://github.com/spidernet-io/spiderpool) as examples to build a complete Underlay network solution that exposes the available bridges as node resources for use by the cluster. +[`ovs-cni`](https://github.com/k8snetworkplumbingwg/ovs-cni) is a Kubernetes CNI plugin that utilizes Open vSwitch (OVS) to enable network virtualization within a Kubernetes cluster. + ## Prerequisites 1. Make sure a multi-node Kubernetes cluster is ready. @@ -19,36 +21,37 @@ Spiderpool can be used as a solution to provide fixed IPs in an Underlay network ~# sudo systemctl start openvswitch-switch ``` -## Install Ovs-cni - -[`ovs-cni`](https://github.com/k8snetworkplumbingwg/ovs-cni) is a Kubernetes CNI plugin based on Open vSwitch (OVS) that provides a way to use OVS for network virtualization in a Kubernetes cluster in a Kubernetes cluster. - -Verify that the binary /opt/cni/bin/ovs exists on the node. if the binary is missing, you can install it on all nodes by using the following command when you installing spiderpool: - -```bash -helm install spiderpool spiderpool/spiderpool --namespace kube-system --set plugins.installOvsCNI=true -``` - -Note: Ovs-cni does not configure bridges, it is up to the user to create them and connect them to L2, L3, The following is an example of creating a bridge, to be executed on each node: +## Install Spiderpool -1. Create an Open vSwitch bridge. +1. Install Spiderpool. ```bash - ~# ovs-vsctl add-br br1 + helm repo add spiderpool https://spidernet-io.github.io/spiderpool + helm repo update spiderpool + helm install spiderpool spiderpool/spiderpool --namespace kube-system --set multus.multusCNI.defaultCniCRName="ovs-conf" --set plugins.installOvsCNI=true ``` -2. Network interface connected to the bridge: + > If ovs-cni is not installed, you can install it by specifying the Helm parameter `--set plugins.installOvsCNI=true`. + > + > If you are mainland user who is not available to access ghcr.io,You can specify the parameter `-set global.imageRegistryOverride=ghcr.m.daocloud.io` to avoid image pulling failures for Spiderpool. + > + > Specify the name of the NetworkAttachmentDefinition instance for the default CNI used by Multus via `multus.multusCNI.defaultCniCRName`. If the `multus.multusCNI.defaultCniCRName` option is provided, an empty NetworkAttachmentDefinition instance will be automatically generated upon installation. Otherwise, Multus will attempt to create a NetworkAttachmentDefinition instance based on the first CNI configuration found in the /etc/cni/net.d directory. If no suitable configuration is found, a NetworkAttachmentDefinition instance named `default` will be created to complete the installation of Multus. + +2. To configure Open vSwitch bridges on each node: - This procedure depends on your platform, the following commands are only example instructions and it may break your system. First use `ip link show` to query the host for available interfaces, the example uses the interface on the host: `eth0` as an example. + Create a bridge and configure it using `eth0`` as an example. ```bash + ~# ovs-vsctl add-br br1 ~# ovs-vsctl add-port br1 eth0 - ~# ip addr add /<子网掩码> dev br1 + ~# ip addr add / dev br1 ~# ip link set br1 up - ~# ip route add default via <默认网关IP> dev br1 + ~# ip route add default via dev br1 ``` -3. Once created, the following bridge information can be viewed on each node: + Pleade include these commands in your system startup script to ensure they take effect after host restarts. + + After creating the bridge, you will be able to view its information on each node: ```bash ~# ovs-vsctl show @@ -64,25 +67,9 @@ Note: Ovs-cni does not configure bridges, it is up to the user to create them an ovs_version: "2.17.3" ``` -## Install Spiderpool - -1. Install Spiderpool - - ```bash - helm repo add spiderpool https://spidernet-io.github.io/spiderpool - helm repo update spiderpool - helm install spiderpool spiderpool/spiderpool --namespace kube-system --set multus.multusCNI.defaultCniCRName="ovs-conf" --set plugins.installOvsCNI=true - ``` - - > If Ovs-cni is not installed in your cluster, you can specify the Helm parameter `--set plugins.installOvsCNI=true` to install Macvlan in your cluster. - > - > If you are mainland user who is not available to access ghcr.io,You can specify the parameter `-set global.imageRegistryOverride=ghcr.m.daocloud.io` to avoid image pulling failures for Spiderpool. - > - > Specify the Multus clusterNetwork of the cluster through `multus.multusCNI.defaultCniCRName`, clusterNetwork is a specific field of the Multus plugin, which is used to specify the default network interface of the Pod. - -2. Create a SpiderIPPool instance. +3. Create a SpiderIPPool instance. - The Pod will obtain an IP address from the IPPool for underlying network communication, so the subnet of the IPPool needs to correspond to the underlying subnet being accessed. + The Pod will obtain an IP address from the IP pool for underlying network communication, so the subnet of the IP pool needs to correspond to the underlying subnet being accessed. Here is an example of creating a SpiderSubnet instance: @@ -103,7 +90,7 @@ Note: Ovs-cni does not configure bridges, it is up to the user to create them an EOF ``` -3. Verify the installation: +4. Verify the installation: ```bash ~# kubectl get po -n kube-system |grep spiderpool @@ -118,9 +105,9 @@ Note: Ovs-cni does not configure bridges, it is up to the user to create them an ~# ``` -4. To simplify writing Multus CNI configuration in JSON format, Spiderpool provides SpiderMultusConfig CR to automatically manage Multus NetworkAttachmentDefinition CR. Here is an example of creating an ovs-cni SpiderMultusConfig configuration: +5. To simplify writing Multus CNI configuration in JSON format, Spiderpool provides SpiderMultusConfig CR to automatically manage Multus NetworkAttachmentDefinition CR. Here is an example of creating an ovs-cni SpiderMultusConfig configuration: - * Confirm the required host bridge for ovs-cni, for example based on the command `ovs-vsctl show`, this example takes the host bridge: `br1` as an example. + * Confirm the bridge name for ovs-cni. Take the host bridge: `br1` as an example: ```shell BRIDGE_NAME="br1" @@ -137,7 +124,7 @@ Note: Ovs-cni does not configure bridges, it is up to the user to create them an EOF ``` -## Create applications +## Create Applications In the following example Yaml, 2 copies of the Deployment are created, of which: diff --git a/docs/usage/install/underlay/get-started-sriov-zh_CN.md b/docs/usage/install/underlay/get-started-sriov-zh_CN.md index 9ddfccbbde..e5fbc1f4a6 100644 --- a/docs/usage/install/underlay/get-started-sriov-zh_CN.md +++ b/docs/usage/install/underlay/get-started-sriov-zh_CN.md @@ -37,11 +37,14 @@ Spiderpool 可用作 underlay 网络场景下提供固定 IP 的一种解决方 ```shell helm repo add spiderpool https://spidernet-io.github.io/spiderpool helm repo update spiderpool - helm install spiderpool spiderpool/spiderpool --namespace kube-system --set sriov.install=true + helm install spiderpool spiderpool/spiderpool --namespace kube-system --set sriov.install=true --set multus.multusCNI.defaultCniCRName="sriov-test" ``` > 带上 helm 选项 ` --set sriov.install=true `, 会安装 [sriov-network-operator](https://github.com/k8snetworkplumbingwg/sriov-network-operator),resourcePrefix 默认为 "spidernet.io",可通过 helm 选项 ` --set sriov.resourcePrefix ` 修改 + > > 如果您是国内用户,可以指定参数 ` --set global.imageRegistryOverride=ghcr.m.daocloud.io ` 避免 Spiderpool 的镜像拉取失败。 + > + > 通过 `multus.multusCNI.defaultCniCRName` 指定 multus 默认使用的 CNI 的 NetworkAttachmentDefinition 实例名。如果 `multus.multusCNI.defaultCniCRName` 选项不为空,则安装后会自动生成一个数据为空的 NetworkAttachmentDefinition 对应实例。如果 `multus.multusCNI.defaultCniCRName` 选项不为空,会尝试通过 /etc/cni/net.d 目录下的第一个 CNI 配置来创建对应的 NetworkAttachmentDefinition 实例,否则会自动生成一个名为 `default` 的 NetworkAttachmentDefinition 实例,以完成 multus 的安装。 2. 给希望运行 SR-IOV CNI 的节点,按照如下命令打上 label,这样,sriov-network-operator 才会在指定的节点上安装组件 diff --git a/docs/usage/install/underlay/get-started-sriov.md b/docs/usage/install/underlay/get-started-sriov.md index 8a3f5757b8..510ab9e0e2 100644 --- a/docs/usage/install/underlay/get-started-sriov.md +++ b/docs/usage/install/underlay/get-started-sriov.md @@ -37,11 +37,14 @@ Spiderpool provides a solution for assigning static IP addresses in underlay net ```shell helm repo add spiderpool https://spidernet-io.github.io/spiderpool helm repo update spiderpool - helm install spiderpool spiderpool/spiderpool --namespace kube-system --set sriov.install=true + helm install spiderpool spiderpool/spiderpool --namespace kube-system --set sriov.install=true --set multus.multusCNI.defaultCniCRName="sriov-test" ``` > When using the helm option `--set sriov.install=true`, it will install the [sriov-network-operator](https://github.com/k8snetworkplumbingwg/sriov-network-operator). The default value for resourcePrefix is "spidernet.io" which can be modified via the helm option `--set sriov.resourcePrefix`. + > > For users in the Chinese mainland, it is recommended to specify the spec `--set global.imageRegistryOverride=ghcr.m.daocloud.io` to avoid image pull failures from Spiderpool. + > + > Specify the name of the NetworkAttachmentDefinition instance for the default CNI used by Multus via `multus.multusCNI.defaultCniCRName`. If the `multus.multusCNI.defaultCniCRName` option is provided, an empty NetworkAttachmentDefinition instance will be automatically generated upon installation. Otherwise, Multus will attempt to create a NetworkAttachmentDefinition instance based on the first CNI configuration found in the /etc/cni/net.d directory. If no suitable configuration is found, a NetworkAttachmentDefinition instance named `default` will be created to complete the installation of Multus. 2. To enable the SR-IOV CNI on specific nodes, you need to apply the following command to label those nodes. This will allow the sriov-network-operator to install the components on the designated nodes. diff --git a/docs/usage/install/underlay/get-started-weave-zh_CN.md b/docs/usage/install/underlay/get-started-weave-zh_CN.md index 6268d8fe9a..69e9c1fde2 100644 --- a/docs/usage/install/underlay/get-started-weave-zh_CN.md +++ b/docs/usage/install/underlay/get-started-weave-zh_CN.md @@ -34,6 +34,8 @@ ``` > 如果您是国内用户,可以指定参数 `--set global.imageRegistryOverride=ghcr.m.daocloud.io` 避免 Spiderpool 的镜像拉取失败。 + > + > 通过 `multus.multusCNI.defaultCniCRName` 指定 multus 默认使用的 CNI 的 NetworkAttachmentDefinition 实例名。如果 `multus.multusCNI.defaultCniCRName` 选项不为空,则安装后会自动生成一个数据为空的 NetworkAttachmentDefinition 对应实例。如果 `multus.multusCNI.defaultCniCRName` 选项不为空,会尝试通过 /etc/cni/net.d 目录下的第一个 CNI 配置来创建对应的 NetworkAttachmentDefinition 实例,否则会自动生成一个名为 `default` 的 NetworkAttachmentDefinition 实例,以完成 multus 的安装。 等待 Pod Running, 创建 Pod 所使用的 IP 池: diff --git a/docs/usage/install/underlay/get-started-weave.md b/docs/usage/install/underlay/get-started-weave.md index 569fb5a257..8b29c82c03 100644 --- a/docs/usage/install/underlay/get-started-weave.md +++ b/docs/usage/install/underlay/get-started-weave.md @@ -34,6 +34,8 @@ ``` > If you are mainland user who is not available to access ghcr.io,You can specify the parameter `-set global.imageRegistryOverride=ghcr.m.daocloud.io` to avoid image pulling failures for Spiderpool. + > + > Specify the name of the NetworkAttachmentDefinition instance for the default CNI used by Multus via `multus.multusCNI.defaultCniCRName`. If the `multus.multusCNI.defaultCniCRName` option is provided, an empty NetworkAttachmentDefinition instance will be automatically generated upon installation. Otherwise, Multus will attempt to create a NetworkAttachmentDefinition instance based on the first CNI configuration found in the /etc/cni/net.d directory. If no suitable configuration is found, a NetworkAttachmentDefinition instance named `default` will be created to complete the installation of Multus. Wait for Pod Running and create the IPPool used by Pod: diff --git a/docs/usage/kubevirt-zh_CN.md b/docs/usage/kubevirt-zh_CN.md index 0c719baa98..fd63699ab5 100644 --- a/docs/usage/kubevirt-zh_CN.md +++ b/docs/usage/kubevirt-zh_CN.md @@ -46,7 +46,8 @@ Kubevirt VM 会在以下一些场景中会出现固定地址的使用: ### 安装 Spiderpool -请参考 [Macvlan Quick Start](./install/underlay/get-started-macvlan-zh_CN.md) +请参考 [Macvlan Quick Start](./install/underlay/get-started-macvlan-zh_CN.md) 安装 Spiderpool. 其中,可确保 helm 安装选项 `ipam.enableKubevirtStaticIP=true` + ### 创建 Kubevirt VM 应用 diff --git a/docs/usage/network-topology-zh_CN.md b/docs/usage/network-topology-zh_CN.md index 83f84181cb..c9d0ce4feb 100644 --- a/docs/usage/network-topology-zh_CN.md +++ b/docs/usage/network-topology-zh_CN.md @@ -53,9 +53,11 @@ helm repo update spiderpool helm install spiderpool spiderpool/spiderpool --namespace kube-system --set multus.multusCNI.defaultCniCRName="macvlan-conf" ``` -> 如果您使用的是中国大陆的云厂商服务器,可以指定参数 `--set global.imageRegistryOverride=ghcr.m.daocloud.io` ,以帮助您更快的拉取镜像。 +> - 如果您使用的是中国大陆的云厂商服务器,可以指定参数 `--set global.imageRegistryOverride=ghcr.m.daocloud.io` ,以帮助您更快的拉取镜像。 > -> 通过 `multus.multusCNI.defaultCniCRName` 指定集群的 Multus clusterNetwork,clusterNetwork 是 Multus 插件的一个特定字段,用于指定 Pod 的默认网络接口。 +> - 如果您的集群未安装 Macvlan CNI, 可指定 Helm 参数 `--set plugins.installCNI=true` 安装 Macvlan 到每个节点。 +> +> - 通过 `multus.multusCNI.defaultCniCRName` 指定 multus 默认使用的 CNI 的 NetworkAttachmentDefinition 实例名。如果 `multus.multusCNI.defaultCniCRName` 选项不为空,则安装后会自动生成一个数据为空的 NetworkAttachmentDefinition 对应实例。如果 `multus.multusCNI.defaultCniCRName` 选项不为空,会尝试通过 /etc/cni/net.d 目录下的第一个 CNI 配置来创建对应的 NetworkAttachmentDefinition 实例,否则会自动生成一个名为 `default` 的 NetworkAttachmentDefinition 实例,以完成 multus 的安装。 - 检查安装完成 diff --git a/docs/usage/network-topology.md b/docs/usage/network-topology.md index a2d62844c4..540d0fed49 100644 --- a/docs/usage/network-topology.md +++ b/docs/usage/network-topology.md @@ -58,9 +58,11 @@ helm repo update spiderpool helm install spiderpool spiderpool/spiderpool --namespace kube-system --set multus.multusCNI.defaultCniCRName="macvlan-conf" ``` -> If you are mainland user who is not available to access ghcr.io,You can specify the parameter `-set global.imageRegistryOverride=ghcr.m.daocloud.io` to avoid image pulling failures for Spiderpool. +> If you are using a cloud server from a Chinese mainland cloud provider, you can enhance image pulling speed by specifying the parameter `--set global.imageRegistryOverride=ghcr.m.daocloud.io`. > -> Specify the Multus clusterNetwork of the cluster through `multus.multusCNI.defaultCniCRName`, clusterNetwork is a specific field of the Multus plugin, which is used to specify the default network interface of the Pod. +> If Macvlan CNI is not installed in your cluster, you can install it on each node by using the Helm parameter `--set plugins.installCNI=true`. +> +> Specify the name of the NetworkAttachmentDefinition instance for the default CNI used by Multus via `multus.multusCNI.defaultCniCRName`. If the `multus.multusCNI.defaultCniCRName` option is provided, an empty NetworkAttachmentDefinition instance will be automatically generated upon installation. Otherwise, Multus will attempt to create a NetworkAttachmentDefinition instance based on the first CNI configuration found in the /etc/cni/net.d directory. If no suitable configuration is found, a NetworkAttachmentDefinition instance named `default` will be created to complete the installation of Multus. Verify the installation: diff --git a/docs/usage/rdma-zh_CN.md b/docs/usage/rdma-zh_CN.md index 885076e525..890fc3abbe 100644 --- a/docs/usage/rdma-zh_CN.md +++ b/docs/usage/rdma-zh_CN.md @@ -43,24 +43,24 @@ RDMA 网卡,也可以基于 SR-IOV CNI 来使用 exclusive 模式的网卡。 af:00.0 Ethernet controller [0200]: Mellanox Technologies MT27800 Family [ConnectX-5] [15b3:1017] af:00.1 Ethernet controller [0200]: Mellanox Technologies MT27800 Family [ConnectX-5] [15b3:1017] -3. 可参考 [安装](./install/underlay/get-started-macvlan-zh_CN.md) 安装 Spiderpool 并配置 sriov-network-operator。其中,安装命令务必加上如下 helm 选项以安装 [RDMA shared device plugin](https://github.com/Mellanox/k8s-rdma-shared-dev-plugin): +3. 安装 Spiderpool 并配置 sriov-network-operator: helm install spiderpool spiderpool/spiderpool -n kube-system \ - --set multus.multusCNI.defaultCniCRName="macvlan-conf" \ + --set multus.multusCNI.defaultCniCRName="macvlan-ens6f0np0" \ --set rdma.rdmaSharedDevicePlugin.install=true \ --set rdma.rdmaSharedDevicePlugin.deviceConfig.resourcePrefix="spidernet.io" \ --set rdma.rdmaSharedDevicePlugin.deviceConfig.resourceName="hca_shared_devices" \ --set rdma.rdmaSharedDevicePlugin.deviceConfig.rdmaHcaMax=500 \ --set rdma.rdmaSharedDevicePlugin.deviceConfig.vendors="15b3" \ --set rdma.rdmaSharedDevicePlugin.deviceConfig.deviceIDs="1017" - - > 如果您的集群未安装 Macvlan CNI, 可指定 Helm 参数 `--set plugins.installCNI=true` 安装 Macvlan 到每个节点。 - > - > 如果您的集群未安装 Rdma CNI, 可指定 Helm 参数 `--set plugins.installRdmaCNI=true` 安装 rdma 到每个节点。 - > - > 如果您是国内用户,可以指定参数 `--set global.imageRegistryOverride=ghcr.m.daocloud.io` 避免 Spiderpool 的镜像拉取失败。 + + > - 如果您的集群未安装 Macvlan CNI, 可指定 Helm 参数 `--set plugins.installCNI=true` 安装 Macvlan 到每个节点。 + > + > - 如果您是国内用户,可以指定参数 `--set global.imageRegistryOverride=ghcr.m.daocloud.io` 避免 Spiderpool 的镜像拉取失败。 + > + > - 完成 Spiderpool 安装后,可以手动编辑 configmap spiderpool-rdma-shared-device-plugin 来重新配置 RDMA shared device plugin。 > - > 完成 Spiderpool 安装后,可以手动编辑 configmap spiderpool-rdma-shared-device-plugin 来重新配置 RDMA shared device plugin。 + > - 通过 `multus.multusCNI.defaultCniCRName` 指定 multus 默认使用的 CNI 的 NetworkAttachmentDefinition 实例名。如果 `multus.multusCNI.defaultCniCRName` 选项不为空,则安装后会自动生成一个数据为空的 NetworkAttachmentDefinition 对应实例。如果 `multus.multusCNI.defaultCniCRName` 选项不为空,会尝试通过 /etc/cni/net.d 目录下的第一个 CNI 配置来创建对应的 NetworkAttachmentDefinition 实例,否则会自动生成一个名为 `default` 的 NetworkAttachmentDefinition 实例,以完成 multus 的安装。 完成后,安装的组件如下 @@ -90,11 +90,11 @@ RDMA 网卡,也可以基于 SR-IOV CNI 来使用 exclusive 模式的网卡。 ] > 如果上报的资源数为 0,可能的原因: - > + > > (1) 请确认 configmap spiderpool-rdma-shared-device-plugin 中的 vendors 和 deviceID 与实际相符 - > + > > (2) 查看 rdma-shared-device-plugin 的日志,对于支持 RDMA 网卡报错如下日志,可尝试在主机上安装 apt-get install rdma-core 或 dnf install rdma-core - > + > > `error creating new device: "missing RDMA device spec for device 0000:04:00.0, RDMA device \"issm\" not found"` 5. 基于 RDMA 网卡作为 master 节点,创建 macvlan 相关的 multus 配置,并创建配套的 ippool 资源 @@ -220,11 +220,11 @@ RDMA 网卡,也可以基于 SR-IOV CNI 来使用 exclusive 模式的网卡。 本示例环境中,宿主机上具备 RoCE 功能的 mellanox ConnectX 5 网卡,可按照 [NVIDIA 官方指导](https://developer.nvidia.com/networking/ethernet-software) 安装最新的 OFED 驱动。 > 要隔离使用 RDMA 网卡,务必满足如下其中一个条件: - > + > > (1) 内核版本要求 5.3.0 或更高版本,并在系统中加载 RDMA 模块。rdma-core 软件包提供了在系统启动时自动加载相关模块的功能。 - > + > > (2) Mellanox OFED 要求 4.7 或更高版本。此时不需要使用 5.3.0 或更新版本的内核。 - + 使用如下命令,可查询到 RDMA 设备: ~# rdma link show @@ -242,7 +242,7 @@ RDMA 网卡,也可以基于 SR-IOV CNI 来使用 exclusive 模式的网卡。 netns exclusive copy-on-fork on 确认网卡具备 SR-IOV 功能,查看支持的最大 VF 数量: - + ~# cat /sys/class/net/ens6f0np0/device/sriov_totalvfs 127 @@ -256,15 +256,18 @@ RDMA 网卡,也可以基于 SR-IOV CNI 来使用 exclusive 模式的网卡。 af:00.0 Ethernet controller [0200]: Mellanox Technologies MT27800 Family [ConnectX-5] [15b3:1017] af:00.1 Ethernet controller [0200]: Mellanox Technologies MT27800 Family [ConnectX-5] [15b3:1017] -3. 可参考 [安装](./install/underlay/get-started-sriov-zh_CN.md) 安装 Spiderpool,其中,务必加上如下 helm 选项来安装 [RDMA CNI](https://github.com/k8snetworkplumbingwg/rdma-cni) +3. 安装 Spiderpool helm install spiderpool spiderpool/spiderpool -n kube-system \ --set sriov.install=true \ - --set rdma.rdmaCni.install=true + --set plugins.installRdmaCNI=true=true \ + --set multus.multusCNI.defaultCniCRName="sriov-rdma" - > 如果您是国内用户,可以指定参数 `--set global.imageRegistryOverride=ghcr.m.daocloud.io` 避免 Spiderpool 的镜像拉取失败。 + > - 如果您是国内用户,可以指定参数 `--set global.imageRegistryOverride=ghcr.m.daocloud.io` 避免 Spiderpool 的镜像拉取失败。 + > + > - 完成 Spiderpool 安装后,可以手动编辑 configmap spiderpool-rdma-shared-device-plugin 来重新配置 RDMA shared device plugin > - > 完成 Spiderpool 安装后,可以手动编辑 configmap spiderpool-rdma-shared-device-plugin 来重新配置 RDMA shared device plugin + > - 通过 `multus.multusCNI.defaultCniCRName` 指定 multus 默认使用的 CNI 的 NetworkAttachmentDefinition 实例名。如果 `multus.multusCNI.defaultCniCRName` 选项不为空,则安装后会自动生成一个数据为空的 NetworkAttachmentDefinition 对应实例。如果 `multus.multusCNI.defaultCniCRName` 选项不为空,会尝试通过 /etc/cni/net.d 目录下的第一个 CNI 配置来创建对应的 NetworkAttachmentDefinition 实例,否则会自动生成一个名为 `default` 的 NetworkAttachmentDefinition 实例,以完成 multus 的安装。 完成后,安装的组件如下 diff --git a/docs/usage/rdma.md b/docs/usage/rdma.md index 2072b1037f..6a40db199d 100644 --- a/docs/usage/rdma.md +++ b/docs/usage/rdma.md @@ -42,24 +42,24 @@ The following steps demonstrate how to enable shared usage of RDMA devices by Po af:00.0 Ethernet controller [0200]: Mellanox Technologies MT27800 Family [ConnectX-5] [15b3:1017] af:00.1 Ethernet controller [0200]: Mellanox Technologies MT27800 Family [ConnectX-5] [15b3:1017] -3. Refer to [the installation guide](./install/underlay/get-started-macvlan.md) to install Spiderpool and configure sriov-network-operator. Make sure to include the following Helm options in the commands for installing the RDMA shared device plugin: +3. Install Spiderpool and configure sriov-network-operator: helm install spiderpool spiderpool/spiderpool -n kube-system \ - --set multus.multusCNI.defaultCniCRName="macvlan-conf" \ + --set multus.multusCNI.defaultCniCRName="macvlan-ens6f0np0" \ --set rdma.rdmaSharedDevicePlugin.install=true \ --set rdma.rdmaSharedDevicePlugin.deviceConfig.resourcePrefix="spidernet.io" \ --set rdma.rdmaSharedDevicePlugin.deviceConfig.resourceName="hca_shared_devices" \ --set rdma.rdmaSharedDevicePlugin.deviceConfig.rdmaHcaMax=500 \ --set rdma.rdmaSharedDevicePlugin.deviceConfig.vendors="15b3" \ --set rdma.rdmaSharedDevicePlugin.deviceConfig.deviceIDs="1017" - - > If Macvlan is not installed in your cluster, you can specify the Helm parameter `--set plugins.installCNI=true` to install Macvlan in your cluster. + + > - If Macvlan is not installed in your cluster, you can specify the Helm parameter `--set plugins.installCNI=true` to install Macvlan in your cluster. > - > If Rdma CNI is not installed in your cluster, you can specify the Helm parameter `--set plugins.installRdmaCNI=true` to install Rdma-cni in your cluster. + > - If you are a user from China, you can specify the parameter `--set global.imageRegistryOverride=ghcr.m.daocloud.io` to avoid image pull failures from Spiderpool. > - > If you are a user from China, you can specify the parameter `--set global.imageRegistryOverride=ghcr.m.daocloud.io` to avoid image pull failures from Spiderpool. + > - After completing the installation of Spiderpool, you can manually edit the spiderpool-rdma-shared-device-plugin configmap to reconfigure the RDMA shared device plugin. > - > After completing the installation of Spiderpool, you can manually edit the spiderpool-rdma-shared-device-plugin configmap to reconfigure the RDMA shared device plugin. + > - Specify the name of the NetworkAttachmentDefinition instance for the default CNI used by Multus via `multus.multusCNI.defaultCniCRName`. If the `multus.multusCNI.defaultCniCRName` option is provided, an empty NetworkAttachmentDefinition instance will be automatically generated upon installation. Otherwise, Multus will attempt to create a NetworkAttachmentDefinition instance based on the first CNI configuration found in the /etc/cni/net.d directory. If no suitable configuration is found, a NetworkAttachmentDefinition instance named `default` will be created to complete the installation of Multus. Once the installation is complete, the following components will be installed: @@ -89,11 +89,11 @@ The following steps demonstrate how to enable shared usage of RDMA devices by Po ] > If the reported resource count is 0, it may be due to the following reasons: - > + > > (1) Verify that the vendors and deviceID in the spiderpool-rdma-shared-device-plugin configmap match the actual values. - > + > > (2) Check the logs of the rdma-shared-device-plugin. If you encounter errors related to RDMA NIC support, try installing apt-get install rdma-core or dnf install rdma-core on the host machine. - > + > > `error creating new device: "missing RDMA device spec for device 0000:04:00.0, RDMA device \"issm\" not found"` 5. Create macvlan-related multus configurations using an RDMA card as the master node and set up the corresponding ippool resources: @@ -219,11 +219,11 @@ The following steps demonstrate how to enable isolated usage of RDMA devices by In our demo environment, the host machine is equipped with a Mellanox ConnectX-5 NIC with RoCE capabilities. Follow [the official NVIDIA guide](https://developer.nvidia.com/networking/ethernet-software) to install the latest OFED driver. > To isolate the usage of an RDMA network card, ensure that at least one of the following conditions is met: - > + > > (1) Kernel based on 5.3.0 or newer, RDMA modules loaded in the system. rdma-core package provides means to automatically load relevant modules on system start - > + > > (2) Mellanox OFED version 4.7 or newer is required. In this case it is not required to use a Kernel based on 5.3.0 or newer. - + To confirm the presence of RDMA devices, use the following command: ~# rdma link show @@ -241,7 +241,7 @@ The following steps demonstrate how to enable isolated usage of RDMA devices by netns exclusive copy-on-fork on To verify if the network card has SR-IOV functionality, check the maximum number of supported VFs: - + ~# cat /sys/class/net/ens6f0np0/device/sriov_totalvfs 127 @@ -255,15 +255,17 @@ The following steps demonstrate how to enable isolated usage of RDMA devices by af:00.0 Ethernet controller [0200]: Mellanox Technologies MT27800 Family [ConnectX-5] [15b3:1017] af:00.1 Ethernet controller [0200]: Mellanox Technologies MT27800 Family [ConnectX-5] [15b3:1017] -3. Refer to [the installation guide](./install/underlay/get-started-sriov.md) to install Spiderpool. Make sure to include the following Helm options in the commands for installing [RDMA CNI](https://github.com/k8snetworkplumbingwg/rdma-cni): +3. Install Spiderpool helm install spiderpool spiderpool/spiderpool -n kube-system \ --set sriov.install=true \ - --set rdma.rdmaCni.install=true + --set plugins.installRdmaCNI=true - > If you are a user from China, you can specify the parameter `--set global.imageRegistryOverride=ghcr.m.daocloud.io` to avoid image pull failures from Spiderpool. + > - If you are a user from China, you can specify the parameter `--set global.imageRegistryOverride=ghcr.m.daocloud.io` to avoid image pull failures from Spiderpool. + > + > - After completing the installation of Spiderpool, you can manually edit the spiderpool-rdma-shared-device-plugin configmap to reconfigure the RDMA shared device plugin. > - > After completing the installation of Spiderpool, you can manually edit the spiderpool-rdma-shared-device-plugin configmap to reconfigure the RDMA shared device plugin. + > - Specify the name of the NetworkAttachmentDefinition instance for the default CNI used by Multus via `multus.multusCNI.defaultCniCRName`. If the `multus.multusCNI.defaultCniCRName` option is provided, an empty NetworkAttachmentDefinition instance will be automatically generated upon installation. Otherwise, Multus will attempt to create a NetworkAttachmentDefinition instance based on the first CNI configuration found in the /etc/cni/net.d directory. If no suitable configuration is found, a NetworkAttachmentDefinition instance named `default` will be created to complete the installation of Multus. Once the installation is complete, the following components will be installed: ~# kubectl get pod -n kube-system diff --git a/docs/usage/reserved-ip-zh_CN.md b/docs/usage/reserved-ip-zh_CN.md index 93d0e61742..fba0742dd3 100644 --- a/docs/usage/reserved-ip-zh_CN.md +++ b/docs/usage/reserved-ip-zh_CN.md @@ -26,28 +26,7 @@ ReservedIP 中的 IP 地址可以是: ### 安装 Spiderpool -1. 通过 helm 安装 Spiderpool。 - - ```bash - helm repo add spiderpool https://spidernet-io.github.io/spiderpool - helm repo update spiderpool - helm install spiderpool spiderpool/spiderpool --namespace kube-system --set multus.multusCNI.defaultCniCRName="macvlan-ens192" - ``` - - > 如果您所在地区是中国大陆,可以指定参数 `--set global.imageRegistryOverride=ghcr.m.daocloud.io` ,以帮助您更快的拉取镜像。 - > - > 通过 `multus.multusCNI.defaultCniCRName` 指定集群的 Multus clusterNetwork,clusterNetwork 是 Multus 插件的一个特定字段,用于指定 Pod 的默认网络接口。 - -2. 检查安装完成 - - ```bash - ~# kubectl get po -n kube-system | grep spiderpool - NAME READY STATUS RESTARTS AGE - spiderpool-agent-7hhkz 1/1 Running 0 13m - spiderpool-agent-kxf27 1/1 Running 0 13m - spiderpool-controller-76798dbb68-xnktr 1/1 Running 0 13m - spiderpool-init 0/1 Completed 0 13m - ``` +可参考 [安装](./readme-zh_CN.md) 安装 Spiderpool. ### 安装 CNI 配置 diff --git a/docs/usage/reserved-ip.md b/docs/usage/reserved-ip.md index d9e0df285f..efc5f9ed27 100644 --- a/docs/usage/reserved-ip.md +++ b/docs/usage/reserved-ip.md @@ -26,28 +26,7 @@ The IP addresses specified in the ReservedIP CR serve two purposes: ### Install Spiderpool -1. Install Spiderpool through Helm: - - ```bash - helm repo add spiderpool https://spidernet-io.github.io/spiderpool - helm repo update spiderpool - helm install spiderpool spiderpool/spiderpool --namespace kube-system --set multus.multusCNI.defaultCniCRName="macvlan-ens192" - ``` - - > For users in the Chinese mainland, it is recommended to specify the spec `--set global.imageRegistryOverride=ghcr.m.daocloud.io` to accelerate image pulling. - > - > You can specify the Multus clusterNetwork for your cluster using `multus.multusCNI.defaultCniCRName`. The clusterNetwork is a specific field of the Multus plugin that defines the default network interface for Pods. - -2. Check if the installation is successful. - - ```bash - ~# kubectl get po -n kube-system | grep spiderpool - NAME READY STATUS RESTARTS AGE - spiderpool-agent-7hhkz 1/1 Running 0 13m - spiderpool-agent-kxf27 1/1 Running 0 13m - spiderpool-controller-76798dbb68-xnktr 1/1 Running 0 13m - spiderpool-init 0/1 Completed 0 13m - ``` +Refer to [Installation](./readme.md) to install Spiderpool. ### Install CNI diff --git a/docs/usage/route-zh_CN.md b/docs/usage/route-zh_CN.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/usage/route.md b/docs/usage/route.md index 8aad8228df..12525f6e42 100644 --- a/docs/usage/route.md +++ b/docs/usage/route.md @@ -1,5 +1,7 @@ # Route support +**English** | [**简体中文**](./route-zh_CN.md) + ## Description Spiderpool supports the configuration of routing information. diff --git a/docs/usage/service-zh_CN.md b/docs/usage/service-zh_CN.md index e69de29bb2..335b3e1417 100644 --- a/docs/usage/service-zh_CN.md +++ b/docs/usage/service-zh_CN.md @@ -0,0 +1,3 @@ +# Service + +**简体中文** | [**English**](./service.md) diff --git a/docs/usage/service.md b/docs/usage/service.md new file mode 100644 index 0000000000..0a7a0b0396 --- /dev/null +++ b/docs/usage/service.md @@ -0,0 +1,3 @@ +# Service + +**English** | [**简体中文**](./service-zh_CN.md) diff --git a/docs/usage/spider-multus-config-zh_CN.md b/docs/usage/spider-multus-config-zh_CN.md index 9999991349..e4fd4a073d 100644 --- a/docs/usage/spider-multus-config-zh_CN.md +++ b/docs/usage/spider-multus-config-zh_CN.md @@ -40,26 +40,7 @@ Spidermultusconfig CR 基于 `spec` 中的定义自动生成 Multus CR,改进 ### 安装 Spiderpool -- 通过 helm 安装 Spiderpool. - -```bash -helm repo add spiderpool https://spidernet-io.github.io/spiderpool -helm repo update spiderpool -helm install spiderpool spiderpool/spiderpool --namespace kube-system -``` - -> 如果您所在地区是中国大陆,可以指定参数 `--set global.imageRegistryOverride=ghcr.m.daocloud.io` ,以帮助您更快的拉取镜像。 - -- 检查安装完成 - - ```bash - ~# kubectl get po -n kube-system | grep spiderpool - NAME READY STATUS RESTARTS AGE - spiderpool-agent-7hhkz 1/1 Running 0 13m - spiderpool-agent-kxf27 1/1 Running 0 13m - spiderpool-controller-76798dbb68-xnktr 1/1 Running 0 13m - spiderpool-init 0/1 Completed 0 13m - ``` +可参考 [安装](./readme-zh_CN.md) 安装 Spiderpool. ### 创建 CNI 配置 diff --git a/docs/usage/spider-multus-config.md b/docs/usage/spider-multus-config.md index 234ef88e00..ab0d8c81f5 100644 --- a/docs/usage/spider-multus-config.md +++ b/docs/usage/spider-multus-config.md @@ -40,26 +40,7 @@ To address these issues, SpiderMultusConfig automatically generates the Multus C ### Install Spiderpool -- Install Spiderpool via Helm. - -```bash -helm repo add spiderpool https://spidernet-io.github.io/spiderpool -helm repo update spiderpool -helm install spiderpool spiderpool/spiderpool --namespace kube-system -``` - -> For users in the Chinese mainland, it is recommended to specify the spec `--set global.imageRegistryOverride=ghcr.m.daocloud.io` to accelerate image pulling. - -- Check if the installation is completed - - ```bash - ~# kubectl get po -n kube-system | grep spiderpool - NAME READY STATUS RESTARTS AGE - spiderpool-agent-7hhkz 1/1 Running 0 13m - spiderpool-agent-kxf27 1/1 Running 0 13m - spiderpool-controller-76798dbb68-xnktr 1/1 Running 0 13m - spiderpool-init 0/1 Completed 0 13m - ``` +Refer to [Installation](./readme.md) to install Spiderpool. ### Create CNI Configurations diff --git a/docs/usage/spider-subnet-zh_CN.md b/docs/usage/spider-subnet-zh_CN.md index e199accf3a..4a4501acda 100644 --- a/docs/usage/spider-subnet-zh_CN.md +++ b/docs/usage/spider-subnet-zh_CN.md @@ -28,28 +28,7 @@ SpiderSubnet 功能还支持众多的控制器,如:ReplicaSet、Deployment ### 安装 Spiderpool -- 通过 helm 安装 Spiderpool。 - -```bash -helm repo add spiderpool https://spidernet-io.github.io/spiderpool -helm repo update spiderpool -helm install spiderpool spiderpool/spiderpool --namespace kube-system --set ipam.enableSpiderSubnet=true --set multus.multusCNI.defaultCniCRName="macvlan-ens192" -``` - -> 如果您所在地区是中国大陆,可以指定参数 `--set global.imageRegistryOverride=ghcr.m.daocloud.io` ,以帮助您更快的拉取镜像。 -> -> 通过 `multus.multusCNI.defaultCniCRName` 指定集群的 Multus clusterNetwork,clusterNetwork 是 Multus 插件的一个特定字段,用于指定 Pod 的默认网络接口。 - -- 检查安装完成 - -```bash -~# kubectl get po -n kube-system | grep spiderpool -NAME READY STATUS RESTARTS AGE -spiderpool-agent-7hhkz 1/1 Running 0 13m -spiderpool-agent-kxf27 1/1 Running 0 13m -spiderpool-controller-76798dbb68-xnktr 1/1 Running 0 13m -spiderpool-init 0/1 Completed 0 13m -``` +可参考 [安装](./readme-zh_CN.md) 安装 Spiderpool. 其中,务必确保 helm 安装选项 `ipam.enableSpiderSubnet=true` ### 安装 CNI 配置 diff --git a/docs/usage/spider-subnet.md b/docs/usage/spider-subnet.md index 84ac162f54..2025adf0ed 100644 --- a/docs/usage/spider-subnet.md +++ b/docs/usage/spider-subnet.md @@ -29,28 +29,7 @@ SpiderSubnet also supports several controllers, including ReplicaSet, Deployment ### Install Spiderpool -1. Install Spiderpool through Helm: - - ```bash - helm repo add spiderpool https://spidernet-io.github.io/spiderpool - helm repo update spiderpool - helm install spiderpool spiderpool/spiderpool --namespace kube-system --set ipam.enableSpiderSubnet=true --set multus.multusCNI.defaultCniCRName="macvlan-ens192" - ``` - - > For users in the Chinese mainland, it is recommended to specify the spec `--set global.imageRegistryOverride=ghcr.m.daocloud.io` to accelerate image pulling. - > - > You can specify the Multus clusterNetwork for your cluster using `multus.multusCNI.defaultCniCRName`. The clusterNetwork is a specific field of the Multus plugin that defines the default network interface for Pods. - -2. Check if the installation is successful. - - ```bash - ~# kubectl get po -n kube-system | grep spiderpool - NAME READY STATUS RESTARTS AGE - spiderpool-agent-7hhkz 1/1 Running 0 13m - spiderpool-agent-kxf27 1/1 Running 0 13m - spiderpool-controller-76798dbb68-xnktr 1/1 Running 0 13m - spiderpool-init 0/1 Completed 0 13m - ``` +Refer to [Installation](./readme.md) to install Spiderpool. And make sure that the helm installs the option `ipam.enableSpiderSubnet=true`. ### Install CNI diff --git a/docs/usage/statefulset-zh_CN.md b/docs/usage/statefulset-zh_CN.md index e968503c17..978561d669 100644 --- a/docs/usage/statefulset-zh_CN.md +++ b/docs/usage/statefulset-zh_CN.md @@ -32,28 +32,7 @@ Deployment 和 StatefulSet 控制器,对于 IP 地址固定的需求是不一 ### 安装 Spiderpool -1. 通过 Helm 安装 Spiderpool。 - - ```bash - helm repo add spiderpool https://spidernet-io.github.io/spiderpool - helm repo update spiderpool - helm install spiderpool spiderpool/spiderpool --namespace kube-system --set multus.multusCNI.defaultCniCRName="macvlan-ens192" - ``` - - > 如果您所在地区是中国大陆,可以指定参数 `--set global.imageRegistryOverride=ghcr.m.daocloud.io` ,以帮助您更快的拉取镜像。 - > - > 通过 `multus.multusCNI.defaultCniCRName` 指定集群的 Multus clusterNetwork,clusterNetwork 是 Multus 插件的一个特定字段,用于指定 Pod 的默认网络接口。 - -2. 检查安装完成 - - ```bash - ~# kubectl get po -n kube-system | grep spiderpool - NAME READY STATUS RESTARTS AGE - spiderpool-agent-7hhkz 1/1 Running 0 13m - spiderpool-agent-kxf27 1/1 Running 0 13m - spiderpool-controller-76798dbb68-xnktr 1/1 Running 0 13m - spiderpool-init 0/1 Completed 0 13m - ``` +可参考 [安装](./readme-zh_CN.md) 安装 Spiderpool. 其中,务必确保 helm 安装选项 `ipam.enableStatefulSet=true` ### 安装 CNI 配置 diff --git a/docs/usage/statefulset.md b/docs/usage/statefulset.md index a23c7ba6ec..a1855df349 100644 --- a/docs/usage/statefulset.md +++ b/docs/usage/statefulset.md @@ -32,28 +32,7 @@ Many open-source CNI solutions provide limited support for fixing IP addresses f ### Install Spiderpool -1. Install Spiderpool through Helm: - - ```bash - helm repo add spiderpool https://spidernet-io.github.io/spiderpool - helm repo update spiderpool - helm install spiderpool spiderpool/spiderpool --namespace kube-system --set multus.multusCNI.defaultCniCRName="macvlan-ens192" - ``` - - > For users in the Chinese mainland, it is recommended to specify the spec `--set global.imageRegistryOverride=ghcr.m.daocloud.io` to accelerate image pulling. - > - > You can specify the Multus clusterNetwork for your cluster using `multus.multusCNI.defaultCniCRName`. The clusterNetwork is a specific field of the Multus plugin that defines the default network interface for Pods. - -2. Check if the installation is successful. - - ```bash - ~# kubectl get po -n kube-system | grep spiderpool - NAME READY STATUS RESTARTS AGE - spiderpool-agent-7hhkz 1/1 Running 0 13m - spiderpool-agent-kxf27 1/1 Running 0 13m - spiderpool-controller-76798dbb68-xnktr 1/1 Running 0 13m - spiderpool-init 0/1 Completed 0 13m - ``` +Refer to [Installation](./readme.md) to install Spiderpool. And make sure that the helm installs the option `ipam.enableStatefulSet=true`. ### Install CNI diff --git a/docs/usage/third-party-controller-zh_CN.md b/docs/usage/third-party-controller-zh_CN.md new file mode 100644 index 0000000000..2f591a9ec4 --- /dev/null +++ b/docs/usage/third-party-controller-zh_CN.md @@ -0,0 +1,3 @@ +# IPAM for third-party controllers + +**English** | [**简体中文**](./third-party-controller.md) diff --git a/docs/usage/third-party-controller.md b/docs/usage/third-party-controller.md index 6364c0ba1e..61602c3d42 100644 --- a/docs/usage/third-party-controller.md +++ b/docs/usage/third-party-controller.md @@ -1,5 +1,7 @@ # IPAM for third-party controllers +**简体中文** | [**English**](./third-party-controller-zh_CN.md) + ## Description Operator is popularly used to implement customized controller. Spiderpool supports to assign IP to Pods created not by kubernetes-native controller. There are two ways to do this: diff --git a/test/Makefile b/test/Makefile index b80eddff65..525b343242 100644 --- a/test/Makefile +++ b/test/Makefile @@ -291,8 +291,7 @@ setup_spiderpool: --set spiderpoolInit.image.registry="" \ --set spiderpoolInit.image.repository=$(SPIDERPOOL_CONTROLLER_IMAGE_NAME) \ --set spiderpoolInit.image.tag=$(E2E_SPIDERPOOL_TAG) \ - --set rdma.rdmaCni.image.registry=$(E2E_RDMA_IMAGE_REPO) \ - --set rdma.rdmaSharedDevicePlugin.image.registry=$(E2E_RDMA_IMAGE_REPO) \ + --set rdma.rdmaSharedDevicePlugin.image.registry=$(E2E_RDMA_DP_IMAGE_REPO) \ --set sriov.image.registry=$(E2E_SRIOV_IMAGE_REPO) " \ ALL_IMAGES=`helm template $(RELEASE_NAME) $(ROOT_DIR)/charts/spiderpool $${HELM_OPTION} | grep ' image: ' | tr -d '"' | awk -F 'image: ' '{print $$2}' | sort | uniq | tr '\n' ' '` ; \ echo "ALL_IMAGES: $${ALL_IMAGES} " ; \ diff --git a/test/Makefile.defs b/test/Makefile.defs index 3e3b5483e6..27c7c09b35 100644 --- a/test/Makefile.defs +++ b/test/Makefile.defs @@ -186,12 +186,12 @@ else E2E_OPENKRUISE_IMAGE ?= docker.io/openkruise/kruise-manager endif -#========= rdma ========= +#========= rdma shared dp ========= ifeq ($(E2E_CHINA_IMAGE_REGISTRY),true) - E2E_RDMA_IMAGE_REPO ?= ghcr.m.daocloud.io + E2E_RDMA_DP_IMAGE_REPO ?= ghcr.m.daocloud.io else - E2E_RDMA_IMAGE_REPO ?= ghcr.io + E2E_RDMA_DP_IMAGE_REPO ?= ghcr.io endif #========= sriov ========= diff --git a/test/scripts/debugEnv.sh b/test/scripts/debugEnv.sh index c82ed2f364..f49cf5c89f 100755 --- a/test/scripts/debugEnv.sh +++ b/test/scripts/debugEnv.sh @@ -118,9 +118,9 @@ elif [ "$TYPE"x == "detail"x ] ; then for POD in $AGENT_POD_LIST ; do echo "" echo "--------- kubectl logs ${POD} -n ${NAMESPACE} " - kubectl logs ${POD} -n ${NAMESPACE} --kubeconfig ${E2E_KUBECONFIG} + kubectl logs ${POD} -c spiderpool-agent -n ${NAMESPACE} --kubeconfig ${E2E_KUBECONFIG} echo "--------- kubectl logs ${POD} -n ${NAMESPACE} --previous" - kubectl logs ${POD} -n ${NAMESPACE} --kubeconfig ${E2E_KUBECONFIG} --previous + kubectl logs ${POD} -c spiderpool-agent -n ${NAMESPACE} --kubeconfig ${E2E_KUBECONFIG} --previous done echo "" @@ -227,15 +227,19 @@ elif [ "$TYPE"x == "detail"x ] ; then elif [ "$TYPE"x == "error"x ] ; then CHECK_ERROR(){ - LOG_MARK="$1" - POD="$2" - NAMESPACE="$3" + LLOG_MARK="$1" + LPOD="$2" + LNAMESPACE="$3" + + if [[ "${LPOD}" == *spiderpool-agent* ]] ; then + LPOD="${LPOD} -c spiderpool-agent " + fi echo "" - echo "---------${POD}--------" - MESSAGE=` kubectl logs ${POD} -n ${NAMESPACE} --kubeconfig ${E2E_KUBECONFIG} |& grep -E -i "${LOG_MARK}" ` + echo "---------${LPOD}--------" + MESSAGE=` kubectl logs ${LPOD} -n ${LNAMESPACE} --kubeconfig ${E2E_KUBECONFIG} |& grep -E -i "${LLOG_MARK}" ` if [ -n "$MESSAGE" ] ; then - echo "error, in ${POD}, found error, ${LOG_MARK} !!!!!!!" + echo "error, in ${LPOD}, found error, ${LLOG_MARK} !!!!!!!" echo "${MESSAGE}" RESUTL_CODE=1 else