Skip to content

Commit 4797cdc

Browse files
yaocw2020LucasSaintarbor
authored andcommitted
Apply suggestions from code review
Co-authored-by: Lucas Saintarbor <[email protected]>
1 parent 519f105 commit 4797cdc

File tree

2 files changed

+28
-24
lines changed

2 files changed

+28
-24
lines changed

docs/networking/best-practice.md

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
sidebar_position: 6
3-
sidebar_label: Best Practice
4-
title: "Harvester Network Best Practice"
3+
sidebar_label: Best Practices
4+
title: "Harvester Network Best Practices"
55
keywords:
66
- Harvester
77
- Networking
@@ -12,55 +12,59 @@ keywords:
1212
</head>
1313

1414
## Overview
15+
1516
This best practice guide introduces how to configure Harvester and the external network to achieve the following goals:
16-
- Traffic isolation between the management plane and the data plane
17-
- General external switch and router configurations
18-
- Network access to VMs from different VLANs
19-
- Access Harvester load balancers from different VLANs
17+
- Traffic isolation between the management plane and the data plane.
18+
- General external switch and router configurations.
19+
- Network access to VMs from different VLANs.
20+
- Access Harvester load balancers from different VLANs.
2021

21-
We will use the following diagram as an example to illustrate the best practice.
22+
We will use the following diagram to illustrate an example and the best practices.
2223

2324
![](/img/v1.2/networking/best-practice.png)
2425

2526
The diagram shows a Harvester cluster composed of two hosts. It contains:
26-
- Hardware:
27+
- **Hardware**:
2728
- Two Harvester servers with dual-port network cards.
2829
- One non-VLAN-aware switch and one VLAN-aware switch. We will use the Cisco-like configuration as an example.
2930
- One router. We will use the Cisco-like configuration as an example.
3031

31-
- Cabling:
32+
- **Cabling**:
3233
- The NIC eth0 of the node1 is connected to the port `ethernet1/1` of the switch1, while the NIC eth0 of the node2 is connected to the port `ethernet1/2` of the switch1.
3334
- The NIC eth1 of the node1 is connected to the port `ethernet1/1` of the switch2, while the NIC eth1 of the node2 is connected to the port `ethernet1/2` of the switch2.
3435
- The port `ethernet1/3` of the switch1 is connected to the port `ethernet0/1` of the router.
3536
- The port `ethernet1/3` of the switch2 is connected to the port `ethernet0/2` of the router.
3637

37-
- Network specification:
38+
- **Network specification**:
3839
- The subnet of the Harvester hosts is in the VLAN untagged network.
3940
- All hosts are in the IPv4 subnet `10.10.0.0/24`, and the gateway IP address is `10.10.0.254`.
4041
- The VM network allows VLAN 100-200.
4142
- The IPv4 subnets of the VM network are:
42-
- untagged network: `192.168.0.0/24`, and the gateway IP address is `192.168.0.254`.
43+
- Untagged network: `192.168.0.0/24`, and the gateway IP address is `192.168.0.254`.
4344
- VLAN 100: `192.168.100.0/24`, and the gateway IP address is `192.168.100.254`.
4445
- VLAN 200: `192.168.200.0/24`, and the gateway IP address is `192.168.200.254`.
4546

46-
- Harvester configuration:
47+
- **Harvester configuration**:
4748
- Two cluster networks: `mgmt` and `vm`.
4849
- Three VM networks under the cluster network `vm`: `vlan100`, `vlan200`, and `untagged`.
4950
- Six VMs, from `VM1` to `VM6`.
5051
- One guest cluster `demo` composed of `VM3` and `VM4`.
5152
- Two VM load balancers and one guest Kubernetes cluster load balancer.
5253

5354
## Multiple Cluster Networks for Traffic Isolation
54-
The two Harvester hosts are equipped with two NICs. Specifically, NIC `eth0` is used for the management network (mapped to the cluster network `mgmt`), while NIC `eth1` is used for the VM network (mapped to the cluster network `vm`).
55+
56+
The two Harvester hosts have two NICs. Specifically, NIC `eth0` is used for the management network (mapped to the cluster network `mgmt`), while NIC `eth1` is used for the VM network (mapped to the cluster network `vm`).
5557

5658
It's beneficial to use two cluster networks to achieve traffic isolation between the management plane and the data plane. If there is an issue with the VM network, you can still use the management network for emergency handling to ensure business continuity. Similarly, if there is a failure in the management network, VM traffic is not affected.
5759

58-
If your hardware is equipped with more NICs, it's recommended that you use at least two NICs for one cluster network. For example, you can use NIC `eth0` and `eth1` for the management network, and use NIC `eth2` and `eth3` for the VM network.
60+
If your hardware has more NICs, we recommend using at least two NICs for one cluster network. For example, you can use NIC `eth0` and `eth1` for the management network and NIC `eth2` and `eth3` for the VM network.
5961

