K8S-based basic component management method, system, equipment and medium

By using the target basic component management container in the K8S management system to store basic components in shared storage, the problem of heavy update workload caused by basic component upgrades is solved, and the decoupling of basic components and application services is achieved and the reliable operation of application services is achieved.

CN119336343APending Publication Date: 2025-01-21DUXIAOMAN TECH (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411307646.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-19
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

In the prior art, upgrading basic components requires regenerating business application images, resulting in large update workloads and unbearable for the development and increase of business applications.

Method used

By introducing the target basic component management container into the K8S management system and storing the basic components in shared storage, the application service container can load the target basic components from the shared storage and realize the decoupling of basic components and application services.

Benefits of technology

There is no need to regenerate application service images, which reduces the intrusion of basic components into application services, achieves effective decoupling between basic components and application services, avoids interruption of application services by basic component operations, and ensures reliable operation of application services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119336343A_ABST
    Figure CN119336343A_ABST
Patent Text Reader

Abstract

The invention discloses a K8S-based basic component management method, system and device and a medium. The method comprises the following steps: responding to a basic component scheduling instruction sent to an operation node by a K8S management node; the operation node obtains a target basic component management container from the mirror image warehouse, and the target basic component management container stores a target basic component into a shared storage; the application service container loads the target basic component from the shared storage to run the target application service, the basic component and the application service can be decoupled by using the shared storage, and the disturbance of the operation of the basic component on the application service is effectively avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure generally relates to the field of component management technology, and specifically to a basic component management method, system, device and medium based on K8S. Background Art

[0002] Basic components are the basic dependencies of application services. In related technologies, business personnel usually generate corresponding business application images based on the image files of basic components to realize corresponding application functions. However, although such operations can effectively guarantee the functions of business applications, when performing basic component upgrade operations, new business application images need to be generated based on the latest basic components. With the development and increase of business applications, the workload of update work is unbearable. Summary of the invention

[0003] In view of the above-mentioned defects or deficiencies in the prior art, it is desired to provide a basic component management method, system, device and medium based on K8S, which can use shared storage to decouple basic components from application services, effectively avoiding the interference of basic component operations on application services.

[0004] In a first aspect, an embodiment of the present application provides a basic component management method based on K8S, including:

[0005] Responding to a basic component scheduling instruction sent by the K8S management node to the running node;

[0006] The running node obtains the target basic component management container from the image repository, and the target basic component management container stores the target basic component in the shared storage;

[0007] The application service container runs the target application service by loading the target basic component from the shared storage.

[0008] In some embodiments, storing the target basic component in a shared storage by the target basic component management container includes:

[0009] The target basic component management container determines whether there are other basic components in the shared storage;

[0010] When no other basic components exist in the shared storage, the target basic component is stored in the shared storage, or

[0011] When other basic components exist in the shared storage, the other basic components are replaced by the target basic components.

[0012] In some embodiments, replacing the other basic components with the target basic components includes:

[0013] Moving the other basic components in the target location to another location in the shared storage;

[0014] storing the target basic component to the target location;

[0015] The other basic components stored in the other locations are deleted.

[0016] In some embodiments, storing the target basic component in a shared storage by the target basic component management container includes:

[0017] The target basic component management container stores the installation directory of the target basic component in the shared storage.

[0018] In some embodiments, the application service container runs the target application service by loading the target basic component from the shared storage, including:

[0019] The application service container loads the target basic component based on the installation directory in the shared storage.

[0020] In some embodiments, it also includes:

[0021] After the target basic component management container stores the target basic component in the shared storage, the basic component management container exits operation.

[0022] In some embodiments, it also includes:

[0023] Whether the running node needs to restart the application service container that is already running;

[0024] When restart is required, the application service container is restarted, and the target basic component is loaded when the application service container is started.

[0025] In a second aspect, the embodiment of the present application provides a basic component management system based on K8S, including:

[0026] A running node is used to obtain a target basic component management container from an image repository in response to a basic component scheduling instruction sent by a K8S management node to the running node;

[0027] The target basic component management container stores the target basic component in the shared storage;

[0028] The application service container runs the target application service by loading the target basic component from the shared storage.

[0029] In a third aspect, an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in the embodiment of the present application when executing the program.

[0030] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the embodiment of the present application.

[0031] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, characterized in that when the computer program is executed by a processor, it implements the method described in the embodiment of the present application.

[0032] The K8S-based basic component management method provided in the embodiment of the present application utilizes the target basic component management container to store the target basic component in the shared storage, so that the application service container can effectively load the target basic component from the shared storage, thereby effectively ensuring the reliable operation of the target application service, and there is no need to regenerate the application service image based on the basic component, thereby reducing the intrusion of the basic component on the application service, realizing the effective decoupling between the basic component and the application service, and avoiding the interference of the basic component operation on the application service.

[0033] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:

[0035] Figure 1 The following is a diagram showing an implementation environment architecture of a basic component management method based on K8S provided in an embodiment of the present application;

[0036] Figure 2 A schematic diagram of a process flow of a basic component management method based on K8S provided in an embodiment of the present application is shown;

[0037] Figure 3 A schematic diagram of a process flow of a basic component management method based on K8S provided in another embodiment of the present application is shown;

[0038] Figure 4 A schematic diagram showing the principle of a basic component management method based on K8S provided in an embodiment of the present application is shown;

[0039] Figure 5 A schematic diagram showing the principle of a basic component management method based on K8S provided in another embodiment of the present application is shown;

[0040] Figure 6 A schematic diagram of the structure of a computer system of an electronic device or server suitable for implementing an embodiment of the present application is shown. DETAILED DESCRIPTION

[0041] The present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It is also necessary to explain that, for ease of description, only the parts related to the invention are shown in the accompanying drawings.

[0042] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0043] First, the terms involved in this application are explained.

