DPU-based k8s cluster deployment method, apparatus and device, and storage medium

By creating logically bound virtual function ports and uplink interfaces in DPU scenarios, dynamically aggregating multiple VF interfaces, the problem of resource limitation of a single VF interface is solved, the forwarding performance of cloud-native networks is improved, and high bandwidth and high throughput are met. demand.

CN119211023AActive Publication Date: 2024-12-27YUSUR TECH CO LTD

Patent Information

Application Number
CN202411269252.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-11
Publication Date
2024-12-27
Estimated Expiration
2044-09-11

AI Technical Summary

Technical Problem

In the DPU scenario, a single virtualized SRIOV interface has become a network forwarding performance bottleneck for Pod instances in cloud-native networks due to resource limitations such as hardware queues, and cannot effectively meet the needs of high bandwidth and high throughput.

Method used

By creating a logically bound virtual function port, dynamically aggregating multiple virtual function interfaces, forming a logically bound virtual function representative port and uplink interface, and adding it to the OVS bridge, realizing dynamic link aggregation mode and improving network forwarding performance .

Benefits of technology

By aggregating multiple VF interfaces, the network forwarding performance of Pod instances is significantly improved, the resource limitation of a single VF interface is avoided, and the bandwidth and throughput performance limits of the application are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119211023A_ABST
    Figure CN119211023A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a k8s cluster deployment method and device based on a DPU, equipment and a storage medium, and the method comprises the steps that k8s receives a container instance deployed by a user, and determines two virtual function ports; acquiring an identifier of a corresponding device, and calling a network container interface; adding the virtual function port into the logic binding virtual function port according to the identifier, and adding the logic binding virtual function port into the kernel namespace of the container; allocating an IP address to the network interface through a controller plug-in of the software defined network; adding two corresponding virtual function representative ports as sub-interfaces to the logic binding virtual function representative port, and setting the working mode of the logic binding virtual function representative port as a dynamic link convergence mode; the representative port is added to the OVS network bridge; and the flow table and the configuration information related to the container are issued to the OVS instance, so that the network forwarding performance of the container instance in the cloud native cluster can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of data processing technology, and in particular to a DPU-based k8s cluster deployment method, device, equipment and storage medium. Background Art

[0002] The current DPU network card usually uses a cloud-native network traffic offloading method based on Open Virtual Network (OVN). In this method, when the user creates a container Pod or a virtual machine VM instance, Kubernetes first calls the single root virtualization device plugin (SRIOV device plugin, SRIOV-DP CNI), selects a virtual function VF interface that meets the requirements from the user-defined SRIOV resource pool, and then passes the selected VF device ID to the controller plugin (ovn-kubernetes CNI) of the OVN K8s software-defined network. The ovn-kubernetes CNI adds the VF device to the newly created Pod or virtual machine instance. At the same time, the two components of OVN deployed on the DPU SoC side, the DPU system-on-chip component (OVN Soc module) and the OVN control component (OVN Controller), respond to the event of instance scheduling. The OVN Soc module adds the representative port vfr corresponding to the VF to the ovs bridge. The OVN Controller obtains the relevant flow table from the open virtual network interface (OVN DB) and sends it to the OVS instance. OVS forwards network traffic related to the Pod or VM instance.

[0003] However, SRIOV-DP and ovn-kubernetes CNI only allocate one VF for each Pod or VM. Limited by the hardware queues and other hardware resources available to each VF, when the computing resources of the cloud server are powerful enough, the bandwidth and throughput performance required for sending and receiving network data for the applications running in the Pod will be very high, especially in the DPU scenario. After the DPU network traffic hardware offload feature is enabled, the hardware forwarding efficiency on the DPU is greatly improved. At this time, the hardware resources available to the VF in the Pod / VM on the Host side will become a performance bottleneck. If CNI can create and add a dynamic aggregate interface containing multiple VFs for each Pod or VM instance, the hardware resources of the Pod or VM interface will be expanded exponentially, thereby increasing the performance upper limit of the bandwidth and throughput provided by a single instance to the application. Summary of the invention

