Skip to content

Commit

Permalink
doc: fix format errors (#949)
Browse files Browse the repository at this point in the history
* doc: fix format errors

* Update Install.en.md
  • Loading branch information
Jeanine-tw authored Nov 8, 2023
1 parent b1b2f82 commit 85a0dc5
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 40 deletions.
6 changes: 3 additions & 3 deletions docs/concepts/Architecture.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ Modify the configuration file to add the following configuration:
feature.
egressIgnoreCIDR.
autoDetect.
podCIDR: "" # 1
clusterIP: true # 2
nodeIP: true # 3
podCIDR: "" # (1)
clusterIP: true # (2)
nodeIP: true # (3)
custom.
- "10.6.1.0/24"
```
Expand Down
6 changes: 3 additions & 3 deletions docs/concepts/Architecture.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ EgressGateway 由控制面和数据面 2 部分组成,控制面由 4 个控制
feature:
egressIgnoreCIDR:
autoDetect:
podCIDR: "" # 1
clusterIP: true # 2
nodeIP: true # 3
podCIDR: "" # (1)
clusterIP: true # (2)
nodeIP: true # (3)
custom:
- "10.6.1.0/24"
```
Expand Down
4 changes: 2 additions & 2 deletions docs/concepts/Datapath.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,5 +136,5 @@

2. TABLE_NUM:

* 由于每个主机只能有 [0, 255] 张路由表(其中 0、253、254、255 已被系统使用),超出表的张数时,会导致节点路由没法计算,从而节点失联。而且表名与表的 ID 匹配,如果没有匹配,则内核会随机分配。所以为了保险起见,控制表的的张数(n 表示,默认值为 100)也就是网关节点的上限,可以通过变量设置。
* TABLE_NUM 算法:用户可以设置一个起始值(s 表示,默认值为 3000),则表名的范围为 [s, (s+n)],用户需要保证 [s, (s+n)] 的表名没有被占用。随机从 [s, (s+n)] 取一个起始值,依次增加,环形取值,直到获得一个本节点未使用的表名,未找到则报错。
* 由于每个主机只能有 [0, 255] 张路由表(其中 0、253、254、255 已被系统使用),超出表的张数时,会导致节点路由没法计算,从而节点失联。而且表名与表的 ID 匹配,如果没有匹配,则内核会随机分配。所以为了保险起见,控制表的的张数(n 表示,默认值为 100)也就是网关节点的上限,可以通过变量设置。
* TABLE_NUM 算法:用户可以设置一个起始值(s 表示,默认值为 3000),则表名的范围为 [s, (s+n)],用户需要保证 [s, (s+n)] 的表名没有被占用。随机从 [s, (s+n)] 取一个起始值,依次增加,环形取值,直到获得一个本节点未使用的表名,未找到则报错。
47 changes: 24 additions & 23 deletions docs/usage/Install.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ helm repo update
--wait --debug
```

In the installation command, please consider the following points:
In the installation command, please consider the following points:

* Make sure to provide the IPv4 and IPv6 subnets for the EgressGateway tunnel nodes in the installation command. These subnets should not conflict with other addresses within the cluster.
* You can customize the network interface used for EgressGateway tunnels by using the `--set feature.tunnelDetectMethod="interface=eth0"` option. By default, it uses the network interface associated with the default route.
* If you want to enable IPv6 support, set the `--set feature.enableIPv6=true` option and also `feature.tunnelIpv6Subnet`.
* The EgressGateway Controller supports high availability and can be configured using `--set controller.replicas=2`.
* To enable return routing rules on the gateway nodes, use `--set feature.enableGatewayReplyRoute=true`. This option is required when using Spiderpool to work with underlay CNI.
* Make sure to provide the IPv4 and IPv6 subnets for the EgressGateway tunnel nodes in the installation command. These subnets should not conflict with other addresses within the cluster.
* You can customize the network interface used for EgressGateway tunnels by using the `--set feature.tunnelDetectMethod="interface=eth0"` option. By default, it uses the network interface associated with the default route.
* If you want to enable IPv6 support, set the `--set feature.enableIPv6=true` option and also `feature.tunnelIpv6Subnet`.
* The EgressGateway Controller supports high availability and can be configured using `--set controller.replicas=2`.
* To enable return routing rules on the gateway nodes, use `--set feature.enableGatewayReplyRoute=true`. This option is required when using Spiderpool to work with underlay CNI.

2. Verify that all EgressGateway Pods are running properly.

Expand Down Expand Up @@ -117,11 +117,11 @@ helm repo update
EOF
```
Descriptions:
Descriptions:
* In the provided YAML example, adjust `spec.ippools.ipv4` to define egress exit IP addresses based on your specific environment.
* Ensure that the CIDR of `spec.ippools.ipv4` matches the subnet of the egress interface on the gateway nodes (usually the interface associated with the default route). Mismatched subnets can cause connectivity issues for egress traffic.
* Use `spec.nodeSelector` in the EgressGateway to select a group of nodes as the egress gateway. You can select multiple nodes to achieve high availability.
* In the provided YAML example, adjust `spec.ippools.ipv4` to define egress exit IP addresses based on your specific environment.
* Ensure that the CIDR of `spec.ippools.ipv4` matches the subnet of the egress interface on the gateway nodes (usually the interface associated with the default route). Mismatched subnets can cause connectivity issues for egress traffic.
* Use `spec.nodeSelector` in the EgressGateway to select a group of nodes as the egress gateway. You can select multiple nodes to achieve high availability.
2. Label the egress gateway nodes by applying labels to them. For production environments, it is recommended to label at least 2 nodes. For POC environments, label 1 node.
Expand Down Expand Up @@ -156,10 +156,10 @@ helm repo update
status: Ready
```
Descriptions:
Descriptions:
* The `status.nodeList` field indicates the nodes that match the `spec.nodeSelector`, along with the status of their corresponding EgressTunnel objects.
* The `spec.ippools.ipv4DefaultEIP` field randomly selects one IP address from `spec.ippools.ipv4` as the default VIP for this group of EgressGateways. This default VIP is used when creating EgressPolicy objects for applications that do not specify a VIP address.
* The `status.nodeList` field indicates the nodes that match the `spec.nodeSelector`, along with the status of their corresponding EgressTunnel objects.
* The `spec.ippools.ipv4DefaultEIP` field randomly selects one IP address from `spec.ippools.ipv4` as the default VIP for this group of EgressGateways. This default VIP is used when creating EgressPolicy objects for applications that do not specify a VIP address.
## Create Applications and Egress Policies
Expand Down Expand Up @@ -189,13 +189,14 @@ helm repo update
EOF
```
Descriptions:
Descriptions:
* `spec.egressGatewayName` specifies the name of the EgressGateway group to use.
* `spec.appliedTo.podSelector` determines which Pods within the cluster this policy should apply to.
* There are two options for the source IP address of egress traffic in the cluster:
* You can use the IP address of the gateway nodes. This is suitable for public clouds and traditional networks but has the downside of potential IP changes if a gateway node fails. You can enable this by setting `spec.egressIP.useNodeIP=true`.
* You can use a dedicated VIP. EgressGateway uses ARP principles for VIP implementation, making it suitable for traditional networks rather than public clouds. The advantage is that the egress source IP remains fixed. If no settings are specified in the EgressPolicy, the default VIP of the egressGatewayName will be used, or you can manually specify `spec.egressIP.ipv4` , which must match the IP pool configured in the EgressGateway.
* `spec.egressGatewayName` specifies the name of the EgressGateway group to use.
* `spec.appliedTo.podSelector` determines which Pods within the cluster this policy should apply to.
* There are two options for the source IP address of egress traffic in the cluster:
* You can use the IP address of the gateway nodes. This is suitable for public clouds and traditional networks but has the downside of potential IP changes if a gateway node fails. You can enable this by setting `spec.egressIP.useNodeIP=true`.
* You can use a dedicated VIP. EgressGateway uses ARP principles for VIP implementation, making it suitable for traditional networks rather than public clouds. The advantage is that the egress source IP remains fixed. If no settings are specified in the EgressPolicy, the default VIP of the egressGatewayName will be used, or you can manually specify `spec.egressIP.ipv4` , which must match the IP pool configured in the EgressGateway.
3. Check the status of the EgressPolicy
```shell
Expand Down Expand Up @@ -223,14 +224,14 @@ helm repo update
node: egressgateway-worker2
```
Descriptions:
Descriptions:
* `status.eip` displays the egress IP address used by the group of applications.
* `status.node` shows which EgressGateway node is responsible for real-time egress traffic forwarding. EgressGateway nodes support high availability. When multiple EgressGateway nodes exist, all EgressPolicy instances will be evenly distributed among them.
* `status.eip` displays the egress IP address used by the group of applications.
* `status.node` shows which EgressGateway node is responsible for real-time egress traffic forwarding. EgressGateway nodes support high availability. When multiple EgressGateway nodes exist, all EgressPolicy instances will be evenly distributed among them.
4. Check the status of EgressEndpointSlices.
Each EgressPolicy object has a corresponding EgressEndpointSlices that stores the IP collection of Pods selected by the EgressPolicy. If your application is unable to access external resources, you can check if the IP addresses in this object are correct.
Each EgressPolicy object has a corresponding EgressEndpointSlices that stores the IP collection of Pods selected by the EgressPolicy. If your application is unable to access external resources, you can check if the IP addresses in this object are correct.
```shell
$ kubectl get egressendpointslices -A
Expand Down
18 changes: 9 additions & 9 deletions docs/usage/Install.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ helm repo update
--wait --debug
```

在安装命令中,有如下注意点:
在安装命令中,有如下注意点:

* 安装命令中,需要提供用于 EgressGateway 隧道节点的 IPv4 和 IPv6 网段,要求该网段和集群内的其他地址不冲突。
* 可使用选项 `--set feature.tunnelDetectMethod="interface=eth0"` 来定制 EgressGateway 隧道的承载网卡,否则,默认使用默认路由的网卡。
Expand Down Expand Up @@ -117,7 +117,7 @@ helm repo update
EOF
```
创建命令中:
创建命令中:
* 如上 YAML 例子中,`spec.ippools.ipv4` 定义了一组 egress 的 出口 IP 地址,需要根据具体环境的实际情况调整。
* 其中,`spec.ippools.ipv4` 的 CIDR 应该是与网关节点上的出口网卡(一般情况下是默认路由的网卡)的子网相同,否则,极有可能导致 egress 访问不通。
Expand Down Expand Up @@ -156,7 +156,7 @@ helm repo update
status: Ready
```
在如上输出中:
在如上输出中:
* `status.nodeList` 字段已经识别到了符合 `spec.nodeSelector` 的节点及该节点对应的 EgressTunnel 对象的状态
* `spec.ippools.ipv4DefaultEIP` 字段会从 `spec.ippools.ipv4` 中随机选择一个 IP 地址作为该组 EgressGateway 的默认 VIP,它的作用是:当为应用创建 EgressPolicy 对象时,如果未指定 VIP 地址,则默认分配使用该默认 VIP
Expand All @@ -171,9 +171,9 @@ helm repo update
2. 为应用创建 EgressPolicy CR 对象。
EgressPolicy 实例用于定义哪些 Pod 的出口流量要经过 EgressGateway 节点转发,以及其它的配置细节。
可创建如下例子,当匹配的 Pod 访问任意集群外部的地址(任意不是 Node IP、CNI Pod CIDR、ClusterIP 的地址)时,都会被 EgressGateway Node 转发。注意的是,
EgressPolicy 对象是租户级别的,因此,它务必创建在 selected 应用的租户下
EgressPolicy 实例用于定义哪些 Pod 的出口流量要经过 EgressGateway 节点转发,以及其它的配置细节。
可创建如下例子,当匹配的 Pod 访问任意集群外部的地址(任意不是 Node IP、CNI Pod CIDR、ClusterIP 的地址)时,都会被 EgressGateway Node 转发。注意的是,
EgressPolicy 对象是租户级别的,因此,它务必创建在 selected 应用的租户下
```shell
cat <<EOF | kubectl apply -f -
Expand All @@ -190,7 +190,7 @@ helm repo update
EOF
```
如上创建命令中:
如上创建命令中:
* `spec.egressGatewayName` 指定了使用哪一组 EgressGateway 的名字。
* `spec.appliedTo.podSelector` 指定了本策略生效在集群内的哪些 Pod。
Expand Down Expand Up @@ -225,14 +225,14 @@ helm repo update
node: egressgateway-worker2
```
如上输出中:
如上输出中:
* `status.eip` 展示了该组应用出集群时使用的出口 IP 地址。
* `status.node` 展示了哪一个 EgressGateway 的节点在实时的负责出口流量的转发。注:EgressGateway 节点支持高可用,当存在多个 EgressGateway 节点时,所有的 EgressPolicy 会均摊到不同的 EgressGateway 节点上实施。
4. 查看 EgressEndpointSlices 的状态
每个 EgressPolicy 对象,都有一个对应的 EgressEndpointSlices 对象,其中存储了 EgressPolicy select Pod 的 IP 地址集合。当应用无法出口访问时,可排查该对象中的 IP 地址是否正常。
每个 EgressPolicy 对象,都有一个对应的 EgressEndpointSlices 对象,其中存储了 EgressPolicy select Pod 的 IP 地址集合。当应用无法出口访问时,可排查该对象中的 IP 地址是否正常。
```shell
$ kubectl get egressendpointslices -A
Expand Down

1 comment on commit 85a0dc5

@weizhoublue
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.