Network Management
External Network
General
An external network provides IP addresses for pods and LoadBalancer services in a cluster, allowing them to be accessed from outside the Kubernetes cluster.
External networks support planning and managing the networks used by LoadBalancer services and
pods in a unified way, and divide the IP ranges used by LoadBalancer services and pods by
different network segments. The following 2 types of network segments are supported:
- Service external network
- A service external network is used to allocate the IP addresses used by the services of the LoadBalancer type. LoadBalancer services support accessing services from outside a Kubernetes cluster.
- To use a service external network, all the control plane nodes must have a NIC with the same name, and an IP address must be configured on each of these NICs.
- Pod external network
- A pod external network is used to allocate the IP addresses of the pod external network. A pod external network supports accessing pod IP addresses from outside a Kubernetes cluster directly.
- By default, pods use the native Kubernetes container network. The network used by pods can be configured in Workload - Advanced Configuration - Network Settings.
- To use a pod external network, all the nodes must have a NIC with the same name.
Creating an External Network
In the ZStack Zaku main menu, click . On the External Network page, click Create External Network and the Create External Network page is displayed.
You can refer to the following example to enter the required information:
Note:
- Name: set the name of the external network. Naming rules: the length is limited to 1 to 128 characters, and the input can contain only Chinese characters, English letters, digits and the following 7 characters: "-", "_", ".", "(", ")", ":" and "+".
- Description: optional. Add the information related to the external network.
- NIC Name: select the NIC used by the external network. Only the
NICs that have the same name on all the control plane nodes and are not used by other
external networks can be selected.
Note: The NIC of an external network must meet the
following requirements:- To use a service external network, make sure that all nodes with the control plane role have a NIC with the same name.
- To use a pod external network, make sure that all the nodes have a NIC with the same name.
- The NIC names of physical machine nodes, VM nodes or nodes with different operating systems can be kept consistent by creating a bond.
- Network Source: if the platform is integrated with ZStack Cloud 5.2.0 or later, select Local Network or Cloud Network. Local Network is selected by default.
- Local Network: manually specify the IPv4 netmask and gateway.
- Cloud Network: select a network from the cloud platform. The external network uses the netmask, gateway, and IPv4 CIDR of the selected network.
- Cloud Network: when the network source is Cloud Network, select Public Network, Flat Network, or VPC Network. Then click the selection button and select a network with available IPv4 addresses in the selection window.
Note: After changing the network type, select a network again. - IPv4 Netmask: when using a local network, specify the netmask for the external network range, such as 255.255.0.0.
- IPv4 Gateway: when using a local network, specify the gateway for the external network range, such as 172.20.0.1.
Note: - The IPv4 CIDR ranges of different external networks must not overlap. For a local network, the CIDR is determined by the IPv4 netmask and gateway.
- After creating an external network, go to its details page and add a network segment before using the network.
Managing External Networks
In the ZStack Zaku main menu, click to enter the External Network page.
External networks support the following operations:
| Operation | Description |
|---|---|
| Create External Network | Create a new external network. |
| Add Network Segment | Add a new IPv4 network segment to the external network.
Two types of network segments, service external network and pod external
network, can be added. Note:
|
| External Network Details | Go to the external network details page to view basic information, IP usage, and the associated cloud network, and manage the network segments of the external network. |
| Delete External Network | Delete the external network. |
External Network Details
External Network Range
On the External Network page, click the name of an external network to enter
the external network details page, and click Network Segment to enter the
Network Segment tab. On this page, you can view the network segment
configuration and the IP usage of the external network, and manage the two types of network
segments, service external network and pod external network, in a centralized way, including
adding, managing IP ranges, setting the sharing mode and deleting:
| Operation | Description |
|---|---|
| Add Network Segment | Add a new network segment to the external network. Two
types of network segments, service external network and pod external network,
are supported. Note:
|
| Manage IP Range | Manage the IP ranges of the network segment, including
deleting an existing IP range and adding a new IP range. Note:
|
| Set Sharing Mode | Set the sharing mode of the network segment. Currently the
following two modes are supported:
Note:
|
| Delete Network Segment | Delete the network segment. Note: A network segment cannot
be deleted when an IP address under it is in use. |