[0044] Kubernetes: K8S for short, is an open source system for automatically deploying, scaling, and managing containerized applications. In other words, it is a container orchestration system for container management and load balancing between containers.

[0045] Container: It can be understood as a special process that can divide resources, files, status and configuration into an independent space. This independent space can be transferred to any host machine without affecting the operation of the software inside.

[0046] Running node Pod: The smallest container orchestration unit in K8S. A Pod can contain multiple containers. Usually, a service cluster can include multiple working nodes, and each working node can include multiple Pods.

[0047] Basic components: third-party services and agents that business services depend on, or dynamic link libraries such as so, lib, and sdk that need to be loaded into memory.

[0048] Basic component management: including basic component installation, upgrade, rollback, destruction and other operations.

[0049] For the specific implementation environment of the K8S-based basic component management method proposed in this application, see Figure 1 . Figure 1 The implementation environment architecture diagram of the K8S-based basic component management method provided in an embodiment of the present application is shown.

[0050] like Figure 1 As shown, the implementation environment architecture includes: K8S management node, working node, running node and image repository.

[0051] The K8S management node (K8S-Master) is the control node of the cluster, which is used to manage and control the entire cluster and is responsible for the specific execution process of the control commands in K8S. The working node Node is used to run the workload assigned to the management node.

[0052] The running node Pod is created, started, or destroyed on the working node, and each running node Pod runs at least one application service container.

[0053] In the embodiment of the present application, the running node Pod also includes a basic component management container and a shared storage. The basic component management container and the application service container share the shared storage.

[0054] In the embodiment of the present application, the K8S cluster also includes an image warehouse for storing various types of images required in the server cluster, including but not limited to historical versions of various types of images. Preferably, in the embodiment of the present application, the image warehouse stores basic component images obtained by the basic component management center through development, upgrade, generation and other operations.

[0055] In the embodiments of the present application, the server node can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, as well as big data and artificial intelligence platforms.

[0056] Each server node is directly or indirectly connected to each other by wired or wireless communication. Optionally, the wireless network or wired network uses standard communication technology and / or protocol. The network is usually the Internet, and can also be any network, including but not limited to a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), a mobile, wired or wireless network, a private network or any combination of a virtual private network.

[0057] The K8S-based basic component management method proposed in this application can be implemented by a K8S-based basic component management system, and the K8S-based basic component management system can be installed on a terminal device or a server.

[0058] In order to further illustrate the technical solution provided by the embodiment of the present application, this is described in detail below in conjunction with the accompanying drawings and specific implementation methods. Although the embodiment of the present application provides the method operation instruction steps shown in the following embodiments or drawings, more or less operation instruction steps may be included in the method based on routine or no creative labor. In the steps where there is no necessary causal relationship logically, the execution order of these steps is not limited to the execution order provided by the embodiment of the present application. The method may be executed in the order of the method shown in the embodiment or drawings or in parallel during the actual processing process or when the device is executed.

[0059] Please refer to Figure 2 , Figure 2 The flowchart of the basic component management method based on K8S provided by an embodiment of the present application is shown. Figure 2 As shown, the method includes:

