Network communication methods, devices, equipment, and storage media based on hybrid networking
By deploying container clusters and building virtual networks in a network scenario where management networks and business networks are isolated, the security and bandwidth consumption issues of hybrid container cluster networking in existing technologies are resolved, and the separation and interoperability of management and business traffic are achieved.
Patent Information
- Application Number
- CN202411038057.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2044-07-31
AI Technical Summary
In network scenarios where management and business networks are isolated, existing technologies struggle to achieve hybrid networking of container clusters, fail to meet the isolation requirements of business and management networks, and suffer from low security and management traffic consuming bandwidth of business network cards.
By deploying container clusters that isolate the management network and the business network, a virtual network is built based on the network virtualization mechanism and Internet Protocol addresses are allocated to achieve the separation of management and business traffic. An overlay tunnel network is built using Geneve or VXLan technology to ensure bidirectional network communication between management and business Pods.
It enables hybrid networking of container clusters in scenarios where management network and business network are isolated, meets the isolation requirements of business network and management network, improves security, and avoids management traffic consuming the bandwidth of business network card.
Smart Images

Figure CN118764339B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of cloud platform technology, and in particular to a network communication method, apparatus, device and storage medium based on hybrid networking. Background Technology
[0002] In network scenarios where the management network and business network are isolated, if you want to build a unified Kubernetes (Kubernetes, an open-source platform for managing containers) cluster to manage the services of various business areas, the Kubernetes specification requires that the management nodes of the management area and the compute nodes of the business areas be interconnected at Layer 2 / 3. Currently, only the management network meets this requirement. However, the management network is not suitable for carrying customers' containerized services. First, the network interface cards (NICs) of the management network are generally gigabit NICs, which cannot meet the bandwidth requirements of the services. If NICs of 10 gigabit or higher are required, the increased cost to customers is unacceptable. Second, if the management network is used to build the cluster, the containerized services of each business area will not have physical network isolation, which is not in compliance with security regulations. If the business networks of each business area are connected to the management network of the management area through the business NICs to build the cluster, it will not meet management and security requirements, and management requests will consume the bandwidth of the business NICs. Both of these solutions have drawbacks.
[0003] In addition, there is a multi-NIC solution represented by multus (an open-source Kubernetes networking solution, a Kubernetes CNI plugin), which can allocate multiple network interfaces to container Pods (the basic units in Kubernetes). For example, both the management network and the business network can be assigned to the container. However, this approach still has drawbacks. The Kubernetes Service (a strategy for accessing Pods in a Kubernetes cluster) can only recognize one IP address (Internet Protocol Address) of the Pod, which is called the primary IP. That is, even if multiple IPs are allocated to the Pod, when accessing the container service through the SVC (Service), the load can only be distributed to the primary IP. It cannot distinguish whether to use the management network or the business network based on the network type. This function has great limitations and can only meet some scenarios where communication is directly between Pods. It is not very versatile. Secondly, this approach also affects the isolation between different business networks. The management network is directly exposed to the container Pod, and business Pods can access each other across business regions through the management network, which has low security.
[0004] Therefore, there is an urgent need to propose a network communication method, device, equipment, and storage medium based on hybrid networking that can improve security while satisfying the isolation of business networks and management networks. Summary of the Invention
[0005] Therefore, it is necessary to provide a network communication method, apparatus, computer equipment, and storage medium that can improve security while satisfying the isolation of business networks and management networks, in order to address the above-mentioned technical problems.
[0006] Firstly, a network communication method based on hybrid networking is provided, the method comprising:
[0007] Deploy a container cluster in which the management network and the business network are isolated from each other, and deploy corresponding nodes according to the regional attributes of each region in the container cluster. The nodes include at least one of the following: compute nodes and management nodes.
[0008] Based on network virtualization mechanisms, a virtual network connecting multiple nodes is constructed;
[0009] Obtain at least one Internet Protocol address from the virtual network and assign the Internet Protocol address to the resource management component of the target category on each node;
[0010] Based on the resource management component with the allocated Internet Protocol address and the virtual network, the system responds to network service requests issued by the target node to achieve network communication in a hybrid network.
[0011] Optionally, the deployment method for the container cluster, in which the management network and the service network are isolated from each other, includes:
[0012] The system checks whether the kernel version of each node conforms to a preset standard.
[0013] In response to the detection that the kernel version of each node in the system meets the preset standard, a unique identifier is set for each node, and the time of each node is synchronized;
[0014] Construct a mapping relationship between unique identifiers and corresponding Internet protocols of physical networks, and add the mapping relationship to the target file of the corresponding node;
[0015] Disable factors that affect the deployment of container clusters, including at least firewalls, security systems, and swap partitions;
[0016] At the same time, install a containerized deployment environment;
[0017] Upon detecting that the containerized deployment environment has been successfully installed, an initial container cluster is deployed based on the selected target container cluster deployment method.
[0018] During deployment, the status of each node is monitored, and any anomalies are identified.
[0019] When an abnormal node status is detected, the system determines whether redeployment is necessary based on the abnormal node's status information and deployment progress.
[0020] If a redeployment is detected, the process rolls back to the initial container cluster deployment step and redeploys.
[0021] Optionally, in response to detecting that the initial container cluster has been deployed, the method includes:
[0022] The initial container cluster is divided into management areas and business areas;
[0023] The management network card is connected to the management area and / or the service area via the management network, and the service network card is connected to the corresponding service area via the target service network, wherein the physical links of the service networks of any two service areas are not connected.
[0024] Based on the management network and at least one target service network, a container cluster is generated in which the management network and the service network are isolated from each other.
[0025] Optionally, deploying corresponding nodes based on the regional attributes of each region in the container cluster includes:
[0026] When the target region is detected to be a managed region, a management node is deployed in the target region;
[0027] When the target region is detected to be a business region, a computing node is deployed in the target region.
[0028] Optionally, based on network virtualization mechanisms, constructing a virtual network connecting multiple nodes includes:
[0029] In response to the detection that the management network is operating normally, a virtual network is constructed based on the management network using the Geneve or VXLan strategy;
[0030] Based on the virtual network, multiple nodes in the container cluster are connected, wherein the Internet Protocol address of the virtual network does not overlap with the Internet Protocol addresses of the management network and the business network.
[0031] Optionally, the resource management component that assigns Internet Protocol addresses on the virtual network to target categories on each node includes:
[0032] Obtain relevant information about the virtual network, including available Internet Protocol (IP) addresses and used IP addresses;
[0033] In response to the detection of an Internet Protocol address allocation request, the available Internet Protocol addresses are allocated to the management resource management components on each node, wherein the Internet Protocol address allocation request is used to request the allocation of Internet Protocol addresses for the management resource management components.
[0034] Optionally, based on the resource management component that has been assigned the Internet Protocol address and the virtual network, responding to a service request issued by the target resource management component includes:
[0035] Upon receiving a service request, the category of the target resource management component that issued the service request is detected;
[0036] In response to detecting that the category is management, determine whether the target Internet Protocol address corresponding to the service request is in the node to which the target resource management component belongs;
[0037] In response to detecting that the target Internet Protocol address corresponding to the service request is not in the node to which the target resource management component belongs, the service request is sent to the business resource management component of another node to which the target Internet Protocol address belongs, based on the virtual network;
[0038] In response to detecting that the category is a business category, determine whether the target Internet Protocol address corresponding to the service request is in the node to which the target resource management component belongs;
[0039] In response to detecting that the target Internet Protocol address corresponding to the service request is not in the node to which the target resource management component belongs, the service request is sent to the management resource management component of another node to which the target Internet Protocol address belongs based on the virtual network.
[0040] Secondly, a network communication device based on hybrid networking is provided, the device comprising:
[0041] The deployment module is used to deploy a container cluster in which the management network and the business network are isolated from each other, and to deploy corresponding nodes according to the regional attributes of each region in the container cluster. The nodes include at least one of the following: compute nodes and management nodes.
[0042] The virtual network building module is used to build virtual networks that connect multiple nodes based on network virtualization mechanisms;
[0043] The allocation module is used to obtain at least one Internet Protocol address in the virtual network and allocate the Internet Protocol address to the resource management component of the target category on each node;
[0044] The request-response module is used to respond to network service requests issued by the target node based on the resource management component with the allocated Internet Protocol address and the virtual network, so as to realize network communication in hybrid networking.
[0045] Thirdly, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:
[0046] Deploy a container cluster in which the management network and the business network are isolated from each other, and deploy corresponding nodes according to the regional attributes of each region in the container cluster. The nodes include at least one of the following: compute nodes and management nodes.
[0047] Based on network virtualization mechanisms, a virtual network connecting multiple nodes is constructed;
[0048] Obtain at least one Internet Protocol address from the virtual network and assign the Internet Protocol address to the resource management component of the target category on each node;
[0049] Based on the resource management component with the allocated Internet Protocol address and the virtual network, the system responds to network service requests issued by the target node to achieve network communication in a hybrid network.
[0050] Fourthly, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0051] Deploy a container cluster in which the management network and the business network are isolated from each other, and deploy corresponding nodes according to the regional attributes of each region in the container cluster. The nodes include at least one of the following: compute nodes and management nodes.
[0052] Based on network virtualization mechanisms, a virtual network connecting multiple nodes is constructed;
[0053] Obtain at least one Internet Protocol address from the virtual network and assign the Internet Protocol address to the resource management component of the target category on each node;
[0054] Based on the resource management component with the allocated Internet Protocol address and the virtual network, the system responds to network service requests issued by the target node to achieve network communication in a hybrid network.
[0055] Fifthly, a computer program product is provided, the computer program product comprising a computer program, which, when executed by a processor, performs the following steps:
[0056] Deploy a container cluster in which the management network and the business network are isolated from each other, and deploy corresponding nodes according to the regional attributes of each region in the container cluster. The nodes include at least one of the following: compute nodes and management nodes.
[0057] Based on network virtualization mechanisms, a virtual network connecting multiple nodes is constructed;
[0058] Obtain at least one Internet Protocol address from the virtual network and assign the Internet Protocol address to the resource management component of the target category on each node;
[0059] Based on the resource management component with the allocated Internet Protocol address and the virtual network, the system responds to network service requests issued by the target node to achieve network communication in a hybrid network.
[0060] The aforementioned network communication method, apparatus, device, and storage medium based on hybrid networking, the method comprising: deploying a container cluster in which the management network and the business network are isolated from each other, and deploying corresponding nodes according to the regional attributes of each region in the container cluster, wherein the nodes include at least one of the following: compute nodes and management nodes; constructing a virtual network connecting multiple nodes based on a network virtualization mechanism; obtaining at least one Internet Protocol address in the virtual network and allocating the Internet Protocol address to a target category resource management component on each node; responding to network service requests issued by target nodes based on the resource management component with the allocated Internet Protocol address and the virtual network, thereby realizing network communication in hybrid networking. This application enables hybrid networking of container clusters in scenarios where the management network and the business network are isolated, meeting the requirement of isolation between the business network and the management network in the container cluster, achieving separation of management and business traffic, avoiding management traffic from occupying the bandwidth of the business network card, and realizing network interconnection of hybrid networking through a virtual network constructed on the management network, with high security. Attached Figure Description
[0061] Figure 1 This is an application environment diagram of a network communication method based on hybrid networking in one embodiment;
[0062] Figure 2 This is a flowchart illustrating a network communication method based on hybrid networking in one embodiment;
[0063] Figure 3 This is a schematic diagram of the structure of a container cluster based on hybrid networking in one embodiment;
[0064] Figure 4 This is a schematic diagram of the region division of a container cluster structure based on hybrid networking in one embodiment;
[0065] Figure 5 This is a schematic diagram illustrating the region division of another container cluster structure based on hybrid networking in one embodiment;
[0066] Figure 6 This is a schematic diagram of a container cluster structure based on a hybrid networking virtual network in one embodiment;
[0067] Figure 7 This is a structural block diagram of a network communication device based on hybrid networking in one embodiment;
[0068] Figure 8This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0069] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0070] It should be understood that, in the description of this application, unless the context explicitly requires it, words such as "including" or "comprising" throughout the specification should be interpreted as including rather than exclusive or exhaustive; that is, meaning "including but not limited to".
[0071] It should also be understood that the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this application, unless otherwise stated, "a plurality of" means two or more.
[0072] It should be noted that the terms "S1," "S2," etc., are used only for descriptive purposes and do not specifically refer to the order or sequence, nor are they intended to limit this application. They are merely for the convenience of describing the method of this application and should not be construed as indicating the sequential order of the steps. Furthermore, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed in this application.
[0073] With the rapid development of cloud computing and containerization technologies, Kubernetes (K8s, an open-source platform for managing containerized applications and service clusters) has become a popular container orchestration system, widely used in enterprise data centers and cloud services. K8s has numerous network plugins, all conforming to the CNI (Container Networking Interface) specification, such as Calico, Flannel, Cilium, and kube-ovn (all open-source software projects for container networking). The main responsibility of CNI plugins is to allocate IP addresses to Pods (resource management components, the most basic execution unit of Kubernetes applications), configure network interfaces, and manage network policies. Using CNI generally requires that management nodes and business nodes can communicate at Layer 2 or Layer 3. The management component on the business node needs to access the cluster's control plane, and the global logging / monitoring service on the management node also needs to be able to access Pods in order to obtain... Retrieving business logs and monitoring data; however, real-world user scenarios are often much more complex, especially for high-end clients in the financial sector. To ensure security, management zones and different business zones are typically divided. Servers in both the management zone and each business zone are configured with management network cards (gigabit) for connectivity. In addition to the management network, each business zone has an independent business network (10 Gigabit+) to carry business operations. The business networks between each business zone are physically isolated, and business operations in each zone cannot directly use the management network. This isolation between the management network and the business network provides higher security and also separates management and business traffic. As the background technology indicates, existing technologies have many drawbacks in this network scenario.
[0074] To address the aforementioned technical issues, this application provides a network communication method, apparatus, device, and storage medium based on hybrid networking. This enables hybrid networking of container clusters in scenarios where management networks and service networks are isolated. It meets the requirement of isolation between service networks and management networks in container clusters, achieves separation of management and service traffic, avoids management traffic occupying the bandwidth of service network cards, and realizes network interconnection of hybrid networking through a virtual network built on the management network, resulting in high security.
[0075] The network communication method based on hybrid networking provided in this application can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with a data processing platform set on server 104 via a network. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. Server 104 can be implemented as a standalone server or a server cluster consisting of multiple servers.
[0076] In one embodiment, such as Figure 2As shown, a network communication method based on hybrid networking is provided, which can be applied to... Figure 1 Taking the terminal in the example, the explanation includes the following steps:
[0077] S1: Deploy a container cluster in which the management network and the business network are isolated from each other, and deploy corresponding nodes according to the regional attributes of each region in the container cluster. The nodes include at least one of the following: compute nodes and management nodes.
[0078] It should be noted that the container cluster refers to the K8s (Kubernetes) container cluster, which is an open-source container orchestration platform that provides a complete set of functions for containerized applications, including deployment, operation, resource scheduling, service discovery, and dynamic scaling. It aims to improve the convenience of managing large-scale container clusters. The region attributes are management and business. Based on the region attributes, the K8s container cluster can be divided into business regions and management regions. Each region deploys corresponding nodes, such as deploying compute nodes in the business region and management nodes in the management region.
[0079] In some specific implementations, such as Figure 3 As shown, the deployment method for the container cluster, in which the management network and the business network are isolated from each other, includes:
[0080] Environment preparation before deployment includes: checking whether the kernel version of each node in the system meets the preset standards to ensure that the system kernel version of all nodes meets the requirements of Kubernetes. It is generally recommended that the kernel version be 3.10 or higher.
[0081] In response to the detection that the kernel version of each node in the system meets the preset standard, a unique identifier is set for each node, and the time of each node is synchronized. Setting a unique identifier means setting a unique hostname for each node and ensuring that the time of all nodes is synchronized. Time synchronization can be performed using NTP service (Network Time Protocol, a protocol used to synchronize computer time).
[0082] Construct a mapping relationship between unique identifiers and corresponding Internet Protocol (IP) addresses of physical networks, and add the mapping relationship to the target file of the corresponding node. The target file is the / etc / hosts file, that is, add the mapping between hostname and IP address (IP address) to the / etc / hosts file of all nodes.
[0083] Disable factors that affect the deployment of container clusters. These factors include at least firewalls, security protection systems (i.e., SELinux), and swap partitions. By disabling firewalls and SELinux, security policies can be prevented from affecting the normal operation of Kubernetes clusters. Kubernetes requires that swap partitions be disabled to improve cluster stability.
[0084] At the same time, install a containerized deployment environment, that is, install a Docker containerized environment, configure a Docker image accelerator to speed up image downloads, and add a YUM software repository to install Kubernetes-related components;
[0085] Upon detecting that the containerized deployment environment has been successfully installed, an initial container cluster is deployed based on the selected target container cluster deployment method. The cluster deployment method may include using kubeadm, minikube, or binary packages. In practice, the most suitable creation method can be selected according to specific needs and resource conditions. For example, for a test environment, minikube or kubeadm can be used for rapid setup. For a production environment, kubeadm or binary packages can be used to ensure the stability and security of the cluster. This application embodiment exemplifies the creation of a K8s cluster using kubeadm. Assuming the deployment environment is ready, the specific process further includes: installing Kubernetes core components such as kubeadm, kubelet, and kubectl using a package manager such as YUM or APT; using the `kubeadm config images list` command to view the required image list and from Docker... Download the required Kubernetes images from Hub or other image repositories; execute the kubeadminit command on the Master node (host node) and follow the prompts to complete the Master node initialization; add the Node nodes to the Kubernetes cluster using the kubeadmjoin command and specify the IP address and port of the Master node; deploy network plugins: Kubernetes clusters require network plugins to provide network communication between Pods (resource management components). Commonly used network plugins include Calico and Flannel.
[0086] During deployment, the status of each node is checked and any abnormalities are determined. Specifically, the kubectl get nodes command is used to view the status of nodes in the cluster, and the kubectl get pods--all-namespaces command is used to view the status of Pods in all namespaces in the cluster.
[0087] When an abnormal node status is detected, the system determines whether redeployment is necessary based on the abnormal node's status information and deployment progress. Specifically, if the abnormal node's status deviates significantly from its normal status and / or redeployment has a minor impact on the progress, then redeployment is required.
[0088] If a redeployment is detected, the process rolls back to the initial container cluster deployment step and redeploys.
[0089] Furthermore, such as Figure 4 As shown, in response to detecting that the initial container cluster has been deployed, the method includes:
[0090] The initial container cluster is divided into management areas and business areas. That is, a certain proportion of the nodes in the initial container cluster are allocated for deploying management nodes, and this area is called the management area. Similarly, the business area can be set at 10%, and 90% can be defined as the business area. The business area can serve different business departments. Therefore, the business area can be further divided according to the business service type. For example, 20% of the business area can be set as the Internet area, and the other 20% of the business area can be set as the core business area, etc.
[0091] The management network is based on the management network interface cards (NICs) connecting the management area and / or the service area, and the service NICs of the corresponding service area are based on the target service network. The physical links between the service networks of any two service areas are not connected; that is, the management NICs of each node are networked together using switches to generate the corresponding management network. Figure 5 As shown, the management network is 192.168.0.1 / 16. The network cards of the nodes in each subdivided business area are connected by switches to form a network, generating multiple business areas such as Internet business area and core business area. However, the physical links of the business networks in each business area are not connected. For example, the network of Internet business area is 172.10.0.1 / 16, and the network of core business area is 172.20.0.1 / 16, etc.
[0092] Based on the management network and at least one target service network, a container cluster is generated in which the management network and the service network are isolated from each other.
[0093] In some specific implementations, deploying corresponding nodes based on the regional attributes of each region in the container cluster includes:
[0094] When the target region is detected to be a managed region, a management node is deployed in the target region;
[0095] When the target region is detected to be a business region, a computing node is deployed in the target region.
[0096] The management node is used to manage the compute nodes. It is usually the master node in the Kubernetes cluster and can provide log services, monitoring services, API server (ApiServer), controller manager (ControllerManager), etc. The compute nodes are used to process the business corresponding to each region. They are usually the slave nodes in the Kubernetes cluster and can include container applications, container services, management agents, etc.
[0097] In the above implementation, a hybrid network with isolated management network and service network is constructed to generate a hybrid network for the K8s cluster, thereby achieving separation of management and service traffic, avoiding management traffic from occupying the bandwidth of the service network card, and meeting the user's requirement for isolation between the service network and management network of the K8s cluster.
[0098] S2: Based on network virtualization mechanisms, a virtual network connecting multiple nodes is constructed.
[0099] It should be noted that the network virtualization mechanism refers to Geneve or VXLan technologies. VXLan (Virtual Extensible Local Area Network) is a network virtualization technology that encapsulates traffic and extends it to a Layer 3 gateway, enabling virtual machines to access servers on external IP subnets. Geneve (Generic Network Virtualization Encapsulation) is a new open-source data virtualization encapsulation (tunneling) protocol designed to address the current lack of flexibility in data transmission and meet users' various flexible requirements in security and business application support. Both VXLan and Geneve technologies are designed to solve the scalability problem in large-scale cloud computing deployments.
[0100] In some specific implementations, such as Figure 6 As shown, building a virtual network connecting multiple nodes based on network virtualization mechanisms includes:
[0101] In response to the detection that the management network is operating normally, a virtual network is constructed based on the management network using the Geneve or VXLan strategy, wherein the virtual network is an Overlay tunnel network;
[0102] Based on the virtual network, multiple nodes in the container cluster are connected, wherein the Internet Protocol address of the virtual network does not overlap with the Internet Protocol addresses of the management network and the business network.
[0103] Specifically, on all nodes of the Kubernetes cluster, an overlay tunnel network is constructed using Geneve / VXLan technology, based on the management network. This overlay serves as the management network for the Kubernetes container cluster, connecting the compute nodes and management nodes within the cluster. Figure 6 As shown, the overlay network can be 10.10.0.1 / 16. The construction process of the overlay tunnel network is a common method and will not be elaborated here. This application embodiment uses a VXLAN tunnel network as an example. Figure 6 As shown, once constructed, the VXLAN tunnel network enables bidirectional network communication between management Pods in the management area and business Pods in the business area. For example, connecting lines ① and ③ connects the monitoring service in the management area to the management agent and container application in the Internet business area through the VXLAN tunnel network.
[0104] In the above implementation, a virtual network corresponding to the management network is constructed based on network virtualization technology. The management node and business node of the K8s container cluster are connected through this virtual network, realizing bidirectional network communication between the management node and the business node, and improving the reliability of network communication in the container cluster.
[0105] S3: Obtain at least one Internet Protocol address in the virtual network and assign the Internet Protocol address to the resource management component of the target category on each node.
[0106] It should be noted that the Internet Protocol address refers to the IP address in the Overlay tunnel network, the target category refers to either the management category or the business category, and the resource management component refers to the management Pod and the business Pod on each node in the Kubernetes container cluster.
[0107] In some specific implementations, the resource management component that assigns Internet Protocol addresses on the virtual network to target categories on each node includes:
[0108] Obtain relevant information about the virtual network, including available Internet Protocol addresses and used Internet Protocol addresses, i.e., available IP addresses and used IP addresses;
[0109] In response to the detection of an Internet Protocol address allocation request, the available Internet Protocol addresses are allocated to the management resource management components on each node. The Internet Protocol address allocation request is used to request the allocation of Internet Protocol addresses for the management resource management components, that is, to allocate the IP address of this Overlay tunnel network to the management Pods on the management nodes and compute nodes. The IP address range of this Overlay network cannot overlap with the physical network (including the management network and the service network). Management Pods communicate with each other based on this IP address.
[0110] In some specific embodiments, the method further includes:
[0111] Based on the business network, the business container Pods are directly assigned the business network IP address of the local business region, without tunnel encapsulation. This ensures the performance of the business container Pods while allowing applications outside the local business region cluster to directly communicate with them. Figure 6 The connection line ② shown can enable communication between business container Pods in the core business area through the core business network. The veth devices located at both ends of the connection line ② are virtual network devices in Linux. They exist in pairs and allow communication between two network namespaces. Each pair of veth devices consists of two endpoints. Data sent from one endpoint can be received by the other endpoint, thereby realizing network communication between two network namespaces.
[0112] In the above implementation, the IP addresses of the virtual network are assigned to management Pods on different nodes. Traffic between business container Pods uses the business network interface card (NIC), and traffic between management Pods uses the management NIC. While not exposing the management network to business Pod containers, network communication between management Pods and business Pods can be achieved through the management NIC, which improves the versatility and security of network communication in the container cluster.
[0113] S4: Based on the resource management component that has been assigned the Internet Protocol address and the virtual network, respond to the network service request issued by the target node to realize network communication in hybrid networking.
[0114] It should be noted that the network service request includes the target IP address, i.e., the target Internet Protocol address, which is used to identify the corresponding Pod, i.e., the resource management component.
[0115] In some specific implementations, responding to a service request issued by the target resource management component, based on the resource management component that has been assigned the Internet Protocol address and the virtual network, includes:
[0116] In response to receiving a service request, the category of the target resource management component that issued the service request is detected, that is, whether the service request is issued by a management Pod or a business Pod, in order to determine the Pod category that needs to be matched;
[0117] In response to the detection that the category is management, it is determined whether the target Internet Protocol address corresponding to the service request is on the node to which the target resource management component belongs, that is, whether the target Internet Protocol address is the IP address of the node where the management Pod that issued the request is located;
[0118] In response to the detection that the target Internet Protocol address corresponding to the service request is not on the node to which the target resource management component belongs, the service request is sent to the business resource management component of another node to which the target Internet Protocol address belongs based on the virtual network. That is, if the Internet Protocol address is a business Pod that is not on this node, the request is sent to the IP address of the business Pod on another node through the VXLAN tunnel network.
[0119] In response to the detection that the category is a business category, it is determined whether the target Internet Protocol address corresponding to the service request is on the node to which the target resource management component belongs. Similarly, it is determined whether the target Internet Protocol address is the IP address of the node where the business category Pod that made the request is located.
[0120] In response to the detection that the target Internet Protocol address corresponding to the service request is not on the node to which the target resource management component belongs, the service request is sent to the management resource management component of another node to which the target Internet Protocol address belongs based on the virtual network. That is, if the Internet Protocol address is a management Pod that is not on this node, the request is sent to the IP address of the management Pod on another node through the VXLAN tunnel network, thereby realizing bidirectional network communication between management Pods and business Pods based on the overlay tunnel on the management network.
[0121] In some specific implementations, if a service request is detected to be issued by a business-class Pod of a business area node, and its target Internet Protocol address is a business-class Pod of a node in this business area, then the business network of that business area is used for network communication.
[0122] In the above implementation, the business application Pod accesses the log, monitoring and other services provided by the management network based on the constructed virtual network. Conversely, the management service Pod also accesses the business container Pod based on this virtual network. Throughout the communication process, the business application Pod is unaware of the existence of the real management network. Without allocating multiple IPs, network interconnection between the management Pod and the business Pod is achieved, which is highly secure. At the same time, the separation of management and business traffic is achieved, avoiding the management traffic from occupying the bandwidth of the business network card, and meeting the user's requirement for isolation between the business network and management network of the K8s cluster.
[0123] In some specific implementations, the method further includes, during the process of responding to a network service request issued by the target node:
[0124] The virtual network is segmented for detection. Segmentation can be done by dividing the network proportionally according to parameters set according to actual needs. For example, if the parameter is 8, the virtual network will be divided into 8 network segments proportionally. Alternatively, the virtual network can be segmented according to its importance. For example, the first 20% is a level 1 important network segment, the middle 40% is a level 2 important network segment, and the last 40% is a level 3 important network segment. The level 2 segment is more important than the level 3 segment, and the level 3 segment is more important than the level 1 segment. The segmentation method can be selected according to the actual scenario. Examples will not be elaborated here.
[0125] In response to the detection of an anomaly in the virtual network of the target segment, a backup link pre-configured on the virtual network is obtained. The anomaly in the virtual network can be determined by comparing network parameters such as bandwidth with regular parameters.
[0126] In response to the detection that a backup link is available, the bandwidth of the available link is matched with the bandwidth of the virtual network of the target segment.
[0127] When a successful match is detected between the target available link and the virtual network of the target segment, i.e. the absolute value of the difference in bandwidth between the two is within a preset range, the virtual network of the target segment is replaced by the target available link. The preset range can be set according to actual needs.
[0128] If multiple available links to a target segment are successfully matched with the virtual network of the target segment, the network communication time of the entire virtual network is first determined when each available link to a target segment replaces the virtual network of the target segment.
[0129] Select the target available link with the shortest network communication time as the backup link to be used for replacement, and then replace it.
[0130] If no corresponding backup link is found or there is no backup link, an early warning message will be sent to the user terminal to remind the user to check and handle the abnormal network in a timely manner.
[0131] In the above implementation, by segmenting and monitoring the virtual network, abnormal locations can be effectively identified, and corresponding backup links can be matched to replace abnormal network disconnections, so as to restore the overall network communication in a timely manner. If real-time recovery is not possible, users will be promptly notified, thereby improving the reliability of network communication in hybrid networking.
[0132] The aforementioned network communication method based on hybrid networking includes: deploying a container cluster with a management network and a service network isolated from each other, and deploying corresponding nodes according to the regional attributes of each region in the container cluster. The nodes include at least one of the following: compute nodes and management nodes; constructing a virtual network connecting multiple nodes based on a network virtualization mechanism; obtaining at least one Internet Protocol (IP) address from the virtual network and allocating the IP address to a target category resource management component on each node; and responding to network service requests issued by target nodes based on the allocated IP address resource management component and the virtual network to achieve network communication in hybrid networking. This application enables network communication in scenarios where the management network and service network are isolated. This system enables hybrid networking for Kubernetes clusters. Management service Pods communicate via the management network, while application Pods communicate via the business network. Application Pods also communicate via an overlay tunnel built on the management network to access services such as logging and monitoring provided by the management network. Conversely, management service Pods access application container Pods via this overlay tunnel network. Throughout the entire communication process, application Pods are unaware of the existence of the real management network. Without allocating multiple IPs, network communication between management Pods and application Pods is achieved, ensuring high security. It also separates management and application traffic, preventing management traffic from consuming bandwidth on application network cards and meeting the user's requirement for isolation between the application network and management network in the Kubernetes cluster.
[0133] It should be understood that, although Figure 2 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 2 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0134] In one embodiment, such as Figure 7 As shown, a network communication device based on hybrid networking is provided, including: a deployment module, a virtual network construction module, an allocation module, and a request-response module, wherein:
[0135] The deployment module is used to deploy a container cluster in which the management network and the business network are isolated from each other, and to deploy corresponding nodes according to the regional attributes of each region in the container cluster. The nodes include at least one of the following: compute nodes and management nodes.
[0136] The virtual network building module is used to build virtual networks that connect multiple nodes based on network virtualization mechanisms;
[0137] The allocation module is used to obtain at least one Internet Protocol address in the virtual network and allocate the Internet Protocol address to the resource management component of the target category on each node;
[0138] The request-response module is used to respond to network service requests issued by the target node based on the resource management component with the allocated Internet Protocol address and the virtual network, so as to realize network communication in hybrid networking.
[0139] In a preferred embodiment of the present invention, the deployment module is specifically used for:
[0140] The system checks whether the kernel version of each node conforms to a preset standard.
[0141] In response to the detection that the kernel version of each node in the system meets the preset standard, a unique identifier is set for each node, and the time of each node is synchronized;
[0142] Construct a mapping relationship between unique identifiers and corresponding Internet protocols of physical networks, and add the mapping relationship to the target file of the corresponding node;
[0143] Disable factors that affect the deployment of container clusters, including at least firewalls, security systems, and swap partitions;
[0144] At the same time, install a containerized deployment environment;
[0145] Upon detecting that the containerized deployment environment has been successfully installed, an initial container cluster is deployed based on the selected target container cluster deployment method.
[0146] During deployment, the status of each node is monitored, and any anomalies are identified.
[0147] When an abnormal node status is detected, the system determines whether redeployment is necessary based on the abnormal node's status information and deployment progress.
[0148] If a redeployment is detected, the process rolls back to the initial container cluster deployment step and redeploys.
[0149] In a preferred embodiment of the present invention, the deployment module is further configured to:
[0150] The initial container cluster is divided into management areas and business areas;
[0151] The management network card is connected to the management area and / or the service area via the management network, and the service network card is connected to the corresponding service area via the target service network, wherein the physical links of the service networks of any two service areas are not connected.
[0152] Based on the management network and at least one target service network, a container cluster is generated in which the management network and the service network are isolated from each other.
[0153] In a preferred embodiment of the present invention, the deployment module is further configured to:
[0154] When the target region is detected to be a managed region, a management node is deployed in the target region;
[0155] When the target region is detected to be a business region, a computing node is deployed in the target region.
[0156] In a preferred embodiment of the present invention, the virtual network construction module is specifically used for:
[0157] In response to the detection that the management network is operating normally, a virtual network is constructed based on the management network using the Geneve or VXLan strategy;
[0158] Based on the virtual network, multiple nodes in the container cluster are connected, wherein the Internet Protocol address of the virtual network does not overlap with the Internet Protocol addresses of the management network and the business network.
[0159] In a preferred embodiment of the present invention, the allocation module is specifically used for:
[0160] Obtain relevant information about the virtual network, including available Internet Protocol (IP) addresses and used IP addresses;
[0161] In response to the detection of an Internet Protocol address allocation request, the available Internet Protocol addresses are allocated to the management resource management components on each node, wherein the Internet Protocol address allocation request is used to request the allocation of Internet Protocol addresses for the management resource management components.
[0162] In a preferred embodiment of the present invention, the request-response module is specifically used for:
[0163] Upon receiving a service request, the category of the target resource management component that issued the service request is detected;
[0164] In response to detecting that the category is management, determine whether the target Internet Protocol address corresponding to the service request is in the node to which the target resource management component belongs;
[0165] In response to detecting that the target Internet Protocol address corresponding to the service request is not in the node to which the target resource management component belongs, the service request is sent to the business resource management component of another node to which the target Internet Protocol address belongs, based on the virtual network;
[0166] In response to detecting that the category is a business category, determine whether the target Internet Protocol address corresponding to the service request is in the node to which the target resource management component belongs;
[0167] In response to detecting that the target Internet Protocol address corresponding to the service request is not in the node to which the target resource management component belongs, the service request is sent to the management resource management component of another node to which the target Internet Protocol address belongs based on the virtual network.
[0168] Specific limitations regarding hybrid networking-based network communication devices can be found in the limitations of hybrid networking-based network communication methods described above, and will not be repeated here. Each module in the aforementioned hybrid networking-based network communication device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0169] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 8 As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a network communication method based on hybrid networking. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.
[0170] Those skilled in the art will understand that Figure 8The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0171] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:
[0172] S1: Deploy a container cluster in which the management network and the business network are isolated from each other, and deploy corresponding nodes according to the regional attributes of each region in the container cluster. The nodes include at least one of the following: compute nodes and management nodes;
[0173] S2: Based on network virtualization mechanisms, a virtual network connecting multiple nodes is constructed;
[0174] S3: Obtain at least one Internet Protocol address in the virtual network and assign the Internet Protocol address to the resource management component of the target category on each node;
[0175] S4: Based on the resource management component that has been assigned the Internet Protocol address and the virtual network, respond to the network service request issued by the target node to realize network communication in hybrid networking.
[0176] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0177] The system checks whether the kernel version of each node conforms to a preset standard.
[0178] In response to the detection that the kernel version of each node in the system meets the preset standard, a unique identifier is set for each node, and the time of each node is synchronized;
[0179] Construct a mapping relationship between unique identifiers and corresponding Internet protocols of physical networks, and add the mapping relationship to the target file of the corresponding node;
[0180] Disable factors that affect the deployment of container clusters, including at least firewalls, security systems, and swap partitions;
[0181] At the same time, install a containerized deployment environment;
[0182] Upon detecting that the containerized deployment environment has been successfully installed, an initial container cluster is deployed based on the selected target container cluster deployment method.
[0183] During deployment, the status of each node is monitored, and any anomalies are identified.
[0184] When an abnormal node status is detected, the system determines whether redeployment is necessary based on the abnormal node's status information and deployment progress.
[0185] If a redeployment is detected, the process rolls back to the initial container cluster deployment step and redeploys.
[0186] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0187] The initial container cluster is divided into management areas and business areas;
[0188] The management network card is connected to the management area and / or the service area via the management network, and the service network card is connected to the corresponding service area via the target service network, wherein the physical links of the service networks of any two service areas are not connected.
[0189] Based on the management network and at least one target service network, a container cluster is generated in which the management network and the service network are isolated from each other.
[0190] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0191] When the target region is detected to be a managed region, a management node is deployed in the target region;
[0192] When the target region is detected to be a business region, a computing node is deployed in the target region.
[0193] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0194] In response to the detection that the management network is operating normally, a virtual network is constructed based on the management network using the Geneve or VXLan strategy;
[0195] Based on the virtual network, multiple nodes in the container cluster are connected, wherein the Internet Protocol address of the virtual network does not overlap with the Internet Protocol addresses of the management network and the business network.
[0196] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0197] Obtain relevant information about the virtual network, including available Internet Protocol (IP) addresses and used IP addresses;
[0198] In response to the detection of an Internet Protocol address allocation request, the available Internet Protocol addresses are allocated to the management resource management components on each node, wherein the Internet Protocol address allocation request is used to request the allocation of Internet Protocol addresses for the management resource management components.
[0199] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0200] Upon receiving a service request, the category of the target resource management component that issued the service request is detected;
[0201] In response to detecting that the category is management, determine whether the target Internet Protocol address corresponding to the service request is in the node to which the target resource management component belongs;
[0202] In response to detecting that the target Internet Protocol address corresponding to the service request is not in the node to which the target resource management component belongs, the service request is sent to the business resource management component of another node to which the target Internet Protocol address belongs, based on the virtual network;
[0203] In response to detecting that the category is a business category, determine whether the target Internet Protocol address corresponding to the service request is in the node to which the target resource management component belongs;
[0204] In response to detecting that the target Internet Protocol address corresponding to the service request is not in the node to which the target resource management component belongs, the service request is sent to the management resource management component of another node to which the target Internet Protocol address belongs based on the virtual network.
[0205] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0206] S1: Deploy a container cluster in which the management network and the business network are isolated from each other, and deploy corresponding nodes according to the regional attributes of each region in the container cluster. The nodes include at least one of the following: compute nodes and management nodes;
[0207] S2: Based on network virtualization mechanisms, a virtual network connecting multiple nodes is constructed;
[0208] S3: Obtain at least one Internet Protocol address in the virtual network and assign the Internet Protocol address to the resource management component of the target category on each node;
[0209] S4: Based on the resource management component that has been assigned the Internet Protocol address and the virtual network, respond to the network service request issued by the target node to realize network communication in hybrid networking.
[0210] In one embodiment, when the computer program is executed by the processor, it further performs the following steps:
[0211] The system checks whether the kernel version of each node conforms to a preset standard.
[0212] In response to the detection that the kernel version of each node in the system meets the preset standard, a unique identifier is set for each node, and the time of each node is synchronized;
[0213] Construct a mapping relationship between unique identifiers and corresponding Internet protocols of physical networks, and add the mapping relationship to the target file of the corresponding node;
[0214] Disable factors that affect the deployment of container clusters, including at least firewalls, security systems, and swap partitions;
[0215] At the same time, install a containerized deployment environment;
[0216] Upon detecting that the containerized deployment environment has been successfully installed, an initial container cluster is deployed based on the selected target container cluster deployment method.
[0217] During deployment, the status of each node is monitored, and any anomalies are identified.
[0218] When an abnormal node status is detected, the system determines whether redeployment is necessary based on the abnormal node's status information and deployment progress.
[0219] If a redeployment is detected, the process rolls back to the initial container cluster deployment step and redeploys.
[0220] In one embodiment, when the computer program is executed by the processor, it further performs the following steps:
[0221] The initial container cluster is divided into management areas and business areas;
[0222] The management network card is connected to the management area and / or the service area via the management network, and the service network card is connected to the corresponding service area via the target service network, wherein the physical links of the service networks of any two service areas are not connected.
[0223] Based on the management network and at least one target service network, a container cluster is generated in which the management network and the service network are isolated from each other.
[0224] In one embodiment, when the computer program is executed by the processor, it further performs the following steps:
[0225] When the target region is detected to be a managed region, a management node is deployed in the target region;
[0226] When the target region is detected to be a business region, a computing node is deployed in the target region.
[0227] In one embodiment, when the computer program is executed by the processor, it further performs the following steps:
[0228] In response to the detection that the management network is operating normally, a virtual network is constructed based on the management network using the Geneve or VXLan strategy;
[0229] Based on the virtual network, multiple nodes in the container cluster are connected, wherein the Internet Protocol address of the virtual network does not overlap with the Internet Protocol addresses of the management network and the business network.
[0230] In one embodiment, when the computer program is executed by the processor, it further performs the following steps:
[0231] Obtain relevant information about the virtual network, including available Internet Protocol (IP) addresses and used IP addresses;
[0232] In response to the detection of an Internet Protocol address allocation request, the available Internet Protocol addresses are allocated to the management resource management components on each node, wherein the Internet Protocol address allocation request is used to request the allocation of Internet Protocol addresses for the management resource management components.
[0233] In one embodiment, when the computer program is executed by the processor, it further performs the following steps:
[0234] Upon receiving a service request, the category of the target resource management component that issued the service request is detected;
[0235] In response to detecting that the category is management, determine whether the target Internet Protocol address corresponding to the service request is in the node to which the target resource management component belongs;
[0236] In response to detecting that the target Internet Protocol address corresponding to the service request is not in the node to which the target resource management component belongs, the service request is sent to the business resource management component of another node to which the target Internet Protocol address belongs, based on the virtual network;
[0237] In response to detecting that the category is a business category, determine whether the target Internet Protocol address corresponding to the service request is in the node to which the target resource management component belongs;
[0238] In response to detecting that the target Internet Protocol address corresponding to the service request is not in the node to which the target resource management component belongs, the service request is sent to the management resource management component of another node to which the target Internet Protocol address belongs based on the virtual network.
[0239] In one embodiment, a computer program product is provided, the computer program product comprising a computer program that, when executed by a processor, performs the following steps:
[0240] S1: Deploy a container cluster in which the management network and the business network are isolated from each other, and deploy corresponding nodes according to the regional attributes of each region in the container cluster. The nodes include at least one of the following: compute nodes and management nodes;
[0241] S2: Based on network virtualization mechanisms, a virtual network connecting multiple nodes is constructed;
[0242] S3: Obtain at least one Internet Protocol address in the virtual network and assign the Internet Protocol address to the resource management component of the target category on each node;
[0243] S4: Based on the resource management component that has been assigned the Internet Protocol address and the virtual network, respond to the network service request issued by the target node to realize network communication in hybrid networking.
[0244] In one embodiment, when the computer program is executed by the processor, it further performs the following steps:
[0245] The system checks whether the kernel version of each node conforms to a preset standard.
[0246] In response to the detection that the kernel version of each node in the system meets the preset standard, a unique identifier is set for each node, and the time of each node is synchronized;
[0247] Construct a mapping relationship between unique identifiers and corresponding Internet protocols of physical networks, and add the mapping relationship to the target file of the corresponding node;
[0248] Disable factors that affect the deployment of container clusters, including at least firewalls, security systems, and swap partitions;
[0249] At the same time, install a containerized deployment environment;
[0250] Upon detecting that the containerized deployment environment has been successfully installed, an initial container cluster is deployed based on the selected target container cluster deployment method.
[0251] During deployment, the status of each node is monitored, and any anomalies are identified.
[0252] When an abnormal node status is detected, the system determines whether redeployment is necessary based on the abnormal node's status information and deployment progress.
[0253] If a redeployment is detected, the process rolls back to the initial container cluster deployment step and redeploys.
[0254] In one embodiment, when the computer program is executed by the processor, it further performs the following steps:
[0255] The initial container cluster is divided into management areas and business areas;
[0256] The management network card is connected to the management area and / or the service area via the management network, and the service network card is connected to the corresponding service area via the target service network, wherein the physical links of the service networks of any two service areas are not connected.
[0257] Based on the management network and at least one target service network, a container cluster is generated in which the management network and the service network are isolated from each other.
[0258] In one embodiment, when the computer program is executed by the processor, it further performs the following steps:
[0259] When the target region is detected to be a managed region, a management node is deployed in the target region;
[0260] When the target region is detected to be a business region, a computing node is deployed in the target region.
[0261] In one embodiment, when the computer program is executed by the processor, it further performs the following steps:
[0262] In response to the detection that the management network is operating normally, a virtual network is constructed based on the management network using the Geneve or VXLan strategy;
[0263] Based on the virtual network, multiple nodes in the container cluster are connected, wherein the Internet Protocol address of the virtual network does not overlap with the Internet Protocol addresses of the management network and the business network.
[0264] In one embodiment, when the computer program is executed by the processor, it further performs the following steps:
[0265] Obtain relevant information about the virtual network, including available Internet Protocol (IP) addresses and used IP addresses;
[0266] In response to the detection of an Internet Protocol address allocation request, the available Internet Protocol addresses are allocated to the management resource management components on each node, wherein the Internet Protocol address allocation request is used to request the allocation of Internet Protocol addresses for the management resource management components.
[0267] In one embodiment, when the computer program is executed by the processor, it further performs the following steps:
[0268] Upon receiving a service request, the category of the target resource management component that issued the service request is detected;
[0269] In response to detecting that the category is management, determine whether the target Internet Protocol address corresponding to the service request is in the node to which the target resource management component belongs;
[0270] In response to detecting that the target Internet Protocol address corresponding to the service request is not in the node to which the target resource management component belongs, the service request is sent to the business resource management component of another node to which the target Internet Protocol address belongs, based on the virtual network;
[0271] In response to detecting that the category is a business category, determine whether the target Internet Protocol address corresponding to the service request is in the node to which the target resource management component belongs;
[0272] In response to detecting that the target Internet Protocol address corresponding to the service request is not in the node to which the target resource management component belongs, the service request is sent to the management resource management component of another node to which the target Internet Protocol address belongs based on the virtual network.
[0273] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0274] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0275] The embodiments described above are merely examples of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application.
Claims
1. A network communication method based on hybrid networking, characterized by, The method comprises: deploying a container cluster in which the management network and the business network are isolated from each other, and deploying a corresponding node according to the regional attribute of each region in the container cluster, the node comprising at least one of the following: a computing node and a management node; constructing a virtual network connecting multiple nodes based on a network virtualization mechanism; obtaining at least one Internet Protocol address in the virtual network, and assigning the Internet Protocol address to a target category of resource management components on each node; based on the resource management components to which the Internet Protocol address has been assigned and the virtual network, responding to a network service request issued by a target node to achieve network communication of hybrid networking; based on the resource management components to which the Internet Protocol address has been assigned and the virtual network, responding to a service request issued by a target resource management component comprises: in response to receiving a service request, detecting the category of the target resource management component that issued the service request; in response to detecting that the category is a management category, determining whether the target Internet Protocol address corresponding to the service request is in the node to which the target resource management component belongs; in response to detecting that the target Internet Protocol address corresponding to the service request is not in the node to which the target resource management component belongs, sending the service request to a business category resource management component of another node to which the target Internet Protocol address belongs based on the virtual network; in response to detecting that the category is a business category, determining whether the target Internet Protocol address corresponding to the service request is in the node to which the target resource management component belongs; in response to detecting that the target Internet Protocol address corresponding to the service request is not in the node to which the target resource management component belongs, sending the service request to a management category resource management component of another node to which the target Internet Protocol address belongs based on the virtual network.
2. The hybrid networking based network communication method of claim 1, wherein, The deployment method of the container cluster in which the management network and the business network are isolated from each other comprises: detecting whether the kernel version of each node in the system meets a preset standard; in response to detecting that the kernel version of each node in the system meets the preset standard, setting a unique identifier for each node and synchronizing the time of each node; constructing a mapping relationship between the unique identifier and the Internet Protocol of the corresponding physical network, and adding the mapping relationship to the target file of the corresponding node; turning off influencing factors affecting the deployment of the container cluster, the influencing factors at least including a firewall, a security protection system, and a switching partition; at the same time, installing a containerized deployment environment; in response to detecting that the containerized deployment environment has been successfully installed, deploying an initial container cluster based on a selected target container cluster deployment mode; during the deployment process, detecting the state of each node and determining whether an exception occurs; in response to detecting that the state of the node is abnormal, determining whether re-deployment is needed according to the state information of the abnormal node and the deployment progress; in response to detecting that re-deployment is needed, rolling back to the step of deploying the initial container cluster and re-deploying.
3. The hybrid networking based network communication method of claim 2, wherein, in response to detecting that the initial container cluster has been deployed, the method comprises: dividing the initial container cluster into a management region and a business region; The management network card is connected with the management area and / or the service area based on a management network, and the service network card is connected with the corresponding service area based on a target service network, wherein the service network physical links of any two service areas are not connected; Based on the management network and at least one target service network, a container cluster is generated, which is isolated from the management network and the service network.
4. The hybrid networking based network communication method of claim 3, wherein, Deploying the corresponding nodes according to the area attribute of each area in the container cluster includes: In response to detecting that the area attribute of a target area is a management area, deploying a management node in the target area; In response to detecting that the area attribute of a target area is a service area, deploying a computing node in the target area.
5. The hybrid networking based network communication method of claim 1, wherein, Based on a network virtualization mechanism, a virtual network connected with multiple nodes is constructed, which includes: In response to detecting that the management network is in a normal operating state, a virtual network is constructed based on the management network using a Geneve or VXLan strategy; Based on the virtual network, multiple nodes in the container cluster are connected, wherein the Internet Protocol address of the virtual network does not overlap with the Internet Protocol addresses of the management network and the service network.
6. The hybrid networking based network communication method according to claim 1 or 5, wherein, Allocating the Internet Protocol address on the virtual network to the target category of resource management components on each node includes: Obtaining related information of the virtual network, including available Internet Protocol addresses and used Internet Protocol addresses; In response to detecting an Internet Protocol address allocation request, allocating the available Internet Protocol addresses to the management class resource management components on each node, wherein the Internet Protocol address allocation request is used to request allocation of an Internet Protocol address for the management class resource management components.
7. A hybrid networking-based network communication apparatus for implementing the hybrid networking-based network communication method according to claim 1, characterized by, The apparatus includes: A deployment module for deploying a container cluster isolated from the management network and the service network, and deploying the corresponding nodes according to the area attribute of each area in the container cluster, wherein the nodes include at least one of the following: computing nodes and management nodes; A virtual network construction module for constructing a virtual network connected with multiple nodes based on a network virtualization mechanism; An allocation module for obtaining at least one Internet Protocol address in the virtual network, and allocating the Internet Protocol address to the target category of resource management components on each node; A request response module for responding to a network service request issued by a target node based on the resource management components to which the Internet Protocol addresses have been allocated and the virtual network, to realize network communication of hybrid networking.
8. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the method of any one of claims 1-6.
9. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the method of any one of claims 1-6.
Citation Information
Patent Citations
Dynamic IP address acquisition method, system and device for virtual machines
CN104468574A
Deployment method and device for open virtual network
CN113472575A