[0004] An embodiment of the present application provides a DPU-based k8s cluster deployment method to improve the performance of network forwarding of container instances in a cloud native cluster.

[0005] In a first aspect, an embodiment of the present application provides a DPU-based k8s cluster deployment method, including:

[0006] Receive a container instance deployed by a user, and determine two virtual function ports and corresponding second identifiers;

[0007] Obtaining a first identifier of a device corresponding to the two virtual function ports, and calling a container network interface plug-in, wherein the container network interface plug-in is used to create a logically bound virtual function port, and the working mode of creating the logically bound virtual function port is a dynamic link aggregation mode;

[0008] adding the two virtual function ports to the logical binding virtual function port according to the first identifier; adding the logical binding virtual function port to the kernel namespace of the container, the logical binding virtual function port being the network interface of the container, and assigning an IP address to the network interface of the container through a controller plug-in of a software defined network;

[0009] Sending the first identifier and the second identifier, wherein the first identifier is used to create a logically bound virtual function representative interface, and the second identifier is used to create a logically bound uplink interface;

[0010] According to the second identifier, two uplink interfaces corresponding to the two physical function interfaces are added as sub-interfaces to the logical binding uplink interface, and the working mode of the logical binding uplink interface is set to a dynamic link aggregation mode;

[0011] Add the logical binding virtual function representative port and the logical binding uplink interface to the OVS bridge;

[0012] Obtain the OVS configuration information of the flow table related to the container and the logically bound virtual function representative port;

[0013] The flow table related to the container and the OVS configuration information are sent to the OVS instance.

[0014] In a possible implementation, the two virtual function ports belong to different physical function ports, the two virtual function ports include a first virtual function port and a second virtual function port, and the first virtual function port and the second virtual function port correspond to different resource pools.

[0015] In a possible implementation manner, the second identifier includes a third identifier and the fourth identifier, the third identifier corresponds to the first virtual function port, and the fourth identifier corresponds to the second virtual function port.

[0016] In a possible implementation, the container network interface plug-in is used to create the logical binding virtual function port for the container instance according to the CRD resource definition when the container instance is scheduled by the working node.

[0017] In a second aspect, an embodiment of the present application provides a k8s cluster deployment device based on DPU, including:

[0018] A receiving module, configured to receive a container instance deployed by a user and determine two virtual function ports and corresponding second identifiers;

[0019] A first acquisition module is used to obtain a first identifier of a device corresponding to the two virtual function ports, and call a container network interface plug-in, wherein the container network interface plug-in is used to create a logical binding virtual function port, and the working mode of creating the logical binding virtual function port is a dynamic link aggregation mode;

[0020] A first adding module is used to add the two virtual function ports to the logical binding virtual function port according to the first identifier; add the logical binding virtual function port to the kernel namespace of the container, the logical binding virtual function port is the network interface of the container, and allocate an IP address to the network interface of the container through a controller plug-in of a software defined network;

[0021] A first sending module, configured to send the first identifier and the second identifier, wherein the first identifier is used to create a logically bound virtual function representative interface, and the second identifier is used to create a logically bound uplink interface;

[0022] A second adding module, configured to add two uplink interfaces corresponding to two physical function interfaces as sub-interfaces to the logical binding uplink interface according to the second identifier, wherein the working mode of the logical binding uplink interface is set to a dynamic link aggregation mode;

[0023] A third adding module adds the logical binding virtual function representative port and the logical binding uplink interface to the OVS bridge;

[0024] The second acquisition module is used to obtain the OVS configuration information of the flow table related to the container and the logically bound virtual function representative port;

[0025] The second sending module is used to send the flow table related to the container and the OVS configuration information to the OVS instance.

[0026] In a possible implementation, the two virtual function ports belong to different physical function ports, the two virtual function ports include a first virtual function port and a second virtual function port, and the first virtual function port and the second virtual function port correspond to different resource pools.

