Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions docs/guide/eip-snat.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ External services can access the Pod directly through the EIP, and the Pod will

![](../static/eip-snat.png)

## Advanced Configuration

> To support this feature, if you need to directly specify a default external subnet name, you may need to set startup arguments for kube-ovn-controller.
Some args of `kube-ovn-controller` allow for advanced configuration of SNAT and EIP:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

这两行内容有些冗余,措辞可以更直接清晰。建议将它们合并成一个更简洁的句子,以提高可读性。

Suggested change
> To support this feature, if you need to directly specify a default external subnet name, you may need to set startup arguments for kube-ovn-controller.
Some args of `kube-ovn-controller` allow for advanced configuration of SNAT and EIP:
> To support advanced configuration of SNAT and EIP, such as specifying a default external subnet, set the following startup arguments for `kube-ovn-controller`:


- `--external-gateway-config-ns`: The Namespace of Configmap `ovn-external-gw-config`, default is `kube-system`.
- `--external-gateway-net`: The name of the bridge to which the physical NIC is bridged, default is `external`.
- `--external-gateway-vlanid`: Physical network Vlan Tag number, default is 0, i.e. no Vlan is used.

## Preparation

- In order to use the OVN's L3 Gateway capability, a separate NIC must be bridged into the OVS bridge for overlay and underlay network communication.
Expand All @@ -38,6 +47,7 @@ metadata:
namespace: kube-system
data:
enable-external-gw: "true"
# external-gw-switch: "external"
external-gw-nodes: "kube-ovn-worker"
external-gw-nic: "eth1"
external-gw-addr: "172.56.0.1/16"
Expand All @@ -51,6 +61,7 @@ data:
- `external-gw-nic`: The name of the NIC that performs the role of a gateway on the node.
- `external-gw-addr`: The IP and mask of the physical network gateway.
- `nic-ip`,`nic-mac`: The IP and Mac assigned to the logical gateway port needs to be an unoccupied IP and Mac for the physical subnet.
- `external-gw-switch`: Reuse the name of an existing underlay subnet logical switch. If you are using the default external of `--external-gateway-net`, then this value is omitted. But if you want to reuse an existing underlay subnet CR, then you can just configure `external-gw-switch: "your-subnet-name"`, and the others can be left unconfigured, because the network has already been maintained through the underlay subnet.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

external-gw-switch 的描述可以更清晰一些。术语 "the others" 含义模糊,明确列出可以省略哪些参数会更有帮助。此外,可以改进句子结构以提高可读性。

Suggested change
- `external-gw-switch`: Reuse the name of an existing underlay subnet logical switch. If you are using the default external of `--external-gateway-net`, then this value is omitted. But if you want to reuse an existing underlay subnet CR, then you can just configure `external-gw-switch: "your-subnet-name"`, and the others can be left unconfigured, because the network has already been maintained through the underlay subnet.
- `external-gw-switch`: Reuse an existing underlay subnet logical switch. If you are using the default external switch specified by `--external-gateway-net` (default is "external"), you don't need to set this. However, if you want to reuse an existing underlay subnet CR, you can configure `external-gw-switch: "your-subnet-name"`. In this case, other parameters like `external-gw-nodes`, `external-gw-nic`, `external-gw-addr`, `nic-ip`, and `nic-mac` can be omitted, as the network is already managed by the underlay subnet.


## Confirm the Configuration Take Effect

