A resource management method, system, computer device and storage medium

Through the preset configuration templates and deployment processes, combined with visualized interfaces and modification marks, the problem of difficult operations of Kubernetes has been solved, and more efficient resource management and operational security is achieved.

CN119094613BActive Publication Date: 2025-01-28KINCHENG BANK OF TIANJIN CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411597230.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-11
Publication Date
2025-01-28
Estimated Expiration
2044-11-11

AI Technical Summary

Technical Problem

Kubernetes has a high professionalism, which leads to a steep learning curve for developers who are not familiar with its YAML format syntax, which is difficult to operate, limiting its popularity and application among a wider user base.

Method used

Through the preset configuration templates and deployment processes, the difficulty of configuration resource management is reduced, providing a visual interface to simplify the operation, and avoid error operations by modifying the mark and permissions.

Benefits of technology

The difficulty of reducing the management of resource management of the user, improving operational efficiency, simplifying the user's operation page, avoiding system failure and data loss caused by errors, significantly reduced the difficulty of users to learn K8S.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119094613B_ABST
    Figure CN119094613B_ABST
Patent Text Reader

Abstract

The present application relates to the field of resource management technology, and discloses a resource management method, system, computer equipment and storage medium, the system including a front end and a back end; when deploying an application, the front end sends an application deployment instruction to the back end; the back end determines a preset configuration template according to the version number, deployment environment and application branch of the application deployment instruction, and generates a corresponding pod, and then deploys the target application; when modifying the target application, the front end sends a target configuration modification instruction to the back end; the back end sends the preset modifiable parameters of the target configuration to the front end according to the target configuration modification instruction; the front end receives the preset modifiable parameters of the target configuration sent by the back end and displays them, and sends them to the back end after receiving the modified parameters of the modifiable parameters; the back end receives the modified parameters of the modifiable parameters by the front end and replaces the corresponding original parameters. The present application reduces the difficulty of user configuration resource management and improves operation efficiency through preset configuration templates and deployment processes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of resource management, and in particular to a resource management method, system, computer device and storage medium. Background Art

[0002] Kubernetes, abbreviated as k8s, is an open source container orchestration engine from Google that supports automated deployment, large-scale scalability, and containerized application management. Therefore, k8s is currently used very frequently, but due to the high professionalism of k8s, most developers must master the YAML format syntax before they can apply it. Therefore, for developers who are not familiar with k8s, the learning curve is steep and the operation is difficult, which seriously limits its popularity and application among a wider user group. Summary of the invention

[0003] In view of this, the embodiments of the present application provide a resource management method, system, computer device and storage medium, which reduce the difficulty of user configuration resource management and improve operational efficiency through preset configuration templates and deployment processes.

[0004] In a first aspect, an embodiment of the present application provides a resource management method, which is applied to the front end of a Kubernetes system, including:

[0005] When deploying an application, an application deployment instruction is sent to the backend; wherein the application deployment instruction is used to instruct the backend to generate a corresponding pod according to a corresponding preset configuration template, and then deploy the target application; the deployment instruction includes a version number, a deployment environment, and an application branch;

[0006] When modifying the target application, sending a target configuration modification instruction to the backend;

[0007] Receiving and displaying preset modifiable parameters of the target configuration sent by the back end;

[0008] Modified parameters of the modifiable parameters are received and sent to the backend.

[0009] In some embodiments, it also includes: according to the resource viewing instruction, displaying the resource usage of the target pod in the Kubernetes cluster; wherein the resource usage of the target pod includes the proportion of the target pod in each of the deployment environments, memory usage, CPU occupancy and number of services.

[0010] In a second aspect, an embodiment of the present application provides a resource management method, which is applied to the backend of a Kubernetes system, including:

[0011] When deploying an application, receive the application deployment instructions sent by the front end;

[0012] Determine a preset configuration template according to the version number, deployment environment, and application branch of the application deployment instruction, generate a corresponding pod, and then deploy the target application;

[0013] When modifying the target application, receiving a target configuration modification instruction;