[0027] In a possible implementation manner, the second identifier includes a third identifier and the fourth identifier, the third identifier corresponds to the first virtual function port, and the fourth identifier corresponds to the second virtual function port.

[0028] In a possible implementation, the container network interface plug-in is used to create the logical binding virtual function port for the container instance according to the CRD resource definition when the container instance is scheduled by the working node.

[0029] In a third aspect, an embodiment of the present application further provides an electronic device, the electronic device comprising:

[0030] at least one processor;

[0031] and a memory communicatively coupled to the at least one processor;

[0032] Among them, the memory stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor to enable the electronic device to execute the k8s cluster deployment method corresponding to any embodiment in the first aspect of the embodiments of the present application.

[0033] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, in which computer execution instructions are stored. When the computer execution instructions are executed by a processor, they are used to implement a k8s cluster deployment method as described in any of the first aspects of the embodiments of the present application.

[0034] In a fifth aspect, the present disclosure further provides a computer program product, which includes computer execution instructions, which, when executed by a processor, are used to implement a k8s cluster deployment method as described in any embodiment corresponding to the first aspect of the present disclosure.

[0035] In summary, the method shown in the embodiment of the present application, when a single virtualized SRIOV interface becomes a network forwarding performance bottleneck of the Pod instance in the cloud native network due to resource limitations such as hardware queues, the Pod instance can obtain higher network forwarding performance by aggregating multiple VF interfaces. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0037] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0038] Figure 1 A schematic diagram of the k8s cluster deployment structure of the DPU provided in the embodiment of the present application;

[0039] Figure 2 A schematic diagram of a k8s cluster deployment method based on DPU provided in an embodiment of the present application;

[0040] Figure 3 A schematic diagram of a k8s cluster deployment device based on a DPU provided in an embodiment of the present application;

[0041] Figure 4 A DPU-based k8s cluster deployment device is provided in an embodiment of the present application. DETAILED DESCRIPTION

[0042] When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments are only examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the appended claims.

[0043] The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. The following will describe the embodiments of the present application in conjunction with the accompanying drawings.

[0044] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0045] The terms involved in the present invention are exemplified below.

[0046] Cloud Native, cloud native technology is conducive to organizations to build and run elastically scalable applications in new dynamic environments such as public cloud, private cloud and hybrid cloud. Representative technologies of cloud native include containers, service mesh, microservices, immutable infrastructure and declarative API. These technologies can build loosely coupled systems with good fault tolerance, easy management and easy observation. Combined with reliable automation means, cloud native technology enables engineers to easily make frequent and predictable major changes to the system.

[0047] DPU: Data Processing Unit, as a dedicated hardware accelerator, is a new generation of data-centric computing processors that integrates complete data center functions into a single chip. Together with CPU and GPU, it constitutes the three pillars of new computing. By using specially designed hardware accelerators to quickly process data packets entering the DPU, processing delays can be reduced and processing throughput can be improved.

[0048] K8S: Its full name is kubernetes, and K8S is its abbreviation, with the word "8" replacing the eight characters of "ubernete". It is a container-based cluster management platform, which can also be called an open source container orchestration platform, used to automate the deployment, expansion and management of containerized applications. It provides a flexible and scalable way to manage containerized applications, and provides a range of features to simplify application deployment, scheduling, self-healing and expansion.

[0049] SOC: System On Chip, system on chip, means it is a product, an integrated circuit with a dedicated purpose, which contains all the contents of a complete system and embedded software. DPU SoC does not belong to the node resources of the kubernetes cluster, but is only used as an independent operating system on the DPU network card to run software programs.

[0050] CNI / cni: Container Network Interface, is the full name of the container network interface, which is used to implement a network model for multi-container communication. It is responsible for creating and managing network interfaces for containers, including assigning IP addresses, configuring routes, setting network policies, etc. CNI plug-ins can implement these functions based on different network implementations, such as using Linux bridging, VLAN, Overlay networks, etc.

[0051] Pod: An abbreviation for Point of Delivery, Kubernetes encapsulates one or more containers into a high-level structure called a pod. Any container in the same pod will share the same namespace and local network. Containers can easily communicate with other containers in the same container, just as if they were on the same machine while maintaining a certain degree of isolation.

