A software deployment method based on Kubernetes

Through the cloud-native microservice architecture and kubectl tool based on Kubernetes, the deployment difficulties and maintenance inconsistencies caused by large number of microservice deployments and different environments are solved, and efficient and low-cost software delivery and maintenance are achieved.

CN113312074BActive Publication Date: 2025-08-29SHANGHAI GUANQIN INFORMATION TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110667219.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-16
Publication Date
2025-08-29
Estimated Expiration
2041-06-16

AI Technical Summary

Technical Problem

In the era of cloud computing, after enterprise-level applications transformed from monolithic architecture to microservice architecture, the number of microservice deployments and different environments were large, resulting in problems such as deployment difficulties, maintenance inconsistency and high cost.

Method used

The cloud-native microservice architecture based on Kubernetes is adopted, and the kubectl tool is used to manage resource object files such as mirror container services, namespace, deployment, service, ingress, pvc, and configmap. The template description and data collection are carried out through the visual installation and deployment tool, and the final Kubernetes resource object file is generated and imported into the cluster.

Benefits of technology

It reduces the delivery cost of enterprise-level microservice software, improves delivery efficiency and software consistency, and reduces the cost of post-maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113312074B_ABST
    Figure CN113312074B_ABST
Patent Text Reader

Abstract

The present invention provides a Kubernetes-based software deployment method, comprising the following steps: compiling all Kubernetes resource template files of application microservices and packaging them into an installation and deployment tool; creating an installation and deployment tool workload in a Kubernetes cluster; accessing the installation and deployment tool through a browser; inputting collected installation information data according to a guidance step; generating a final Kubernetes resource object installation file from the Kubernetes resource template file based on the collected installation information data; importing the Kubernetes resource object files into the Kubernetes cluster in sequence to generate resource objects; and completing the installation of all application microservices. The present invention reduces the delivery cost of enterprise-level microservice software and improves delivery efficiency; ensures the consistency of all delivered software and reduces subsequent service costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of application microservice deployment, and in particular to a software deployment method based on Kubernetes. Background Art

[0002] After entering the era of cloud computing, many enterprise-level applications have shifted from monolithic architecture to microservice architecture, and are deployed and delivered using cloud-native microservice architecture.

[0003] The deployment, configuration, and management of numerous microservices on the client side present significant challenges. This large number of deployed microservices is prone to errors due to the varying operating environments of each microservice. This makes it difficult to achieve consistency across the numerous microservices deployed on the client side, leading to significant inconvenience and increased maintenance costs. Summary of the Invention

[0004] In view of this, the purpose of the present invention is to improve the efficiency of cloud-native software delivery for enterprises and reduce the delivery, deployment, upgrade and maintenance costs. This invention is based on the Kubernetes-based cloud-native microservices architecture software delivery and deployment, and uses the kubectl tool to manage the Kubernetes resource object files required for the software's complete set of supporting image container services, namespaces, deployments, services, ingress, pvc, configmaps, and other applications.

[0005] The present invention provides a software deployment method based on Kubernetes, comprising the following steps:

[0006] S1. Write all Kubernetes resource template files for the application microservices and package them into the installation and deployment tool.

[0007] The method for writing all Kubernetes resource template files of the application microservice is to use a template language to describe the information required for the deployment and delivery of the application microservice in a templated manner, wherein the information required for the deployment and delivery of the application microservice includes: application configuration file information of each service of the application microservice and Kubernetes resource object files;

[0008] The Kubernetes resource object file includes one or more of namespace, deployment, service, ingress, pvc, and configmap;

[0009] S2. Create and install a deployment tool workload in the Kubernetes cluster.

[0010] The installation and deployment tool workload is used to manage software resource packages, collect installation process data, and create Kubernetes resource object files for application microservices. The installation and deployment tool uses a browser, such as a web page, to input and collect the necessary installation information data for the application microservices.

[0011] S3. A browser accesses the installation and deployment tool;

[0012] S4. Input the collected installation information data according to the guidance steps;

[0013] The collected installation information data includes:

[0014] a. Collect one or more of the following information: host port addresses, account numbers, and passwords of various database software that the application microservices rely on;

[0015] Specifically, the database software includes MySQL, Redis, InfluxDB, and Elasticsearch;

[0016] b. Collect the domain names of each subsystem of the application microservice;

[0017] c. Collect the SSL certificate information of the domain name;

[0018] The guiding steps include:

[0019] S41. Check whether the required application microservices have been installed in the Kubernetes environment. If so, clean up the installed application microservices before continuing the installation to ensure normal installation of the application microservices.

[0020] S42. Generate a Kubernetes resource object file from the configmap of the Kubernetes resource object template file based on the collected installation information data, and provide a configmap Kubernetes resource file for deploying and modifying application configurations.

[0021] S43. Generate the final Kubernetes resource object file from the deployment and service of the Kubernetes resource template file according to the Docker image configuration of all application microservices and the configuration of the Kubernetes resource object relationship.