[0014] Sending preset modifiable parameters of the target configuration to the front end;

[0015] Receive the modified parameters of the modifiable parameters by the front end and replace the corresponding original parameters.

[0016] In some embodiments, determining a preset configuration template according to the version number, deployment environment, and application branch of the application deployment instruction, and generating a corresponding pod, and then deploying the target application, includes:

[0017] Determine a preset configuration template according to the version number, deployment environment and application branch of the application deployment instruction;

[0018] Determine a corresponding deployment process according to the preset configuration template; wherein the deployment process is bound to a git address;

[0019] Obtain the corresponding application branch code according to the git address bound to the corresponding deployment process;

[0020] Generate an image according to the obtained application branch code, and then create a pod;

[0021] The target application is deployed according to the pod.

[0022] In some embodiments, before deploying the application, the method further includes:

[0023] The preset configuration template is configured for each application, and a process is deployed for each preset configuration template.

[0024] In some embodiments, before deploying the application, the method further includes: setting a modification mark for each parameter in each configuration of each application; wherein the modification mark includes a modifiable mark and a non-modifiable mark.

[0025] In a second aspect, an embodiment of the present application provides a resource management system, including a front end and a back end;

[0026] When deploying an application, the front end is used to send an application deployment instruction to the back end; the application deployment instruction includes a version number, a deployment environment, and an application branch.

[0027] The backend is used to receive the application deployment instruction sent by the frontend, determine the preset configuration template according to the version number, deployment environment and application branch of the application deployment instruction, generate the corresponding pod, and then deploy the target application;

[0028] When modifying the target application, the front end is further used to send a target configuration modification instruction to the back end;

[0029] The back end is further used to receive a target configuration modification instruction, and send preset modifiable parameters of the target configuration to the front end according to the target configuration modification instruction;

[0030] The front end is further used to receive and display preset modifiable parameters of the target configuration sent by the back end, and send modified parameters of the modifiable parameters to the back end after receiving them;

[0031] The back end is also used to receive the modified parameters of the modifiable parameters by the front end and replace the corresponding original parameters.

[0032] In some embodiments, the front end is a visualization interface; wherein the visualization interface is a web browser interface or a desktop application.

[0033] In a third aspect, an embodiment of the present application provides a computer device, comprising a processor and a memory, wherein the memory stores a computer program, and the processor is used to execute the computer program to implement the above-mentioned resource management method.

[0034] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, which implements the above-mentioned resource management method when executed on a processor.

[0035] The embodiments of the present application have the following beneficial effects: the present application reduces the difficulty of resource management configuration for other users and improves operational efficiency by presetting configuration templates and deployment processes; in addition, the present application sets modification marks for each configuration parameter of each application, so when the user needs to modify the parameters of a certain configuration, he only needs to display the corresponding modifiable parameters through the provided visual interface, and the non-modifiable parameters may not be displayed, thereby simplifying the user operation page, and by limiting the user's operating authority, effectively avoiding system failures and data loss caused by misoperation. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0037] Figure 1 A schematic diagram of the structure of a resource management system according to an embodiment of the present application is shown;

[0038] Figure 2 A first flow chart of the resource management method according to an embodiment of the present application is shown;

[0039] Figure 3 A first schematic diagram of a front-end visualization interface according to an embodiment of the present application is shown;

[0040] Figure 4 A second flow chart of the resource management method according to an embodiment of the present application is shown;

[0041] Figure 5 A second schematic diagram of the front-end visualization interface of an embodiment of the present application is shown;

[0042] Figure 6 A third schematic diagram of the front-end visualization interface of an embodiment of the present application is shown;

[0043] Figure 7 A fourth schematic diagram of the front-end visualization interface of an embodiment of the present application is shown;

[0044] Figure 8 A fifth schematic diagram of the front-end visualization interface of an embodiment of the present application is shown;

[0045] Fig. 9 A sixth schematic diagram of the front-end visualization interface of an embodiment of the present application is shown;