[0052] crd: the abbreviation of CustomResourceDefinition, which is used to manage the configuration of a pod resource. For example, one pod corresponds to one crd configuration.

[0053] PF / pf: It is the abbreviation of Physical Function, which refers to the actual function of the physical network card, which can directly interact with the physical network. PF is responsible for managing and controlling resources related to VF, and handling communication between VFs.

[0054] OVN: Open Virtual Network is an open source virtualized network project that uses OVS as the underlying technology and provides a flexible and programmable data path between kernel state and user state to achieve network interconnection between virtual machines and containers. It provides rich network functions and easy-to-use management interfaces, enabling users to build and manage complex virtual network environments.

[0055] OVS: OpenvSwitch, virtual forwarding software, OVS is a high-quality, multi-layer virtual switching software. Its purpose is to support large-scale network automation through programming extensions, while also supporting standard management interfaces and protocols.

[0056] ovn-kubernetes: is a Kubernetes CNI based on OVN (Open Virtual Network). It provides an efficient, reliable and flexible network solution that can meet the communication requirements between containers in the Kubernetes cluster and between containers and external networks. In the DPU scenario, Ovn-kubernetes CNI unloads the forwarding plane ovs to DPUSoc. Ovn-kubernetes guides the ovs forwarding plane on the DPU Soc to forward traffic by passing the network information and service information of the entire K8s cluster through the openflow flow table.

[0057] SRIOV: Single root virtualization, which divides the network card into virtual functions VF and physical functions PF. SRIOV CNI, that is, the interface on the working node with SRIOV function.

[0058] Bond: Bond port is a network technology that is mainly used to bind multiple physical network cards to one logical network card. This method can achieve link redundancy, bandwidth expansion, load balancing, etc. Bond port technology is mainly used in production scenarios with high network throughput and high requirements for network stability. It is a common technology to improve performance and reliability.

[0059] Figure 1 A schematic diagram of a k8s cluster deployment structure of a DPU provided in an embodiment of the present application. Figure 1 In the deployment of hardware, the software and hardware are deployed separately. In terms of hardware deployment, the DPU network card is a network card installed on the cloud server node in the data center, providing a high-bandwidth, low-latency heterogeneous network computing acceleration engine for the cloud server node.

[0060] In terms of software deployment, SRIOV CNI is deployed on the control node and worker nodes of the k8s cluster to define and create PF and VF resource pools for each worker node of the cluster that can be used for container pod instances. The network container interface Bond CNI is deployed on each worker node of the k8s cluster. Bond CNI is used to create a logical binding virtual function bond VF interface for this instance according to the user-defined resource definition (Custom Resource Definition, CRD) when a container Pod instance is scheduled on a worker node. The PF resource pool that can be used and the VF resource pool that can be allocated to each PF are configured through the Bond CNI-related CRD. Deploy the relevant components of ovn-kubernetes CNI on the control node, worker node, and DPU SoC of the kubernetes cluster to provide basic network capabilities for the kubernetes cluster:

[0061] Among them, the control node deploys the OVN Control Center OVN Control Center components: including ovn-kubernetes control plane related components and OVN database OVN DB related components.

[0062] The worker node deploys the ovn-kubernetes CNI component.

[0063] The OVN control component OVN Controller and OVN SoC module components are deployed on the DPU SoC.

[0064] Deploy the collaborative component MultusCNI on the control node and worker node of the Kubernetes cluster to provide Kubernetes with the collaborative working capabilities of SRIOV CNI, Bond CNI, and ovn-Kubernetes CNI.

[0065] exist Figure 1 In the output, number 1 indicates: select 2SRIOV VFs from two different PFs, that is, select one SRIOV VF device from each of the VF resource pools created by two different PFs, for a total of two SRIOV VF devices.

[0066] Number 2 stands for: Device IDs, i.e. device identifiers.

[0067] Number 3 means: Create bond port, which means creating a bond port.