6062
## External Switch and Router Configuration
63+
6164
1. ** Switch1 configuration**:
6265

63-
Since the management network is under the untagged network, switch1 can be a non-VLAN-aware switch. Typically, a non-VLAN-aware switch cannot be configured.
66+
67+
Since the management network is under the untagged network, `switch1` can be a non-VLAN-aware switch. Typically, you can't configure a non-VLAN-aware switch.
6468

6569
2. ** Switch2 configuration**:
6670

@@ -136,11 +140,11 @@ Set the ports `ethernet1/1`, `ethernet1/2`, and `ethernet1/3` as trunk ports, an
136140

137141
1. **Network connection between VM networks**:
138142

139-
The router configuration above uses the [`A router on a stick`](https://www.grandmetric.com/knowledge-base/design_and_configure/router-on-a-stick-approach-cisco-configuration/) technology to allow VMs among untagged network, VLAN 100, and VLAN 200 to communicate with each other. Thus, it's not required to add any more configurations to the router.
143+
The router configuration above uses the [`A router on a stick`](https://www.grandmetric.com/knowledge-base/design_and_configure/router-on-a-stick-approach-cisco-configuration/) technology to allow VMs among untagged network, `vlan100` and `vlan200`, to communicate with each other. Thus, adding more configurations to the router is not required.
140144

141-
2. **Network connection between VM networks and the management network**:
145+
1. **Network connection between VM networks and the management network**:
142146

143-
A feasible method to ensure network connectivity between VM networks and the management network is to manually add static routes. The following commands add static routes on the router to allow VMs in the untagged network, VLAN 100, and VLAN 200 to access the management network.
147+
A feasible method to ensure network connectivity between VM networks and the management network is manually adding static routes. The following commands add static routes on the router to allow VMs in the untagged network, `vlan100` and `vlan200`, to access the management network.
144148

145149
```
146150
router(config)# config terminal
@@ -151,7 +155,7 @@ Set the ports `ethernet1/1`, `ethernet1/2`, and `ethernet1/3` as trunk ports, an
151155
router(config)# end
152156
```
153157

154-
The route table would be like this:
158+
The route table would look like this:
155159

156160
```
157161
Router#show ip route
@@ -182,10 +186,10 @@ The Harvester load balancer is divided into two types: VM load balancer and gues
182186
router(config)# ip route 192.168.0.0 255.255.255.0 ethernet0/2
183187
```
184188

185-
2. The load balancer IP of the guest Kubernetes cluster load balancer is exposed within the VM network. In the diagram above, the guest cluster `demo` is within the VM network `vlan200` because the VMs consisting of the guest cluster are in the `vlan200`. Thus, the guest Kubernetes cluster load balancer `lb2` is exposed within the VM network `vlan200`. There are three scenarios to explain how to access `lb2` if it has obtained the load balancer IP via DHCP:
189+
1. The load balancer IP of the guest Kubernetes cluster load balancer is exposed within the VM network. In the diagram above, the guest cluster `demo` is within the VM network `vlan200` because the VMs consisting of the guest cluster are in the `vlan200`. Thus, the guest Kubernetes cluster load balancer `lb2` is exposed within the VM network `vlan200`. There are three scenarios to explain how to access `lb2` if it has obtained the load balancer IP via DHCP:
186190
- You can access it from the VM `VM3` and `VM4` directly because they are in the `vlan200`.
187-
- You can also access it from the VMs in other VM network directly because of the `A router on a stick` configuration.
188-
- You can access it from the Harvester hosts, or in other words, the management network by adding the following static routes on the router.
191+
- You can also access it directly from the VMs in other VM networks because of the `A router on a stick` configuration.
192+
- You can access it from the Harvester hosts, or in other words, the management network, by adding the following static routes on the router.
189193

190194
```
191195
router(config)# ip route 10.10.0.0 255.255.255.0 ethernet0/1
@@ -195,6 +199,6 @@ The Harvester load balancer is divided into two types: VM load balancer and gues
195199
196200
:::note
197201
198-
Except for the static routes above, you can also use dynamic routing protocols such as RIP, BGP, OSPF, and ISIS according to your network planning and requirements.
202+
Except for the static routes above, you can use dynamic routing protocols such as RIP, BGP, OSPF, and ISIS according to your network planning and requirements.
199203
200204
:::

docs/networking/deep-dive.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ External network devices typically refer to switches and DHCP servers. With a cl
113113
| mode 5(balance-tlb) | none |
114114
| mode 6(balance-alb) | none |
115115

116-
For example, if the bond mode is 802.3ad, you need to configure LACP on the switch. The following is an example of LACP configuration on Cisco switch:
116+
For example, if the bond mode is `802.3ad`, you need to configure LACP on the switch. The following is an example of LACP configuration on a Cisco switch:
117117
```
118118
interface port-channel1
119119
switchport trunk encapsulation dot1q

0 commit comments

Comments
 (0)