[0060] Step 201, responding to the basic component scheduling instruction sent by the K8S management node to the running node.

[0061] It should be noted that the basic component scheduling instructions sent by the K8S management node to the running node are used to instruct the running node to pull the target basic component management container image from the image repository and perform corresponding operations. Among them, the basic component scheduling instructions can be basic component scheduling instructions generated based on the management node's startup instructions to the running node, or they can be basic component scheduling instructions generated based on operations such as basic component upgrades and maintenance.

[0062] That is to say, when the K8S management node deploys and starts the running node in the working node based on business needs, in order to reliably run the application service container in the running node in the future, the corresponding basic component scheduling instructions are generated so that the running node can pull the target basic component management container image from the image warehouse in time to provide dependency support for subsequent application services. Or, when the basic component has been upgraded and has a newer version of the basic component image, in order to ensure that the application service container can be reliably run in the running node in the future, the corresponding basic component scheduling instructions are generated so that the running node can pull the target basic component management container image from the image warehouse in time to provide dependency support for subsequent application services.

[0063] Step 202: The running node obtains the target basic component management container from the image repository, and the target basic component management container stores the target component in the shared storage.

[0064] It should be noted that the target basic component management container image is generated by the basic component developers after developing or upgrading the basic components. Among them, the target basic component management container image contains the basic component management script, basic component image and other parameters and interface files required for basic component installation, upgrade, rollback and other operations. The target basic component management container manages the basic components in the running node by executing the basic component management script, including but not limited to basic component installation, upgrade, rollback and other operations.

[0065] The target basic component management container obtains the corresponding version label when it is generated, and the developer pushes it to the image repository for storage, so that the running node can pull the required version of the target basic component management container from the image repository according to the corresponding basic component scheduling instructions.

[0066] Specifically, after the running node pulls the target basic component management container from the image repository, the target basic component management container executes the basic component management script therein and stores the target component in the shared storage.

[0067] Step 203: The application service container runs the target application service by loading the target basic component from the shared storage.

[0068] That is to say, the application service container can obtain the target basic components from the shared storage, thereby loading the basic components to provide dependency support for the application service business operation.

[0069] Therefore, the K8S-based basic component management method provided in the embodiment of the present application utilizes the target basic component management container to store the target basic component in the shared storage, so that the application service container can effectively load the target basic component from the shared storage, thereby effectively ensuring the reliable operation of the target application service, and there is no need to regenerate the application service image based on the basic component, thereby reducing the intrusion of the basic component on the application service, realizing the effective decoupling between the basic component and the application service, and avoiding the interference of the basic component operation on the application service.

[0070] In a possible embodiment, if Figure 3 As shown, the target basic component management container stores the target basic component in the shared storage, including:

[0071] Step 301: The target basic component management container determines whether there are other basic components in the shared storage.

[0072] It should be noted that the target basic component management container can determine whether there are historical versions of basic components in the current running node by judging whether there are other basic components in the shared storage, and then execute the corresponding strategy for the first installation or update of the basic component.

[0073] Step 302: When no other basic components exist in the shared storage, the target basic component is stored in the shared storage.

[0074] It should be understood that when there are no other basic components in the shared storage, it means that there is no historical version of the basic component in the running node. At this time, you only need to store the target basic component in the shared storage according to the basic component management script in the target basic component management container.

[0075] Step 303: When other basic components exist in the shared storage, the target basic component is used to replace the other basic components.

[0076] It should be understood that when there are other basic components in the shared storage, it means that the target basic component in the current target basic component management container is an upgraded version of the basic component. In order to ensure that subsequent application services can continue to run stably, it is necessary to use the target basic component to replace the existing historical version of the basic component.

[0077] It should also be understood that before using the target basic component to replace other basic components, it is possible to further determine whether the version numbers of the target basic component and other basic components are consistent. If they are consistent, it means that the running node has already stored the target basic component, and there is no need to repeat the execution to occupy the resources of the running node. If they are inconsistent, it means that the target basic component needs to be used to replace other basic components and further execute the basic component management script.

[0078] In an optional embodiment, replacing other basic components with the target basic component includes: moving other basic components in the target location to other locations in the shared storage area, storing the target basic component in the target location, and deleting other components stored in other locations.

[0079] That is to say, in an embodiment of the present application, by first transferring other basic components of the historical version to other locations in the shared storage, the application service can continue to rely on other basic components of the historical version to continue to run stably during the upgrade, and then, by storing the target basic components in the target location, the substantial update of the basic components is completed, and finally the historical version basic components stored in other locations are deleted to reduce the resource usage in the running nodes.