[0068] Number 4 means: set port to pod NS, which means adding the created Bond port to the Pod's namespace kernel namespace.

[0069] Number 5 means: get PF IDs and VF IDs, that is, get PF IDs and VF IDs

[0070] Number 6 means: Create bond vfr port and bond uplink port with LACP mode, and add the two bond ports on OVS bridge, that is, set the bond vfr port and bond uplink port to dynamic link aggregation mode and add them to the OVS bridge.

[0071] Number 7 means: Synchronize the openflow tables relates to the bond VF portfrom OVN DB, that is, synchronize the openflow flow table information related to the bond VF interface from OVN DB.

[0072] Number 8 means: Download the openflow tables related to the bond port, which means downloading the synchronized bond port flow table information to the OVS instance.

[0073] Number 9 indicates a miss up call, which is an event in which a table entry is missing and sent up.

[0074] Number 10 indicates: Download hw_offloaded tables, that is, downloading hardware uninstallation table items.

[0075] Figure 2 A flow chart of a DPU-based k8s cluster deployment method provided in an embodiment of the present application. Figure 2 The process includes steps S201 to S207. Each step is described in detail as follows.

[0076] Step S201: receiving a container instance deployed by a user, and determining two virtual function ports and corresponding second identifiers.

[0077] In a possible implementation manner, the two virtual function ports include a first virtual function port and a second virtual function port, and the first virtual function port and the second virtual function port correspond to different resource pools.

[0078] It can be understood that when kubernetes receives the container Pod instance deployed by the user, kubelet calls SRIOV CNI to select two physical function ports PF from the available physical function port PF resource pool on the working node, and then selects one virtual function port VF from the SRIOVVF resource pool corresponding to each PF. The two virtual function ports VF include a first virtual function port and a second virtual function port, and the resource pools corresponding to the first virtual function port and the second virtual function port are different.

[0079] In a possible implementation manner, the second identifier includes a third identifier and the fourth identifier, the third identifier corresponds to the first virtual function port, and the fourth identifier corresponds to the second virtual function port.

[0080] It can be understood that the first identifier here refers to the identifiers of two devices, and the identifier of each device corresponds to a different virtual function port.

[0081] In an embodiment of the present application, the second identifier includes identifiers of two VFs, wherein the identifiers of the two VFs include a third identifier and a fourth identifier. The third identifier corresponds to the first virtual function port, and the fourth identifier corresponds to the second virtual function port. Each VF and PF has a unique identifier. This identifier can be the unique PCI bus address corresponding to the virtual function port VF in the operating system, or it can be other addresses, but the PCI bus address is generally used in implementation.

[0082] Step S202: obtain the first identifier of the device corresponding to the two virtual function ports, and call the container network interface plug-in, where the container network interface plug-in is used to create a logically bound virtual function port, and the working mode of creating the logically bound virtual function port is a dynamic link aggregation mode.

[0083] In a possible implementation, the container network interface plug-in is used to create the logical binding virtual function port for the container instance according to the CRD resource definition when the container instance is scheduled by the working node.

[0084] Step S203: Add the two virtual function ports to the logical binding virtual function port according to the first identifier; add the logical binding virtual function port to the kernel namespace of the container, the logical binding virtual function port is the network interface of the container, and assign an IP address to the network interface of the container through the controller plug-in of the software defined network.

[0085] As can be understood, kubernetes obtains the first identifier (VF device ID) of the device corresponding to the two virtual function ports allocated, and calls the container network interface plug-in (Bond CNI). Bond CNI creates a logical bonded virtual function port (bond VF port), and adds the selected two virtual function ports VF as sub-interfaces to the bond VF port according to the VF device ID, and sets the bond mode to LACP dynamic link aggregation mode.

[0086] As you can understand, kubelet calls ovn-kubernetes CNI (controller plug-in for OVN K8s software-defined network) to add the created bond VF port to the kernel namespace of the Pod, logically binds the virtual function port as the network interface NIC of the Pod, and the controller plug-in for OVN K8s software-defined network assigns an IP address to the interface.