[0022] The configuration of the Docker image of all application microservices and the relationship between kubernetes resource objects includes one or more of the following: a config.yaml list, a list of all service names of the application, the Docker image address of each service, the image version, and the relationship between the configmap files used by each service;

[0023] S5. Generate a final Kubernetes resource object file from the Kubernetes resource template file according to the collected installation information data;

[0024] Specifically, the kubernetes resource object file is a yaml file;

[0025] S6. Import the Kubernetes resource object files into the Kubernetes cluster in sequence to generate resource objects.

[0026] The method for sequentially importing Kubernetes resource object files into the Kubernetes cluster includes: importing the Kubernetes resource object files of all application microservices into the Kubernetes cluster through the kubectl command;

[0027] The method for generating resource objects includes: using the kubectl command to create and start all Kubernetes resource object files of the entire application microservice.

[0028] S7. Complete the installation of all application microservices.

[0029] After completing the installation of all application microservices, the process also includes monitoring the workload status of all application microservices, and after all service software is started, writing the currently installed application version number into the database software so as to serve as a basis for version determination when subsequently upgrading the application.

[0030] Compared with the prior art, the present invention has the following beneficial effects:

[0031] 1. Reduce the delivery cost of enterprise-level microservice software and improve delivery efficiency.

[0032] 2. Ensure the consistency of all delivered software and reduce subsequent service costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Various other advantages and benefits will become apparent to those skilled in the art by reading the following detailed description of the preferred embodiment.The accompanying drawings are only for the purpose of illustrating the preferred embodiment and are not to be considered as limiting the present invention.

[0034] In the attached figure:

[0035] Figure 1 This is a flowchart of the software deployment method based on Kubernetes of the present invention;

[0036] Figure 2 is a flow chart of the boot steps of an embodiment of the present invention. DETAILED DESCRIPTION

[0037] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible embodiments consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.

[0038] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. As used in this disclosure and the appended claims, the singular forms "a," "an," "the," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.

[0039] It should be understood that although the terms first, second, and third may be used in the present disclosure to describe various signals, these signals should not be limited to these terms. These terms are only used to distinguish signals of the same type from each other. For example, without departing from the scope of the present disclosure, a first signal may also be referred to as a second signal, and similarly, a second signal may also be referred to as a first signal. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0040] The embodiment of this patent first develops a visual installation and deployment tool for managing all Kubernetes resource template files and Kubernetes resource object files of application microservices, and helping installation and deployment personnel to complete the installation and deployment of microservice framework applications through visual operations.

[0041] The prerequisite for installation is to prepare all the infrastructure that the application microservices must rely on, such as Kubernetes clusters, various basic databases, etc.

[0042] Then create and start the installation and deployment tool in the Kubernetes cluster. The installation and deployment tool requires a Kubernetes kubeconfig authorization file to use the kubectl command to control the cluster, create and manage various resource objects, and access the installation and deployment tool through a browser.

[0043] The embodiment of the present invention provides a software deployment method based on Kubernetes, see the accompanying drawings Figure 1 As shown, the following steps are included:

[0044] S1. Write all Kubernetes resource template files for the application microservices and package them into the installation and deployment tool.

[0045] The method for writing all Kubernetes resource template files of the application microservice is to use a template language to describe the information required for the deployment and delivery of the application microservice in a templated manner, wherein the information required for the deployment and delivery of the application microservice includes: application configuration file information of each service of the application microservice and Kubernetes resource object files;

[0046] The Kubernetes resource object file includes one or more of namespace, deployment, service, ingress, pvc, and configmap;

[0047] In this embodiment, the namespace.yaml file is:

[0048]

[0049] In this embodiment, the pvc.yaml file is:

[0050]

[0051]

[0052] In this example, the ingress.yaml file is:

[0053]

[0054]

[0055]

[0056]

[0057]

[0058]

[0059] The configmap.yaml file in this embodiment is:

[0060]

[0061]

[0062] S2. Create and install a deployment tool workload in the Kubernetes cluster.

[0063] The installation and deployment tool workload is used to manage software resource packages, collect installation process data, and create Kubernetes resource object files for application microservices. The installation and deployment tool uses a browser, such as a web page, to input and collect the necessary installation information data for the application microservices.

[0064] S3. A browser accesses the installation and deployment tool;

[0065] S4. Input the collected installation information data according to the guidance steps;

[0066] The collected installation information data includes:

[0067] a. Collect one or more of the following information: host port addresses, account numbers, and passwords of various database software that the application microservices rely on;

[0068] Specifically, the database software includes MySQL, Redis, InfluxDB, and Elasticsearch;

[0069] b. Collect the domain names of each subsystem of the application microservice;

[0070] c. Collect the SSL certificate information of the domain name;

[0071] The guiding steps are shown in the accompanying drawings. Figure 2 Shown, including:

[0072] S41. Check whether the required application microservices have been installed in the Kubernetes environment. If so, clean up the installed application microservices before continuing the installation to ensure normal installation of the application microservices.