[0080] It should be noted that the target location is the storage location of the basic component in the configuration file of the running node or application service. That is to say, in the embodiment of the present application, by storing the basic file in the storage location of the basic file recorded in the configuration file, it is possible to achieve the purpose of loading the upgraded basic component without rewriting the configuration file of the running node or application service, especially when the running node performs the installation component upgrade operation, thereby effectively reducing the operation amount of the basic component update process.

[0081] In a feasible embodiment, the shared storage is only used to store the storage directory of the target basic component, that is, the target basic component management container stores the installation path of the target basic component in the shared storage.

[0082] In a specific embodiment, Figure 4 As shown, the target basic component management container uses the basic component management script to install and manage the target basic component, that is, to move the target basic component from the basic component source installation directory to the basic component target installation directory corresponding to the target installation location, and then store the basic component target installation directory in the shared storage. The application service continues to load the basic component through the target installation directory in the shared storage.

[0083] In another specific embodiment, Figure 5 As shown, the target basic component management container uses the basic component management script to determine that there are other versions of basic components in the shared storage, and executes the basic component management script to first transfer the installation directory of the other versions of the basic components to obtain the basic component target installation directory_old, which is the actual basic component target installation directory where the target basic component is vacant, and then continues to execute the basic component management script to store the target basic component in the basic component target installation directory, and stores the basic component target installation directory in the shared storage, so that the shared storage has a valid basic component target installation directory again. During the period when the basic component management script is used to transfer the historical version of the basic component to the basic component target installation directory_old to the shared storage to have a valid basic component target installation directory again, the application service can continue to load the historical version of the basic component by obtaining the basic component target installation directory_old from the shared storage to maintain the stable operation of the application service business. Moreover, when it is necessary to roll back the basic component, the historical version of the basic component temporarily stored in the basic component target installation directory_old can also be used to perform the corresponding rollback operation.

[0084] It should be understood that in order to achieve the above purpose, the basic component target installation directory _old and the basic component target installation directory are other locations of the same root directory.

[0085] In a feasible embodiment, after the target basic component management container stores the target basic component in the shared storage, the basic component management container exits operation, that is, it no longer occupies the CPU, memory, storage and other resources of the running node.

[0086] Furthermore, after the target basic component storage is completed and the target basic component management container exits using the basic component management script, the running node further determines whether it is necessary to restart the running application service according to the characteristics of the target basic component. If it does not need to be restarted, it waits for the application service restart instruction issued by the K8S management node in the form of a command or forcibly triggers the restart of the basic component to complete the reloading of the basic component. If it needs to be restarted, the application service container is restarted to perform operations such as pulling up and loading the basic component during the process of starting the application service container. In this way, the joint operation of the target basic component and the application service is ensured, that is, the target basic component is used to provide a stable operating environment for the application service.

[0087] Therefore, the K8S-based basic component management method provided in the embodiment of the present application effectively decouples the basic components from the application services through the pseudo-sidecar method and the solution of sharing the basic component storage with the application service container. During the first installation, the target basic component management container is installed by pulling the target basic component management container image, and then the installation of the target basic component is completed through the basic component management footer in the target basic component management container. Then the target basic component management container exits, avoiding the additional occupation of CPU, memory and other system resources required for the container. Finally, the application service container is started to complete the operation or loading of the target basic component and the application service in the same container, effectively ensuring the stable operation of the application service.

[0088] When the basic components are upgraded or rolled back, the basic component management script is executed by using the target basic component management container. Based on the characteristics of the Linux system, the historical versions of the basic components that have been loaded into the memory by the application service are upgraded by means of move and delete operations. The target basic components are stored safely through the move + delete + move method without affecting the normal operation of the currently running application services. If the application service needs to be restarted to load the target basic components, the business personnel of the application service do not need to re-provide the image of the application service container or replace the yaml configuration file and other additional operations. Only the application service needs to be restarted to complete the change of the application service dependency to the target basic component, which effectively reduces the impact of the basic component update on the application service.

[0089] In the entire K8S cluster, the distribution of basic component versions in the cluster can be effectively controlled through basic component scheduling instructions. At the same time, during the grayscale process, even if the basic component container is restarted due to some other reasons, the logic of the management script will not change the final stored version of the basic component, so that the versions of the basic components in the cluster are finally consistent.