[0046] Fig.10 A third flow chart of the resource management method according to an embodiment of the present application is shown;

[0047] Fig.11 A fourth flow chart of the resource management method according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0048] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments.

[0049] The components of the embodiments of the present application generally described and shown in the drawings herein may be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0050] Hereinafter, the terms "including", "having" and their cognates that can be used in various embodiments of the present application are intended only to indicate specific features, numbers, steps, operations, elements, components or a combination of the foregoing items, and should not be understood as first excluding the existence of one or more other features, numbers, steps, operations, elements, components or a combination of the foregoing items or increasing the possibility of one or more features, numbers, steps, operations, elements, components or a combination of the foregoing items. In addition, the terms "first", "second", "third" and the like are only used to distinguish descriptions and cannot be understood as indicating or implying relative importance.

[0051] Unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meanings as those generally understood by those skilled in the art to which the various embodiments of the present application belong. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meanings as the contextual meanings in the relevant technical field and will not be interpreted as having idealized meanings or overly formal meanings unless clearly defined in the various embodiments of the present application.

[0052] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0053] Currently, applications running on cloud-based services such as Google Cloud Platform (GCP) usually require container orchestration tools to manage application containers (e.g., Docker containers), which host microservices that make up different parts of the application. Although there are many different container orchestration tools, one of the most popular container orchestration tools is the open source project "Kubernetes" developed and maintained by Google. Kubernetes can be used to deploy and manage containerized applications in a distributed computing environment, so many cloud-based service providers support Kubernetes as one of their container orchestration solutions. For example, GCP provides a service called "Google Container Engine", which is a fully managed Kubernetes engine that makes it easy to set up, operate, and scale Kubernetes clusters on GCP. However, current Kubernetes users are experienced IT professionals who are proficient in writing YAML files and executing Kubernetes commands in the command line interface (CLI). For unfamiliar developers or non-professionals, it is difficult for unfamiliar developers or non-professionals to take advantage of Kubernetes because the current Kubernetes lacks a proper user-friendly front end.

[0054] Based on this, the present application proposes a resource management method, system, computer device and storage medium, which reduce the difficulty of user configuration resource management and improve operational efficiency through preset configuration templates and deployment processes; in addition, the present application sets modification marks for each configuration parameter of each application, so when the user needs to modify the parameters of a certain configuration, he only needs to display the corresponding modifiable parameters through the provided visual interface, and the non-modifiable parameters can be not displayed, thereby simplifying the user operation page, and by limiting the user's operating authority, effectively avoiding system failures and data loss caused by misoperation.

[0055] The resource management system is described below in conjunction with some specific embodiments.

[0056] Figure 1A structural diagram of a resource management system of an embodiment of the present application is shown. Exemplarily, the resource management system includes: a front end 100 and a back end 200; wherein the back end 200 is mainly responsible for Kubernetes cluster management; the front end 100 is responsible for the interface between the user and the Kubernetes resource management system; the front end 100 of the Kubernetes resource management system is mainly responsible for communicating with the back end 200 to achieve resource management, and the front end 100 of the Kubernetes resource management system is a visual interface program, which can be a web browser plug-in or an independent desktop application.

[0057] It can be understood that the Kubernetes resource management system backend 200 mainly responds to requests from the Kubernetes resource management system frontend 100, which are usually sent via HTTP requests.

[0058] The Kubernetes resource management system backend 200 can also perform necessary verification steps to ensure that only authorized users can access the Kubernetes resource management system. This can be done by checking user credentials, which are derived from the user's authentication token. Once the verification is successfully completed, the Kubernetes resource management system backend 200 can begin processing requests from the Kubernetes resource management system frontend 100; wherein, the request sent by the frontend 100 to the backend 200 may be an application deployment instruction, a target configuration modification instruction, etc. These requests may be to generate a new Kubernetes object (e.g., Pod, Service, etc.), or they may be to modify or delete an existing Kubernetes object. In either case, the Kubernetes resource management system backend 200 will take appropriate actions to complete the request and return the corresponding results to the Kubernetes resource management system frontend 100.

