IP address management method, system and controller in load balancing service
By monitoring service information in the controller of the kubernetes platform and initiating IP address acquisition requests to the IP management center component, the problem of low efficiency in IP address management of load balancing services is solved, automatic application and mounting of IP addresses is realized, and management is improved. efficiency and reduced labor costs.
Patent Information
- Application Number
- CN202210295258.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-23
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2042-03-23
AI Technical Summary
The existing Kubernetes platform cannot effectively manage the IP addresses of load balancing services, resulting in the inability to allocate IP addresses to newly created load balancing services in a timely manner, and the inability to effectively manage existing IP addresses, which increases labor costs.
Provides an IP address management method in the load balancing service. The controller of the distributed container management platform monitors the service information transmitted from the service interface. If the service information represents the creation of the load balancing service and does not carry an IP address, the IP management center component is Initiate an IP address acquisition request, filter the target node when the service information changes, and mount the IP address to be mounted to the target node to realize automatic application and mounting of the IP address.
It realizes automatic management of the IP address of the load balancing service, improves the efficiency of IP address management, mounts IP addresses for the load balancing service in a timely manner, and reduces labor costs.
Smart Images

Figure CN114745358B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet technology, and in particular to an IP address management method, system and controller in a load balancing service. Background Art
[0002] In cloud services, LoadBalancer (LB) can provide external load balancing services. When a third party needs to create a load balancing service, it needs to provide the corresponding IP address.
[0003] However, in the existing Kubernetes platform, it is impossible to effectively manage the IP addresses of the load balancing service, and the IP addresses are usually managed only by increasing labor costs. This not only fails to allocate IP addresses to newly created load balancing services in a timely manner, but also fails to effectively manage existing IP addresses.
[0004] Therefore, there is an urgent need for a more efficient IP address management method for load balancing services. Summary of the invention
[0005] The purpose of the present application is to provide an IP address management method, system and controller in a load balancing service, which can automatically manage the IP addresses in the load balancing service.
[0006] To achieve the above-mentioned purpose, the present application provides, on the one hand, an IP address management method in a load balancing service, which is applied to a controller of a distributed container management platform, and comprises: monitoring service information transmitted from a service interface, and when determining that the service information represents the creation of a load balancing service, if the service information does not carry an IP address, initiating an IP address acquisition request to an IP management center component; receiving the IP address fed back by the IP address acquisition request, and assigning the IP address to the service information; when monitoring that the service information has changed, detecting whether the service information has an IP address to be mounted, and if so, filtering out a target node from the node where the container providing the load balancing service is located, and mounting the IP address to be mounted to the target node.
[0007] In one embodiment, after determining that the service information represents a load balancing service, the method further includes: adding the service information to an information queue, and sequentially taking out each piece of service information from the information queue for processing.
[0008] In one embodiment, the IP address acquisition request includes a cluster identifier and a node identifier corresponding to the service information, so that the IP management center component queries the virtual local area network where the service information is located based on the cluster identifier and the node identifier, and feeds back an unoccupied IP address in the virtual local area network.
[0009] In one embodiment, the method also includes: if it is impossible to connect to the IP management center component, or the IP address fed back by the IP management center component cannot be verified, switching to an autonomous state, in which an idle IP address is applied for based on the IP address usage in the cluster recorded in the memory, and the applied idle IP address is allocated to the service information.
[0010] In one embodiment, after the IP address is assigned to the service information, the method further includes: adding a usage record of the IP address in the memory, and updating the usage record to the configuration file, so that the usage record of the corresponding IP address is read from the configuration file after restarting.
[0011] In one embodiment, filtering out target nodes from nodes where containers providing load balancing services are located includes: for nodes where containers providing load balancing services are located, identifying the creation time of each of the nodes, and sorting the nodes in descending order of creation time, and using the first-ranked node as the filtered target node.
[0012] In one embodiment, the method further includes: regularly initiating an IP address detection message for the service information, wherein the IP address detection message is used to determine whether the service information has successfully applied for an IP address.
[0013] In one embodiment, after mounting the IP address to be mounted on the target node, the method also includes: monitoring the service information transmitted from the service interface, and if the service information indicates the deletion of the load balancing service, initiating an IP address deletion request to the IP management center component; receiving the IP address deletion notification feedback from the IP management center component, and deleting the IP address carried in the service information; when it is monitored that the service information has changed, determining whether the IP address needs to be deleted, and if necessary, deleting the corresponding IP address from the target node.
[0014] In one embodiment, the method also includes: if it is impossible to connect to the IP management center component, or the IP address deletion notification fed back by the IP management center component cannot be verified, switching to an autonomous state, in which the corresponding IP address in the memory is set to an idle state.
[0015] In one embodiment, after deleting the corresponding IP address from the target node, the method further includes: deleting the corresponding IP address usage record in the memory, and synchronously deleting the corresponding IP address in the configuration file.
[0016] In one embodiment, the method further includes: regularly initiating an IP address deletion message for the service information, wherein the IP address deletion message is used to determine whether the IP address has been successfully deleted from the service information.
[0017] To achieve the above-mentioned purpose, the present application also provides an IP address management system in a load balancing service, the system comprising: an address acquisition unit, for monitoring service information transmitted from a service interface, and when determining that the service information represents the creation of a load balancing service, if the service information does not carry an IP address, initiating an IP address acquisition request to an IP management center component; an address allocation unit, for receiving the IP address fed back by the IP address acquisition request, and allocating the IP address to the service information; an address mounting unit, for detecting whether the service information has an IP address to be mounted when a change is detected in the service information, and if so, filtering out a target node from the node where the container providing the load balancing service is located, and mounting the IP address to be mounted to the target node.
[0018] To achieve the above-mentioned purpose, the present application further provides a controller of a container platform on the other hand, wherein the controller includes a memory and a processor, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, the above-mentioned IP address management method is implemented.
[0019] The technical solution provided by the present application can monitor the service interface through the controller in the kubernetes platform. When the service information representing the creation of the load balancing service is monitored, an IP address acquisition request can be initiated to the IP management center component. After receiving the IP address fed back by the IP management center component, the controller can write the IP address into the service information. Another component in the controller can monitor the status of the service information. When a change in the service information is monitored, it can first determine whether the change is caused by the writing of the IP address. If so, it indicates that the service information has an IP address to be mounted. At this time, the controller can traverse the various nodes where the container providing the load balancing service is located, and then filter out the appropriate target node, and mount the IP address written in the service information to the target node, thereby realizing automatic application and automatic mounting of the IP address.
[0020] It can be seen that through the technical solution provided by this application, IP addresses can be managed automatically, which improves the efficiency of IP address management, and at the same time, IP addresses can be mounted for load balancing services in a timely manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 It is a schematic diagram of the structure of a kubernetes cluster in an embodiment of the present invention;
[0023] Figure 2 Schematic diagram of the steps of the IP address management method in an embodiment of the present invention;
[0024] Figure 3 is an interactive schematic diagram of an IP address management method in an embodiment of the present invention;
[0025] Figure 4 Schematic diagram of the functional modules of the IP address management system in the embodiment of the present invention;
[0026] Figure 5 is a schematic diagram of the structure of a controller in an embodiment of the present invention;
[0027] Figure 6 It is a schematic diagram of the structure of a computer terminal in an embodiment of the present invention. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in combination with the specific implementation methods of this application and the corresponding drawings. Obviously, the described implementation methods are only part of the implementation methods of this application, not all of the implementation methods. Based on the implementation methods in this application, all other implementation methods obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0029] The technical solution provided in this application can be applied to Figure 1 In the system architecture shown in Figure 1The distributed container management platform and the IP management center component may be included. The distributed container management platform may be, for example, a kubernetes platform, which may include a controller and a service interface, and the controller may monitor various service information transmitted from the service interface. The IP management center component may include an address management interface and an address storage server, wherein the address management interface may receive various requests related to IP addresses sent by the controller, and the address storage server may store various IP addresses in the kubernetes platform and the usage status of each IP address.
[0030] See also Figure 2 and Figure 3 An IP address management method in a load balancing service provided in one embodiment of the present application is applied to a controller of a distributed container management platform. The method may include the following steps.
[0031] S1: Listen to the service information transmitted by the service interface, and when it is determined that the service information represents the creation of a load balancing service, if the service information does not carry an IP address, initiate an IP address acquisition request to the IP management center component.
[0032] In this embodiment, the controller can monitor the service interface in the kubernetes platform. When the service interface transmits service information, the controller can determine the type of service information. If the service information represents the creation of a load balancing service, it means that the service information needs to apply for an IP address. The controller can add the service information to the information queue, and then process the service information in turn according to the arrangement order of each service information in the information queue.
[0033] Specifically, after reading the service information from the information queue, it can be determined whether the service information carries an IP address. Generally speaking, if a service information has been assigned an IP address, the IP address will be carried in the address field of the service information. If the service information does not carry an IP address, it indicates that an IP address needs to be assigned to the service information.
[0034] In this embodiment, the controller can initiate an IP address acquisition request to the IP management center component. Specifically, the IP management center component can provide an https address management interface to the outside world, so that the above-mentioned IP address acquisition request can be an https request. In the IP address acquisition request, multiple information parsed from the service information can be carried. Specifically, the service information can include the node identifier of the node to which the load balancing service is to be provided, and the cluster identifier of the cluster to which the node is located. Then, in the IP address acquisition request, the node identifier and the cluster identifier can be carried. In the network, the combination of the node identifier and the cluster identifier can uniquely identify a node.
[0035] In the Kubernetes platform, nodes, clusters, and virtual local area networks (VLANs) can be associated with each other. In this way, after receiving an IP address acquisition request, the IP management center component can query the virtual local area network where the service information is located based on the cluster identifier and node identifier. When allocating an IP address for service information, the IP management center component can query the IP address under the virtual local area network in the address storage database, and can feed back an unoccupied IP address in the virtual local area network to the controller.
[0036] After feeding back the IP address to the controller, the IP management center component can write the usage record of the IP address into the address storage database. The usage record may include the allocation time node of the IP address and the user's information.
[0037] S3: Receive the IP address fed back by the IP address acquisition request, and assign the IP address to the service information.
[0038] In this embodiment, after receiving the IP address fed back by the IP management center component, the controller can verify the legitimacy of the parameters of the IP address, and if the verification is successful, the IP address can be allocated to the service information. Specifically, the IP address can be written into the address field of the service information.
[0039] In this embodiment, the controller may include two components, the first component may be responsible for the application and release of the IP address, and the second component may be responsible for the mounting process of the IP address. Among them, steps S1 and S3 may be performed by the first component.
[0040] In one embodiment, after the IP address is assigned to the service information, the first component may also add a usage record of the IP address in the memory. The purpose of this processing is that the controller may enter an autonomous state of the IP address in some scenarios. In the autonomous state, the controller will allocate and release the IP address based on the usage record of the IP address in the memory. Therefore, adding the usage record of the IP address in the memory can prepare for the autonomous state.
[0041] In addition, the first component can also write the usage record of the IP address into the configuration file of the controller, so as to achieve persistent storage of the usage record. In this way, when the controller is restarted, although the information in the memory has been lost, the information in the configuration file still exists. In this way, the usage record of the corresponding IP address can be read from the configuration file, avoiding the loss of the usage record of the IP address.
[0042] S5: When a change in the service information is detected, detect whether the service information has an IP address to be mounted. If so, select a target node from the nodes where the container providing the load balancing service is located, and mount the IP address to be mounted to the target node.
[0043] In this embodiment, the second component in the controller can monitor the status of the service information. When the first component writes the IP address into the service information, the status of the service information changes. When the second component monitors the change in the service information, it can detect whether the service information has the IP address to be mounted by identifying the address field therein. If the IP address is written in the address field, it indicates that the service information has the IP address to be mounted.
[0044] In this embodiment, the container providing the load balancing server may be distributed in multiple nodes. When mounting an IP address for the container, the IP address may be mounted in a node where the container is located. In practical applications, the node with the best performance may be identified, and the node with the best performance may be used as the selected target node, and the IP address may be mounted on the target node.
[0045] In one embodiment, considering that within the kubernetes platform, containers can automatically expand and shrink according to actual conditions, nodes can be automatically added or reduced. When shrinking, nodes with later creation times are usually deleted first. In view of this, when mounting an IP address for a container that provides load balancing services, in order to avoid the invalidation of the IP address in the case of shrinking, for the node where the container that provides load balancing services is located, the creation time of each node can be first identified, and the nodes can be sorted in order from the earliest to the latest creation time, where the first-ranked node is created first. During the shrinking process, the first-ranked node will also be deleted last. In this way, the first-ranked node can be used as the selected target node, and the IP address can be mounted under the target node, thereby providing a more stable load balancing service.
[0046] It should be noted that in actual applications, if the controller cannot connect to the IP management center component, or the IP address fed back by the IP management center component cannot be verified, the controller can switch to an autonomous state, in which the controller can apply for an idle IP address based on the IP address usage in the cluster recorded in the memory, and assign the applied idle IP address to the service information. The memory can store the usage records of all IP addresses in the cluster, including which service and port are in use, whether they have been reused, and other information.
[0047] In addition, for service information, the controller can periodically initiate an IP address detection message, which is used to determine whether the service information has successfully applied for an IP address. The reason for this is that the IP address application may fail, and there is no available IP address in the memory. In the Kubernetes platform, there is no re-application process for failed IP address applications. Therefore, a regular IP address detection message is required to check whether there is any service information that does not have an IP address mounted. In the case of no mounted IP address, the IP address can be re-applied.
[0048] In one embodiment, the IP address allocated for the load balancing service can also be deleted through the service information. Specifically, in a similar manner, the controller can monitor the service information transmitted by the service interface. If the service information indicates the deletion of the load balancing service, an IP address deletion request can be initiated to the IP management center component, and the cluster identifier and node identifier can also be carried in the IP address deletion request. Based on the cluster identifier and the node identifier, the IP management center component can know which node's IP address should be deleted. After releasing the IP address, the IP management center component can modify the corresponding usage record in the address storage database. Then, the IP management center component can feedback the IP address deletion notification to the controller.
[0049] When the controller receives the IP address deletion notification fed back by the IP management center component, it can delete the IP address carried in the service information. At the same time, when the second component in the controller monitors the change of service information, it can determine whether the IP address needs to be deleted. If necessary, the corresponding IP address can be deleted from the target node.
[0050] In one embodiment, if the controller cannot connect to the IP management center component, or the IP address deletion notification feedback from the IP management center component cannot be verified, the controller can switch to an autonomous state, in which the controller can set the corresponding IP address in the memory to an idle state.
[0051] In one embodiment, after deleting the corresponding IP address from the target node, the controller may also delete the corresponding IP address usage record in the memory and simultaneously delete the corresponding IP address in the configuration file.
[0052] Likewise, the controller may periodically initiate an IP address deletion message for the service information, and the IP address deletion message may be used to determine whether the service information has successfully deleted the IP address.
[0053] In a specific application example, the process of deleting an IP address can be as follows:
[0054] 1. The controller listens to the service interface of Kubernetes and determines the service type. Only if it is a loadbalancer type does it need to be added to the information queue.
[0055] 2. Get the service information from the information queue and determine whether it is the service information for deleting the IP address. If so, you need to release the IP address in the IP management center component.
[0056] 3. The controller applies to the IP management center component through the https interface to delete the IP address. When applying, bring the corresponding cluster ID and node ID. If it cannot connect to the IP management center component, the controller will enter the autonomous state.
[0057] 4. The IP management center component verifies the legitimacy of the parameters, releases the IP address after verification, and then returns a notification to the controller. At the same time, it clears the IP address usage record in the address storage database.
[0058] 5. The controller verifies the returned content. If the verification fails, it will also enter the autonomous state.
[0059] 6. In the autonomous state, the controller can set the corresponding IP address in the memory to an idle state for use when applying for an IP address next time.
[0060] 7. In non-autonomous state, the controller can delete the usage record of the corresponding IP address in the memory.
[0061] 8. Another component in the controller monitors the service information change and detects whether the IP address needs to be deleted. If necessary, the IP address is deleted from the physical machine (target node) and the deleted usage record is updated in the configuration file.
[0062] 9. Just like applying for an IP address, during the process of deleting an IP address, an IP address deletion message will be triggered periodically, because the deletion of an IP address may fail.
[0063] See also Figure 4 The present application also provides an IP address management system in a load balancing service, the system comprising:
[0064] An address acquisition unit is used to monitor the service information transmitted by the service interface, and when it is determined that the service information represents the creation of a load balancing service, if the service information does not carry an IP address, initiate an IP address acquisition request to the IP management center component;
[0065] An address allocating unit, configured to receive the IP address fed back by the IP address acquisition request, and allocate the IP address to the service information;
[0066] The address mounting unit is used to detect whether the service information has an IP address to be mounted when a change in the service information is monitored. If so, a target node is selected from the nodes where the container providing the load balancing service is located, and the IP address to be mounted is mounted to the target node.
[0067] See also Figure 5 The present application also provides a controller of a container platform, the controller comprising a memory and a processor, the memory being used to store a computer program, and when the computer program is executed by the processor, the above-mentioned IP address management method is implemented.
[0068] The technical solution provided by the present application can monitor the service interface through the controller in the kubernetes platform. When the service information representing the creation of the load balancing service is monitored, an IP address acquisition request can be initiated to the IP management center component. After receiving the IP address fed back by the IP management center component, the controller can write the IP address into the service information. Another component in the controller can monitor the status of the service information. When a change in the service information is monitored, it can first determine whether the change is caused by the writing of the IP address. If so, it indicates that the service information has an IP address to be mounted. At this time, the controller can traverse the various nodes where the container providing the load balancing service is located, and then filter out the appropriate target node, and mount the IP address written in the service information to the target node, thereby realizing automatic application and automatic mounting of the IP address.
[0069] It can be seen that through the technical solution provided by this application, IP addresses can be managed automatically, which improves the efficiency of IP address management, and at the same time, IP addresses can be mounted for load balancing services in a timely manner.
[0070] See also Figure 6 In this application, the technical solutions in the above embodiments can be applied to Figure 6 The computer terminal 10 shown in the figure. The computer terminal 10 may include one or more (only one is shown in the figure) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission module 106 for communication functions. It can be understood by those skilled in the art that Figure 6 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 6 More or fewer components as shown, or with Figure 6 Different configurations shown.
[0071] The memory 104 can be used to store software programs and modules of application software. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0072] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0073] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the embodiments of the system and the device, the introduction of the embodiment of the aforementioned method can be referred to for comparative explanation.
[0074] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may be in the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may be in the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0075] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0076] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0077] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0078] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0079] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0080] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0081] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity 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, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0082] The above is only the implementation mode of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A method for managing IP addresses in a load balancing service, characterized in that: The method is applied to a controller of a distributed container management platform, and the method includes: Listen to the service information transmitted by the service interface, and when it is determined that the service information represents the creation of a load balancing service, if the service information does not carry an IP address, initiate an IP address acquisition request to the IP management center component; Receive the IP address fed back by the IP address acquisition request, and verify the legitimacy of the IP address; If the IP address verification passes, assigning the IP address to the service information; If the IP address cannot be verified, switching to an autonomous state, in which an IP address is assigned to the service information based on the usage record of the IP address in the memory; When a change in the service information is detected, the service information is checked to see if it has an IP address to be mounted. If so, a target node is selected from the nodes where the container providing the load balancing service is located, and the IP address to be mounted is mounted to the target node.
2. The method according to claim 1, characterized in that After determining that the service information represents a load balancing service, the method further includes: The service information is added to the information queue, and each service information is taken out from the information queue in sequence for processing.
3. The method according to claim 1, characterized in that The IP address acquisition request includes the cluster identifier and node identifier corresponding to the service information, so that the IP management center component queries the virtual local area network where the service information is located according to the cluster identifier and the node identifier, and feeds back an unoccupied IP address in the virtual local area network.
4. The method according to claim 1, characterized in that: The method further comprises: If it is impossible to connect to the IP management center component, it switches to an autonomous state. In the autonomous state, it applies for a free IP address based on the IP address usage in the cluster recorded in the memory, and allocates the applied free IP address to the service information.
5. The method according to claim 1, characterized in that After assigning the IP address to the service information, the method further includes: A usage record of the IP address is added to the memory, and the usage record is updated to the configuration file, so that the usage record of the corresponding IP address is read from the configuration file after restarting.
6. The method according to claim 1, characterized in that The target nodes selected from the nodes where the container providing the load balancing service is located include: For the nodes where the containers providing load balancing services are located, the creation time of each of the nodes is identified, and the nodes are sorted in order of creation time from earliest to latest, and the first-ranked node is used as the screened target node.
7. The method according to claim 1, characterized in that The method further comprises: An IP address detection message is periodically initiated for the service information, and the IP address detection message is used to determine whether the service information has successfully applied for an IP address.
8. The method according to claim 1, characterized in that After mounting the IP address to be mounted to the target node, the method further includes: Monitor the service information transmitted by the service interface, and if the service information indicates that the load balancing service is to be deleted, initiate an IP address deletion request to the IP management center component; Receive the IP address deletion notification fed back by the IP management center component, and delete the IP address carried in the service information; When a change in the service information is detected, it is determined whether the IP address needs to be deleted, and if necessary, the corresponding IP address is deleted from the target node.
9. The method according to claim 8, characterized in that The method further comprises: If it is impossible to connect to the IP management center component, or the IP address deletion notification fed back by the IP management center component cannot be verified, it switches to the autonomous state, in which the corresponding IP address in the memory is set to an idle state.
10. The method according to claim 8, characterized in that After deleting the corresponding IP address from the target node, the method further includes: Delete the corresponding IP address usage record in the memory and simultaneously delete the corresponding IP address in the configuration file.
11. The method according to claim 8, characterized in that The method further comprises: An IP address deletion message is periodically initiated for the service information, and the IP address deletion message is used to determine whether the IP address has been successfully deleted from the service information.
12. An IP address management system in a load balancing service, characterized in that: The system comprises: An address acquisition unit is used to monitor the service information transmitted by the service interface, and when it is determined that the service information represents the creation of a load balancing service, if the service information does not carry an IP address, initiate an IP address acquisition request to the IP management center component; An address allocation unit is used to receive the IP address fed back by the IP address acquisition request and verify the legitimacy of the IP address; if the IP address is verified, the IP address is allocated to the service information; if the IP address cannot be verified, the unit switches to an autonomous state, in which the IP address is allocated to the service information based on the usage record of the IP address in the memory; The address mounting unit is used to detect whether the service information has an IP address to be mounted when a change in the service information is monitored. If so, a target node is selected from the nodes where the container providing the load balancing service is located, and the IP address to be mounted is mounted to the target node.
13. A controller for a container platform, characterized in that: The controller comprises a memory and a processor, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, the method according to any one of claims 1 to 11 is implemented.