[0090] Furthermore, when it is necessary to destroy the running node Pod in the K8S cluster, the operation of destroying the running node Pod is performed based on the execution scheduling of the K8S management node. During the destruction process, the shared storage is deleted and the container resources are destroyed, thereby realizing the destruction operation of the target basic components.

[0091] To summarize, the K8S-based basic component management method provided in the embodiment of the present application utilizes the target basic component management container to store the target basic component in the shared storage, so that the application service container can effectively load the target basic component from the shared storage, thereby effectively ensuring the reliable operation of the target application service, and there is no need to regenerate the application service image based on the basic component, thereby reducing the intrusion of the basic component on the application service, realizing the effective decoupling between the basic component and the application service, and avoiding the disturbance of the basic component operation to the application service.

[0092] It should be noted that although the operations of the method of the present invention are described in a particular order in the drawings, this does not require or imply that the operations must be performed in this particular order or that all illustrated operations must be performed to achieve desired results.

[0093] Reference below Figure 6 , Figure 6 A schematic diagram of the structure of a computer system of an electronic device or server suitable for implementing an embodiment of the present application is shown.

[0094] like Figure 6 As shown, the computer system includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 602 or the program loaded from the storage part 608 to the random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation instructions of the system are also stored. The CPU 601, the ROM 602 and the RAM 603 are connected to each other through a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0095] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage section 608 as needed.

[0096] In particular, according to an embodiment of the present application, the above reference flow chart Figure 2 The described process can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer readable medium, and the computer program includes a program code for executing the method shown in the flow chart. In such an embodiment, the computer program includes a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the central processing unit (CPU) 601, the above-mentioned functions defined in the system of the present application are executed.

[0097] It should be noted that the computer-readable medium shown in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium such as a computer-readable storage medium that can send, propagate or transmit a program for use by or in conjunction with an instruction execution system, device or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0098] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operating instructions of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the aforementioned module, program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, the boxes represented by two connections can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operating instruction, or can be implemented with a combination of dedicated hardware and computer instructions.

[0099] As another aspect, the present application further provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiment, or may exist independently without being assembled into the electronic device. The above computer-readable storage medium stores one or more programs, and when the above programs are used by one or more processors to execute the K8S-based basic component management method described in the present application.

[0100] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the aforementioned disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other to form a technical solution.

Claims

1. A basic component management method based on K8S, characterized in that: include: Responding to a basic component scheduling instruction sent by the K8S management node to the running node; The running node obtains the target basic component management container from the image repository, and the target basic component management container stores the target basic component in the shared storage; The application service container runs the target application service by loading the target basic component from the shared storage.

2. The basic component management method based on K8S according to claim 1 is characterized in that: The storing of the target basic component in the shared storage by the target basic component management container includes: The target basic component management container determines whether there are other basic components in the shared storage; When no other basic components exist in the shared storage, the target basic component is stored in the shared storage, or When other basic components exist in the shared storage, the other basic components are replaced by the target basic components.

3. The basic component management method based on K8S according to claim 2 is characterized in that: The step of replacing the other basic components with the target basic components includes: Moving the other basic components in the target location to another location in the shared storage; storing the target basic component to the target location; The other basic components stored in the other locations are deleted.

4. The basic component management method based on K8S according to any one of claims 1 to 3, characterized in that: The storing of the target basic component in the shared storage by the target basic component management container includes: The target basic component management container stores the installation directory of the target basic component in the shared storage.

5. The basic component management method based on K8S according to claim 4 is characterized in that: The application service container runs the target application service by loading the target basic component from the shared storage, including: The application service container loads the target basic component based on the installation directory in the shared storage.

6. The K8S-based basic component management method according to claim 1, characterized in that: Also includes: After the target basic component management container stores the target basic component in the shared storage, the basic component management container exits operation.

7. The basic component management method based on K8S according to claim 1 is characterized in that: Also includes: Whether the running node needs to restart the application service container that is already running; When restart is required, the application service container is restarted, and the target basic component is loaded when the application service container is started.

8. A basic component management system based on K8S, characterized in that: include: A running node is used to obtain a target basic component management container from an image repository in response to a basic component scheduling instruction sent by a K8S management node to the running node; The target basic component management container stores the target basic component in the shared storage; The application service container runs the target application service by loading the target basic component from the shared storage.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, it implements the K8S-based basic component management method as described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, it implements the K8S-based basic component management method as described in any one of claims 1-7.