[0059] The task of the Kubernetes management system front end 100 is to provide users with an intuitive and easy-to-use interface so that users can use Kubernetes. To this end, the Kubernetes resource management system front end 100 will provide a set of visual interfaces that can be used to generate new Kubernetes objects, modify existing Kubernetes objects, or remove existing Kubernetes objects. The visual interface can also be customized according to the user's preferences or needs. For example, if a user wants to generate a new Pod, the user can select the version number, deployment environment, and application branch in turn through the visual interface of the front end 100, and generate application deployment instructions; then, the Kubernetes resource management system front end 100 sends the application deployment instructions to the Kubernetes resource management system back end 200, so that the back end 200 starts the creation process of the corresponding Pod. Similarly, if the user wants to modify or delete an existing Kubernetes object, the user can send the corresponding instructions to the back end 200 through the visual interface, so that the back end 200 completes the corresponding operation according to the instructions.

[0060] For example, Figure 2 As shown, when the resource management system is executed, it includes the following steps:

[0061] Step S100, when deploying an application, the front end sends an application deployment instruction to the back end.

[0062] Since the front end of the Kubernetes resource management system is a visual interface, when users need to deploy applications, they can click the deployment button on the visual interface to trigger the visual interface to display the deployment page. Figure 3 As shown, the deployment page will display version selection items, deployment environment selection items, and application branch selection items; users first select the version and deployment environment according to their needs, and then select the application branch under the version and deployment environment. After the user selects the version, deployment environment, and application branch, click OK to generate the corresponding application deployment instructions based on the version, deployment environment, and application branch. It can be understood that Figure 3 The deployment page is only an example, and the user can customize the specific layout.

[0063] In step S200, the backend receives the application deployment instruction sent by the frontend, determines a preset configuration template according to the version number, deployment environment and application branch of the application deployment instruction, generates a corresponding pod, and then deploys the target application.

[0064] In some embodiments, the resource management system of the present application saves preset configuration templates and the deployment process of each configuration template; the preset configuration template is configured for each application when the system is set up, and the deployment process is also deployed in advance; it can be understood that the backend of the resource management system sets up a set of deployment pipelines for each application. After the pipeline deployment is completed, the customized template generates a Deployment deployment task. In this set of pipelines, the git address will be bound, so that after receiving the version number, deployment environment and application branch of the application deployment instruction, the corresponding application branch code will be pulled, and the image will be packaged and generated according to the deployed dockerfile.

[0065] After the front end sends the application deployment instruction to the back end, exemplary, as Figure 4 As shown, in one embodiment, for the above step S200, a preset configuration template is determined according to the version number, deployment environment and application branch of the application deployment instruction, and a corresponding pod is generated, and then the target application is deployed, including:

[0066] Step S210, determining a preset configuration template according to the version number, deployment environment and application branch of the application deployment instruction.

[0067] In this step, after the backend receives the application deployment instruction sent by the frontend, since the backend stores the preset configuration template corresponding to each application, the preset configuration template can be determined according to the version number, deployment environment and application branch in the application deployment instruction.

[0068] Step S220, determining a corresponding deployment process according to a preset configuration template.

[0069] Step S230, obtaining the corresponding application branch code according to the git address bound to the corresponding deployment process.

[0070] Each preset configuration template has a corresponding deployment process, and each deployment process is bound to a git address. After determining the preset configuration template, you can determine the deployment process. According to the git address bound to the deployment process, you can obtain the corresponding application branch code from the external system.

[0071] Step S240, generating an image according to the obtained application branch code, and then creating a pod.

[0072] Step S250: deploy the target application according to the pod.

[0073] Among them, Figure 5 As shown, after the target application is successfully deployed, the various variables of the application can be viewed through the front-end visual interface.

[0074] After the application is successfully deployed, if the configuration information of a certain application needs to be modified, step S300 is first executed, and the front end sends a target configuration modification instruction to the back end.