[0087] Step S204: Send the first identifier and the second identifier, wherein the first identifier is used to create a logically bound virtual function representative interface, and the second identifier is used to create a logically bound uplink interface.

[0088] It can be understood that this step is to send the first identifier and the second identifier to the system-on-chip component deployed on the DPU, the first identifier is used to create a logically bound virtual function representative port, and the second identifier is used to create a logically bound uplink interface. That is, the third identifier and the fourth identifier included in the second identifier are both used to create a logically bound uplink interface.

[0089] Step S205: According to the second identifier, the corresponding two virtual function representative interfaces are added as sub-interfaces to the logical binding virtual function representative interface, and the working mode of the logical binding virtual function representative interface is set to a dynamic link aggregation mode.

[0090] Step S206: Add the logically bound virtual function representative port and the logically bound uplink interface to the OVS bridge.

[0091] It can be understood that after receiving the second identifier VF ID, the DPU system-on-chip component (OVN SoC module) of OVN creates a bond interface, where the bond interface includes a vfr port interface.

[0092] In a possible implementation, a logically bound virtual function representative port (bondvfr port) is created on the DPU SoC, and according to the obtained VF ID, the corresponding two VF representative ports VFr (VF representativeor) are added as sub-interfaces to the bond vfr port, and the bond port mode is set to the LACP dynamic link aggregation mode.

[0093] It can be understood that adding a bond interface to the OVS bridge means adding a logical binding virtual function representative port (bondvfr port) to the OVS bridge.

[0094] Step S207, obtaining the OVS configuration information of the flow table related to the container and the logically bound virtual function representative port.

[0095] Step S208: Send the flow table related to the container and the OVS configuration information to the OVS instance.

[0096] It can be understood that the OVN Controller component deployed on the DPU Soc synchronously obtains the latest flow table related to the newly created container Pod and the bond VF interface related configuration in the Kubernetes cluster network from the OVN Control Center component. The OVN Controller component sends the openflow flow table information related to the newly created Pod and bond VF interface to the OVS instance.

[0097] When a data flow related to the created Pod instance arrives at the DPU network card, the ASIC hardware forwarding engine will fail to forward the data because it has no flow-related information, triggering a table entry missing up call event, and sending the first packet to the OVS instance on the DPU SoC. The OVS instance forwards the message based on the openflow flow table information and related flow tables described above.

[0098] After the first packet is forwarded, the OVS instance on the DPU SoC sends the hardware offload table entry related to the flow to the hardware forwarding engine of the ASIC. When subsequent packets arrive, they can be directly forwarded after the hardware table is hit.

[0099] It is understandable that the above described solution embodiment takes the ASIC DPU network card as an example, but the present invention can also be applied to any network card that supports SRIOV features and network traffic hardware offload capabilities, such as SmartNIC intelligent network card, etc. The present application embodiment does not limit this.

[0100] This embodiment takes kubernetes as an example as a cloud native orchestration tool, and the present invention is also applicable to other cloud native cluster orchestration tools, such as openshift, etc. This embodiment of the application does not limit this.

[0101] This embodiment takes Pod as an example of Kubernetes scheduling, and the present invention is also applicable to VMs and bare metal instances managed by Kubernetes. This embodiment of the application does not limit this.

[0102] This embodiment takes ovn-kubernetes CNI as an example of CNI that provides a network interface for a kubernetes cluster. The present invention is also applicable to any open source or self-developed CNI based on an SDN controller / forwarding plane, such as kube-ovn, Antrea, etc. This application embodiment does not limit this.

[0103] In summary, the method shown in the embodiment of the present application, when a single virtualized SRIOV interface becomes a network forwarding performance bottleneck of the Pod instance in the cloud native network due to resource limitations such as hardware queues, the Pod instance can obtain higher network forwarding performance by aggregating multiple VF interfaces.

[0104] Figure 3 A schematic diagram of a k8s cluster deployment device based on DPU provided in an embodiment of the present application includes the following modules:

