Skip to content

Commit

Permalink
update underlay document (#119)
Browse files Browse the repository at this point in the history
Signed-off-by: 张祖建 <[email protected]>
  • Loading branch information
zhangzujian authored Sep 12, 2023
1 parent 658610b commit 0ea8319
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 20 deletions.
2 changes: 1 addition & 1 deletion docs/guide/static-ip-mac.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ spec:

## StatefulSet 固定地址

StatefulSet 默认支持固定 IP,而且和其他 Workload 相同,可以使用 `ovn.kubernetes.io/ip_pool` 来指定 Pod 使用的 IP范围
StatefulSet 默认支持固定 IP,而且和其他 Workload 相同,可以使用 `ovn.kubernetes.io/ip_pool` 来指定 Pod 使用的 IP 范围

由于 StatefulSet 多用于有状态服务,对网络标示的固定有更高的要求,Kube-OVN 做了特殊的强化:

Expand Down
23 changes: 13 additions & 10 deletions docs/start/underlay.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ spec:
Other nodes will be added with the following tags:

| Key | Value | Description |
| ------------------------------------------------- | ----- |-------------------------------------------------------------|
| ------------------------------------------------- | ----- | ----------------------------------------------------------- |
| net1.provider-network.ovn.kubernetes.io/ready | true | bridge work finished, ProviderNetwork is ready on this node |
| net1.provider-network.ovn.kubernetes.io/interface | eth1 | The name of the bridged NIC in the node. |
| net1.provider-network.ovn.kubernetes.io/mtu | 1500 | MTU of bridged NIC in node |
Expand Down Expand Up @@ -205,7 +205,7 @@ By default, the Underlay Subnet will communicate with the Overlay Subnet on the

## Notice

If there are IP addresses on the host nic, the OS you are using is Ubuntu, and the networking is configured with Netplan, it's recomanded to set NetworkManager as the renderer and to set static IP addresses for the nic (disable DHCP):
If you have an IP address configured on the network card of the node you are using, and the operating system configures the network using Netplan (such as Ubuntu), it is recommended that you set the renderer of Netplan to NetworkManager and configure a static IP address for the node's network card (disable DHCP).

```yaml
network:
Expand All @@ -218,22 +218,25 @@ network:
version: 2
```

If the host networking service is NetworkManager, Kube-OVN will remove the host nic from the managed devices (managed by NetworkManager is no) after creating ProviderNetwork:
If you want to modify the IP or routing configuration of the network card, you need to execute the following commands after modifying the Netplan configuration:

```shell
root@ubuntu:~# nmcli device status
DEVICE TYPE STATE CONNECTION
eth0 ethernet unmanaged netplan-eth0
```sh
netplan generate
nmcli connection reload netplan-eth0
nmcli device set eth0 managed yes
```

If you want to change the host nic's IP/route configuration, you need to set the nic managed by NetworkManager manually:
After executing the above commands, Kube-OVN will transfer the IP and routing from the network card to the OVS bridge.

If your operating system manages the network using NetworkManager (such as CentOS), you need to execute the following command after modifying the network card configuration:

```sh
nmcli connection reload eth0
nmcli device set eth0 managed yes
nmcli -t -f GENERAL.STATE device show eth0 | grep -qw unmanaged || nmcli device reapply eth0
```

After setting managed to yes,Kube-OVN will transfer IP and routes on the nic to the OVS bridge, and remove the nic from the managed devices again.

**Notice**:If the host nic's MAC is changed, Kube-OVN will not change the OVS bridge's MAC unless kube-ovn-cni is restarted.

## Known Issues
Expand Down
21 changes: 12 additions & 9 deletions docs/start/underlay.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ spec:

## 注意事项

如果您使用的节点网卡上配置有 IP 地址,且操作系统是 Ubuntu 并通过 Netplan 配置网络,建议您将 Netplan 的 renderer 设置为 NetworkManager,并为节点网卡配置静态 IP 地址(关闭 DHCP):
如果您使用的节点网卡上配置有 IP 地址,且操作系统通过 Netplan 配置网络(如 Ubuntu),建议您将 Netplan 的 renderer 设置为 NetworkManager,并为节点网卡配置静态 IP 地址(关闭 DHCP):

```yaml
network:
Expand All @@ -202,22 +202,25 @@ network:
version: 2
```

若节点网络管理服务为 NetworkManager,在使用节点网卡创建 ProviderNetwork 后,Kube-OVN 会将网卡从 NetworkManager 管理列表中移除(managed 属性为 no)
如果您要修改网卡的 IP 或路由配置,需要在修改 netplan 配置后执行以下命令

```shell
root@ubuntu:~# nmcli device status
DEVICE TYPE STATE CONNECTION
eth0 ethernet unmanaged netplan-eth0
```sh
netplan generate
nmcli connection reload netplan-eth0
nmcli device set eth0 managed yes
```

如果您要修改网卡的 IP 或路由配置,需要手动将网卡重新加入 NetworkManager 管理列表:
执行以上命令后,Kube-OVN 会将网卡上的 IP 及路由重新转移至 OVS 网桥。

如果您使用的操作系统通过 NetworkManager 管理网络(如 CentOS),在修改网卡配置后需要执行以下命令:

```sh
nmcli connection reload eth0
nmcli device set eth0 managed yes
nmcli -t -f GENERAL.STATE device show eth0 | grep -qw unmanaged || nmcli device reapply eth0
```

执行以上命令后,Kube-OVN 会将网卡上的 IP 及路由重新转移至 OVS 网桥,并再次将网卡从 NetworkManager 管理列表中移除。

**注意**:节点网卡配置的动态修改仅支持 IP 和路由,不支持 MAC 地址的修改。

## 已知问题
Expand Down

0 comments on commit 0ea8319

Please sign in to comment.