[0075] In this step, after the user determines the target application that needs to be modified, the user enters the pod details page of the target application through the front-end visual interface. It can be understood that this application uses a visual interface plus a back-end setting method, and the front-end visual interface directly displays the status of each application, which is more intuitive for users to watch. In this way, when the user modifies the configuration of the target application, there is no need to understand the yaml template interface, but only needs to directly enter the configuration page that needs to be modified through the content displayed on the visual interface.

[0076] It should be noted that before deploying the application, this application also includes: setting a modification mark for each parameter in each configuration of each application; wherein the modification mark includes a modifiable mark and an unmodifiable mark. It can be understood that this application limits the various parameters in the configuration of the application, some parameters can be modified, and some parameters cannot be modified, wherein the modifiable parameters and the unmodifiable parameters are set by the developer according to the needs.

[0077] Step S400: the backend receives a target configuration modification instruction, and sends preset modifiable parameters of the target configuration to the frontend according to the target configuration modification instruction.

[0078] Step S500, the front end receives and displays preset modifiable parameters of the target configuration sent by the back end, and sends the modified parameters of the modifiable parameters to the back end after receiving them.

[0079] Step S600: the backend receives the modified parameters of the modifiable parameters from the frontend and replaces the corresponding original parameters.

[0080] In step S300, the user sends a target configuration modification instruction of the target application to the back end through the front end. After the back end receives the target configuration modification instruction, it determines that the preset modifiable parameters can be set according to the target application corresponding to the target configuration modification instruction, and sends the preset modifiable parameters to the front end for display. It can be understood that the unmodifiable parameters do not need to be sent to the front end for display. On the one hand, this can simplify the front end visual interface and improve the user's operability; on the other hand, by limiting the user's operating authority on the unmodifiable parameters, it can avoid the problem of system failure and data loss caused by user misoperation. Furthermore, after the front end receives the modifiable parameters and displays them on the page, the user can modify the parameters as needed and send the modified parameters to the back end. After the back end receives the modified parameters, it replaces the corresponding original parameters with the modified parameters and saves them.

[0081] Exemplarily, the user may modify the environment variables of the application, modify the memory management, the tag service, or modify the settings of the activity probe.

[0082] like Figure 6 As shown, if the environment variables are modified, the modifiable parameters displayed in the front-end visual interface include but are not limited to keys, values, data volumes, and container paths. Users can directly modify, delete, or add corresponding parameters based on the content displayed in the interface.

[0083] like Figure 7 As shown, if the memory management and tag services are modified, the modifiable parameters displayed in the front-end visualization interface include but are not limited to memory resources (memory reservation, CPU reservation, etc.), tags (keys, values, etc.), etc. Users can modify the parameters displayed in the visualization interface.

[0084] like Figure 8 As shown, if the annotation description and active probe are modified, the modifiable parameters displayed in the front-end visual interface include some parameters related to the annotation and some parameters related to the probe. The user can modify and set the parameters displayed in the visual interface.

[0085] It can be understood that the present application displays the operational parameters corresponding to the configuration through a visual interface, and the parameters that do not need to be modified in the present application will not be displayed, so that the user can modify the configuration more intuitively and quickly. It should be noted that the layout of the parameter display in the front-end visual interface is only exemplary, and the user can customize the settings as needed.

[0086] In some implementations, the front end can also display the resource usage of the target pod in the Kubernetes cluster according to the resource viewing instruction.

[0087] The resource usage of the target pod includes but is not limited to the proportion of the target pod in each deployment environment, memory usage, CPU usage, and number of services.

[0088] like Fig. 9 As shown, it can display the resource status in the form of bar graphs, line graphs, lists with text descriptions, etc., and of course it can also be displayed in other chart forms. Fig. 9 The above is only an example. Through the resource usage and performance data displayed on the front end, users can intuitively understand the running status of the cluster.