[0105] The receiving module 301 is used to receive a container instance deployed by a user and determine two virtual function ports and corresponding second identifiers;

[0106] A first acquisition module 302 is used to obtain a first identifier of a device corresponding to the two virtual function ports, and call a container network interface plug-in, wherein the container network interface plug-in is used to create a logical binding virtual function port, and the working mode of creating the logical binding virtual function port is a dynamic link aggregation mode;

[0107] A first adding module 303 is used to add the two virtual function ports to the logical binding virtual function port according to the first identifier; add the logical binding virtual function port to the kernel namespace of the container, the logical binding virtual function port is the network interface of the container, and allocate an IP address to the network interface of the container through a controller plug-in of a software defined network;

[0108] A first sending module 304 is used to send the first identifier and the second identifier, the first identifier is used to create a logical binding virtual function representative interface, and the second identifier is used to create a logical binding uplink interface;

[0109] A second adding module 305 is used to add two uplink interfaces corresponding to two physical function interfaces as sub-interfaces to the logical binding uplink interface according to the second identifier, and the working mode of the logical binding uplink interface is set to a dynamic link aggregation mode;

[0110] The third adding module 306 adds the logical binding virtual function representative port and the logical binding uplink interface to the OVS bridge;

[0111] The second acquisition module 307 is used to obtain the OVS configuration information of the flow table related to the container and the logically bound virtual function representative port;

[0112] The second sending module 308 is used to send the flow table related to the container and the OVS configuration information to the OVS instance.

[0113] In a possible implementation, the two virtual function ports belong to different physical function ports, the two virtual function ports include a first virtual function port and a second virtual function port, and the first virtual function port and the second virtual function port correspond to different resource pools.

[0114] In a possible implementation manner, the second identifier includes a third identifier and the fourth identifier, the third identifier corresponds to the first virtual function port, and the fourth identifier corresponds to the second virtual function port.

[0115] In a possible implementation, the container network interface plug-in is used to create the logical binding virtual function port for the container instance according to the CRD resource definition when the container instance is scheduled by the working node.

[0116] It can be understood that the device provided in the embodiment of the present application is used to implement Figure 2 All methods described in the examples.

[0117] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 4 As shown, the electronic device 400 includes: a memory 410 and a processor 420 .

[0118] The memory 410 stores a computer program that can be executed by at least one processor 420. The computer program is executed by at least one processor 420 to enable the electronic device to implement the method provided in any of the above embodiments.

[0119] The memory 410 and the processor 420 may be connected via a bus 430 .

[0120] The relevant instructions can be understood by referring to the relevant descriptions and effects corresponding to the method embodiments, which will not be repeated here.

[0121] An embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and the computer program is executed by a processor to implement the following Figure 2 The method of any corresponding embodiment.

[0122] Among them, the computer-readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.

[0123] An embodiment of the present application provides a computer program product, which includes computer-executable instructions, which are used to implement the following when the computer-executable instructions are executed by a processor: Figure 2 The method of any corresponding embodiment.

[0124] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0125] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the disclosure disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope of the present application is indicated by the claims.

[0126] It should be understood that the present application is not limited to the exact construction that has been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof.

Claims

1. A k8s cluster deployment method based on DPU, characterized in that: include: Receive a container instance deployed by a user, and determine two virtual function ports and corresponding second identifiers; Obtaining first identifiers of devices corresponding to the two virtual function ports, and calling a container network interface plug-in, wherein the container network interface plug-in is used to create a logically bound virtual function port, and the working mode of creating the logically bound virtual function port is a dynamic link aggregation mode; adding the two virtual function ports to the logical binding virtual function port according to the first identifier; adding the logical binding virtual function port to the kernel namespace of the container, the logical binding virtual function port being the network interface of the container, and assigning an IP address to the network interface of the container through a controller plug-in of a software defined network; Sending the first identifier and the second identifier, wherein the first identifier is used to create a logically bound virtual function representative interface, and the second identifier is used to create a logically bound uplink interface; According to the second identifier, two uplink interfaces corresponding to the two physical function interfaces are added as sub-interfaces to the logical binding uplink interface, and the working mode of the logical binding uplink interface is set to a dynamic link aggregation mode; Add the logical binding virtual function representative port and the logical binding uplink interface to the OVS bridge; Obtain the OVS configuration information of the flow table related to the container and the logically bound virtual function representative port; The flow table related to the container and the OVS configuration information are sent to the OVS instance.