Expand Down Expand Up @@ -127,11 +138,3 @@ kubectl annotate pod pod-gw ovn.kubernetes.io/routed-
```

When the EIP or SNAT takes into effect, the `ovn.kubernetes.io/routed` annotation will be added back.

## Advanced Configuration

Some args of `kube-ovn-controller` allow for advanced configuration of SNAT and EIP:

- `--external-gateway-config-ns`: The Namespace of Configmap `ovn-external-gw-config`, default is `kube-system`.
- `--external-gateway-net`: The name of the bridge to which the physical NIC is bridged, default is `external`.
- `--external-gateway-vlanid`: Physical network Vlan Tag number, default is 0, i.e. no Vlan is used.
20 changes: 12 additions & 8 deletions docs/guide/eip-snat.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ Kube-OVN 支持利用 OVN 中的 L3 Gateway 功能来实现 Pod 级别的 SNAT

![](../static/eip-snat.png)

## 高级配置

> 为了支持该功能,如果你需要直接指定定一个默认的 external subnet 名,你可能需要设置 `kube-ovn-controller` 的启动参数。
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

文档中存在一个拼写错误,指定定一个 应为 指定一个。建议修正以提高文档的可读性。

Suggested change
> 为了支持该功能,如果你需要直接指定定一个默认的 external subnet 名,你可能需要设置 `kube-ovn-controller` 的启动参数。
> 为了支持该功能,如果你需要直接指定一个默认的 external subnet 名,你可能需要设置 `kube-ovn-controller` 的启动参数。


`kube-ovn-controller` 的部分启动参数可对 SNAT 和 EIP 功能进行高阶配置:

- `--external-gateway-config-ns`: Configmap `ovn-external-gw-config` 所属 Namespace,默认为 `kube-system`。
- `--external-gateway-net`: 物理网卡所桥接的网桥名,默认为 `external`。
- `--external-gateway-vlanid`: 物理网络 Vlan Tag 号,默认为 0,即不使用 Vlan。

## 准备工作

- 为了使用 OVN 的 L3 Gateway 能力,必须将一个单独的网卡接入 OVS 网桥中进行 Overlay 和 Underlay 网络的打通,
Expand All @@ -38,6 +48,7 @@ metadata:
namespace: kube-system
data:
enable-external-gw: "true"
# external-gw-switch: "external"
external-gw-nodes: "kube-ovn-worker"
external-gw-nic: "eth1"
external-gw-addr: "172.56.0.1/16"
Expand All @@ -51,6 +62,7 @@ data:
- `external-gw-nic`: 节点上承担网关作用的网卡名。
- `external-gw-addr`: 物理网络网关的 IP 和掩码。
- `nic-ip`,`nic-mac`: 分配给逻辑网关端口的 IP 和 Mac,需为物理段未被占用的 IP 和 Mac。
- `external-gw-switch`: 复用已有的 underlay subnet 逻辑交换机名称,如果使用的是`--external-gateway-net`默认的 external,那么该值是缺省的。但如果你想复用已有的 underlay subnet CR, 那么你可以只配置 external-gw-switch: "your-subnet-name",其他的都可以不用配置,因为网络已经通过 underlay subnet 维护好了。
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

这段描述中“其他的”指代不够明确,可能会让用户感到困惑。建议明确指出哪些配置项可以省略,并优化句子结构以提高清晰度。

Suggested change
- `external-gw-switch`: 复用已有的 underlay subnet 逻辑交换机名称,如果使用的是`--external-gateway-net`默认的 external,那么该值是缺省的。但如果你想复用已有的 underlay subnet CR, 那么你可以只配置 external-gw-switch: "your-subnet-name",其他的都可以不用配置,因为网络已经通过 underlay subnet 维护好了
- `external-gw-switch`: 复用一个已有的 underlay subnet 逻辑交换机。如果使用由 `--external-gateway-net` 参数指定的默认外部交换机(默认为 "external"),则无需配置此项。但如果你想复用一个已有的 underlay subnet CR,可以只配置 `external-gw-switch: "your-subnet-name"`,此时 `external-gw-nodes``external-gw-nic``external-gw-addr``nic-ip``nic-mac` 等参数可以省略,因为网络已由 underlay subnet 维护


## 观察 OVN 和 OVS 状态确认配置生效

Expand Down Expand Up @@ -127,11 +139,3 @@ kubectl annotate pod pod-gw ovn.kubernetes.io/routed-
```

当 EIP 或 SNAT 规则生效后,`ovn.kubernetes.io/routed` annotation 会被重新添加。

## 高级配置

`kube-ovn-controller` 的部分启动参数可对 SNAT 和 EIP 功能进行高阶配置:

- `--external-gateway-config-ns`: Configmap `ovn-external-gw-config` 所属 Namespace,默认为 `kube-system`。
- `--external-gateway-net`: 物理网卡所桥接的网桥名,默认为 `external`。
- `--external-gateway-vlanid`: 物理网络 Vlan Tag 号,默认为 0,即不使用 Vlan。
Loading