[0089] The resource management system of this application uses preset configuration templates and deployment processes. When users configure applications, the backend only needs to determine the configuration template based on the version, deployment environment, and application branch, and the configuration process of the application can be implemented based on the configuration template, that is, the effect of one-click deployment of applications is achieved, which reduces the difficulty of user configuration resource management and improves operational efficiency; in addition, this application sets modification marks for each configuration parameter of each application, and when the user needs to modify the parameters of a certain configuration, it only needs to display the corresponding modifiable parameters through the provided visual interface, and the non-modifiable parameters can be displayed, thereby simplifying the user operation page, and by limiting the user's operating permissions, effectively avoiding system failures and data loss caused by misoperation. In addition, this application significantly reduces the difficulty of users learning K8s and speeds up the learning process by combining an intuitive and easy-to-use visual display interface.

[0090] Fig.10 A schematic diagram of a resource management method according to an embodiment of the present application is shown. Exemplarily, the method is applied to the front end of a Kubernetes system, including:

[0091] When deploying an application, in step S11, an application deployment instruction is sent to the backend.

[0092] Among them, the application deployment instruction is used to instruct the backend to generate the corresponding pod according to the corresponding preset configuration template, and then deploy the target application; the deployment instruction includes the version number, deployment environment and application branch.

[0093] When modifying the target application, in step S12, a target configuration modification instruction is sent to the backend.

[0094] Step S13, receiving and displaying preset modifiable parameters of the target configuration sent by the back end.

[0095] Step S14, receiving the modified parameters of the modifiable parameters and sending them to the back end.

[0096] It should be noted that the description of the functions performed by the front end in the resource management system in the method of the above embodiment is also applicable to the method of this embodiment, so it will not be repeated here.

[0097] Fig.11 A schematic diagram of a resource management method according to an embodiment of the present application is shown. Exemplarily, the method is applied to the backend of a Kubernetes system, including:

[0098] When deploying an application, step S21 is executed to receive an application deployment instruction sent by the front end.

[0099] Step S22, determine the preset configuration template according to the version number, deployment environment and application branch of the application deployment instruction, generate the corresponding pod, and then deploy the target application.

[0100] When modifying the target application, step S23 is executed to receive a target configuration modification instruction.

[0101] Step S24, sending the preset modifiable parameters of the target configuration to the front end.

[0102] Step S25, receiving the modified parameters of the modifiable parameters from the front end and replacing the corresponding original parameters.

[0103] It should be noted that the description of the functions performed by the backend in the resource management system in the method of the above embodiment is also applicable to the method of this embodiment, so it will not be repeated here.

[0104] The present application also provides a computer device. Exemplarily, the computer device includes a processor and a memory, wherein the memory stores a computer program, and the processor runs the computer program, thereby causing the terminal device to execute the above-mentioned resource management method.

[0105] Among them, the processor can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, including a central processing unit (CPU), a graphics processing unit (GPU), a network processor (NP), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or at least one of other programmable logic devices, discrete gates or transistor logic devices, and discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc., which can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application.

[0106] The memory may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electric erasable programmable read-only memory (EEPROM), etc. The memory is used to store a computer program, and the processor may execute the computer program accordingly after receiving an execution instruction.

[0107] The present application also provides a computer-readable storage medium for storing the computer program used in the above-mentioned computer device. For example, the computer-readable storage medium may include but is not limited to: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.

[0108] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and structure diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in an alternative implementation, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes 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 structure diagram and / or the flow diagram, and the combination of boxes in the structure diagram and / or the flow diagram, can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0109] In addition, the functional modules or units in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0110] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a smart phone, a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.

[0111] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.

Claims

1. A resource management method, characterized in that: Applied to the front end of the Kubernetes system, including: When deploying an application, an application deployment instruction is sent to the backend; wherein the application deployment instruction is used to instruct the backend to generate a corresponding pod according to a corresponding preset configuration template, and then deploy the target application; the deployment instruction includes a version number, a deployment environment, and an application branch; When modifying the target application, sending a target configuration modification instruction to the backend; Receiving and displaying preset modifiable parameters of the target configuration sent by the back end; Receiving modified parameters of the modifiable parameters and sending them to the back end; Among them, the backend determines the corresponding preset configuration template based on the application deployment instruction and generates the corresponding pod, and then deploys the target application, including: determining the preset configuration template according to the version number, deployment environment and application branch of the application deployment instruction; determining the corresponding deployment process according to the preset configuration template; wherein the deployment process is bound to a git address; obtaining the corresponding application branch code according to the git address bound to the deployment process; generating an image according to the obtained application branch code, and then creating a pod; deploying the target application according to the pod.