2. The method according to claim 1, characterized in that The two virtual function ports belong to different physical function ports, the two virtual function ports include a first virtual function port and a second virtual function port, and the first virtual function port and the second virtual function port correspond to different resource pools.

3. The method according to claim 1 or 2, characterized in that: The second identifier includes a third identifier and a fourth identifier, the third identifier corresponds to the first virtual function port, and the fourth identifier corresponds to the second virtual function port.

4. The method according to any one of claims 1 to 3, characterized in that: The container network interface plug-in is used to create the logical binding virtual function port for the container instance according to the CRD resource definition when the container instance is scheduled by the working node.

5. A k8s cluster deployment device based on DPU, characterized in that: include: A receiving module, configured to receive a container instance deployed by a user and determine two virtual function ports and corresponding second identifiers; A first acquisition module is used to obtain a first identifier of a device corresponding to the two virtual function ports, and call a container network interface plug-in, wherein the container network interface plug-in is used to create a logical binding virtual function port, and the working mode of creating the logical binding virtual function port is a dynamic link aggregation mode; A first adding module is used to add the two virtual function ports to the logical binding virtual function port according to the first identifier; add the logical binding virtual function port to the kernel namespace of the container, the logical binding virtual function port is the network interface of the container, and allocate an IP address to the network interface of the container through a controller plug-in of a software defined network; A first sending module, configured to send the first identifier and the second identifier, wherein the first identifier is used to create a logically bound virtual function representative interface, and the second identifier is used to create a logically bound uplink interface; A second adding module, configured to add two uplink interfaces corresponding to two physical function interfaces as sub-interfaces to the logical binding uplink interface according to the second identifier, wherein the working mode of the logical binding uplink interface is set to a dynamic link aggregation mode; A third adding module adds the logical binding virtual function representative port and the logical binding uplink interface to the OVS bridge; The second acquisition module is used to obtain the OVS configuration information of the flow table related to the container and the logically bound virtual function representative port; The second sending module is used to send the flow table related to the container and the OVS configuration information to the OVS instance.

6. The device according to claim 5, characterized in that The two virtual function ports belong to different physical function ports, the two virtual function ports include a first virtual function port and a second virtual function port, and the first virtual function port and the second virtual function port correspond to different resource pools.

7. The device according to claim 5 or 6, characterized in that The second identifier includes a third identifier and a fourth identifier, the third identifier corresponds to the first virtual function port, and the fourth identifier corresponds to the second virtual function port.

8. The device according to any one of claims 5 to 7, characterized in that: The container network interface plug-in is used to create the logical binding virtual function port for the container instance according to the CRD resource definition when the container instance is scheduled by the working node.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 4 when executed by a processor.

10. A computer program product comprising computer executable instructions, characterized in that: The computer-executable instructions are used to implement the method according to any one of claims 1 to 4 when executed by a processor.

Citation Information

Patent Citations

  • Multiple virtual network interface support for virtual execution elements

    CN110875844A

  • K8s network bridge plug-in implementation method and device, electronic equipment and readable storage medium

    CN115622878A

  • Traffic unloading method and device, electronic equipment and storage medium

    CN117793000A

  • Method for definition, consumption, and controlled access of DPU resources and services

    US20240134970A1

Cited By

  • Method for docking and adapting working node host of cloud computing cluster and DPU (Data Processing Unit), DPU chip, DPU intelligent network card and cloud computing equipment

    CN120825403A

  • Deployment method and device for hardware link aggregation, chip, network card and equipment

    CN121334040A

  • Bidirectional message processing method based on unified user mode channel

    CN122179399A