[0073] S42. Generate a Kubernetes resource object file from the configmap of the Kubernetes resource object template file based on the collected installation information data, and provide a configmap Kubernetes resource file for deploying and modifying application configurations.

[0074] S43. Generate the final Kubernetes resource object file from the deployment and service of the Kubernetes resource template file according to the Docker image configuration of all application microservices and the configuration of the Kubernetes resource object relationship.

[0075] The configuration of the Docker image of all application microservices and the relationship between kubernetes resource objects includes one or more of the following: a config.yaml list, a list of all service names of the application, the Docker image address of each service, the image version, and the relationship between the configmap files used by each service;

[0076] S5. Generate a final Kubernetes resource object file from the Kubernetes resource template file according to the collected installation information data;

[0077] Specifically, the kubernetes resource object file is a yaml file;

[0078] S6. Import the Kubernetes resource object files into the Kubernetes cluster in sequence to generate resource objects.

[0079] The method for sequentially importing Kubernetes resource object files into the Kubernetes cluster includes: importing the Kubernetes resource object files of all application microservices into the Kubernetes cluster through the kubectl command;

[0080] The method for generating resource objects includes: using the kubectl command to create and start all Kubernetes resource object files of the entire application microservice.

[0081] S7. Complete the installation of all application microservices.

[0082] After completing the installation of all application microservices, the process also includes monitoring the workload status of all application microservices, and after all service software is started, writing the currently installed application version number into the database software so as to serve as a basis for version determination when subsequently upgrading the application.

[0083] Compared with the prior art, the present invention has the following beneficial effects:

[0084] 1. Reduce the delivery cost of enterprise-level microservice software and improve delivery efficiency.

[0085] 2. Ensure the consistency of all delivered software and reduce subsequent service costs.

[0086] Thus far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art may make various modifications or substitutions to the relevant technical features, and the technical solutions after such modifications or substitutions will fall within the scope of protection of the present invention.

[0087] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that the present invention is susceptible to various modifications and variations. Any modifications, substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of protection of the present invention.

Claims

1. A software deployment method based on Kubernetes, characterized in that: The following steps are included: S1. Write all Kubernetes resource template files for the application microservices and package them into the installation and deployment tool. S2. Create and install a deployment tool workload in the Kubernetes cluster. S3. A browser accesses the installation and deployment tool; S4. Input the collected installation information data according to the guidance steps; S5. Generate a final Kubernetes resource object installation file from the Kubernetes resource template file according to the collected installation information data; S6. Import the Kubernetes resource object files into the Kubernetes cluster in sequence to generate resource objects. S7. Complete the installation of all application microservices; The installation information data collected in step S4 includes: a. Collect one or more of the following information: host port addresses, account numbers, and passwords of various database software that the application microservices rely on; b. Collect the domain names of each subsystem of the application microservice; c. Collect the SSL certificate information of the domain name; The installation and deployment tool workload is used to manage software resource packages, collect installation process data, and create Kubernetes resource object files for application microservices. The installation and deployment tool uses a browser page to input and collect the necessary installation information data for application microservices. The method for generating resource objects in step S6 includes: using the kubectl command to create and start all Kubernetes resource object files of the entire application microservice.

2. The software deployment method according to claim 1, characterized in that: The guiding step of the S4 step includes: S41. Check whether the required application microservices have been installed in the Kubernetes environment. If so, clean up the installed application microservices before continuing the installation. S42. Generate a Kubernetes resource object file from the configmap of the Kubernetes resource object template file based on the collected installation information data, and provide a configmap Kubernetes resource file for deploying and modifying application configurations. S43. Based on the Docker image configuration of all application microservices and the configuration of the kubernetes resource object relationship, the deployment and service of the Kubernetes resource template file are generated into the final Kubernetes resource object file.

3. The software deployment method according to claim 1, wherein: The method of importing the Kubernetes resource object files into the Kubernetes cluster in sequence in step S6 includes: importing the Kubernetes resource object files of all application microservices into the Kubernetes cluster through the kubectl command.

4. The software deployment method according to claim 1, wherein: After completing the installation of all application microservices in step S7, the process further includes monitoring the workload status of all application microservices, and after all service software is started, writing the currently installed application version number into the database software so as to serve as a basis for version determination when subsequently upgrading the application.

5. The software deployment method according to claim 1, wherein: The method for writing all Kubernetes resource template files of the application microservice in step S1 is to use a template language to template-describe the information required for the deployment and delivery of the application microservice. The information required for the deployment and delivery of the application microservice includes: application configuration file information of each service of the application microservice and Kubernetes resource object files.

6. The software deployment method according to claim 5, characterized in that: The Kubernetes resource object file includes one or more of namespace, deployment, service, ingress, pvc, and configmap.

7. The software deployment method according to claim 1, wherein: The configuration of the Docker image configuration of all application microservices and the kubernetes resource object relationship in step S43 includes one or more of a config.yaml list, a list of all service names of the application, and the Docker image address, image version, and configmap file relationship used by each service.

Citation Information

Patent Citations

  • Visual application component arrangement method and system

    CN111522543A