2. The resource management method according to claim 1, characterized in that: Also includes: According to the resource viewing instruction, the resource usage of the target pod in the Kubernetes cluster is displayed; wherein the resource usage of the target pod includes the proportion of the target pod in each of the deployment environments, memory usage, CPU occupancy, and number of services.

3. A resource management method, characterized in that: Applied to the backend of the Kubernetes system, including: When deploying an application, receive the application deployment instructions sent by the front end; Determine a preset configuration template according to the version number, deployment environment, and application branch of the application deployment instruction, generate a corresponding pod, and then deploy the target application; When modifying the target application, receiving a target configuration modification instruction; Sending preset modifiable parameters of the target configuration to the front end; Receiving the modified parameters of the modifiable parameters by the front end and replacing the corresponding original parameters; Among them, the preset configuration template is determined according to the version number, deployment environment and application branch of the application deployment instruction, and the corresponding pod is generated, and then the target application is deployed, including: determining the preset configuration template according to the version number, deployment environment and application branch of the application deployment instruction; determining the corresponding deployment process according to the preset configuration template; wherein the deployment process is bound to a git address; obtaining the corresponding application branch code according to the git address bound to the deployment process; generating an image according to the obtained application branch code, and then creating a pod; and deploying the target application according to the pod.

4. The resource management method according to claim 3, characterized in that: Before deploying the application, the following steps are also included: The preset configuration template is configured for each application, and a process is deployed for each preset configuration template.

5. The resource management method according to claim 3, characterized in that: Before deploying the application, the following steps are also included: A modification mark is set for each parameter in each configuration of each application; wherein the modification mark includes a modifiable mark and a non-modifiable mark.

6. A resource management system, characterized in that: Including front-end and back-end; When deploying an application, the front end is used to send an application deployment instruction to the back end; the application deployment instruction includes a version number, a deployment environment, and an application branch; The backend is used to receive the application deployment instruction sent by the frontend, determine the preset configuration template according to the version number, deployment environment and application branch of the application deployment instruction, generate the corresponding pod, and then deploy the target application; When modifying the target application, the front end is further used to send a target configuration modification instruction to the back end; The back end is further used to receive a target configuration modification instruction, and send preset modifiable parameters of the target configuration to the front end according to the target configuration modification instruction; The front end is further used to receive and display preset modifiable parameters of the target configuration sent by the back end, and send modified parameters of the modifiable parameters to the back end after receiving them; The back end is further used to receive the modified parameters of the modifiable parameters by the front end and replace the corresponding original parameters; Among them, the preset configuration template is determined according to the version number, deployment environment and application branch of the application deployment instruction, and the corresponding pod is generated, and then the target application is deployed, including: determining the preset configuration template according to the version number, deployment environment and application branch of the application deployment instruction; determining the corresponding deployment process according to the preset configuration template; wherein the deployment process is bound to a git address; obtaining the corresponding application branch code according to the git address bound to the deployment process; generating an image according to the obtained application branch code, and then creating a pod; and deploying the target application according to the pod.

7. The resource management system according to claim 6, characterized in that: The front end includes a visualization interface; wherein the visualization interface is a web browser interface or a desktop application.

8. A computer device, characterized in that: The computer device comprises a processor and a memory, wherein the memory stores a computer program, and the processor is configured to execute the computer program to implement the resource management method according to any one of claims 1 to 5.

9. A computer-readable storage medium, characterized in that: The computer program is stored therein, and when the computer program is executed on a processor, the resource management method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Automatic deployment method and device based on helm

    CN112558987A