A method and system for managing Kubernetes at the edge of the cloud

By deploying kubernetes proxy and metaclusters, the automated management and operation and maintenance of kubernetes business clusters are achieved, which solves the problems of cluster operation and maintenance difficulties in the existing technology and improves the reliability and efficiency of the cluster.

CN114443214BActive Publication Date: 2025-05-27CHINA TELECOM CLOUD TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111591202.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-23
Publication Date
2025-05-27
Estimated Expiration
2041-12-23

AI Technical Summary

Technical Problem

In the prior art, cluster operation and maintenance work is relatively difficult, especially in large-scale or distributed environments, and an automated and easy-to-management method is needed to solve this problem.

Method used

By deploying kubernetes proxy and a set of kubernetes metaclusters, using the metacluster to deploy and manage kubernetes business clusters, obtain life cycle information in real time and drive the business cluster to reach the target state, and achieve automated operation and maintenance without manual intervention.

Benefits of technology

It realizes automated management and operation and maintenance of kubernetes clusters, reduces operation and maintenance complexity and the possibility of manual errors, and improves the reliability and efficiency of the cluster.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114443214B_ABST
    Figure CN114443214B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for managing cloud-edge Kubernetes, including: deploying a Kubernetes proxy and a set of Kubernetes meta-clusters; deploying Kubernetes business clusters using the Kubernetes meta-clusters; obtaining lifecycle information through the Kubernetes proxy end; the Kubernetes meta-clusters obtaining the life status information of the Kubernetes business clusters in real time, and driving the Kubernetes business clusters to reach the target state based on the lifecycle information, so as to adopt kube-on-kube for cloud-edge Kubernetes management, without manual intervention, and achieve the management of edge Kubernetes through Kubernetes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of edge computing Kubernetes technology platforms, and particularly to a method and system for managing cloud-edge Kubernetes. Background Art

[0002] Kubernetes has become the distributed operating system kernel in the container era and is currently a standard for all public cloud providers. Major domestic public cloud providers support one-click deployment of Kubernetes clusters, and automated management of Kubernetes clusters is an urgent problem to be solved. For most users who are not familiar with Kubernetes and want to go to the cloud, there is a strong need for a managed and automatically operable cluster. Similarly, in the private cloud scenario, different companies generally maintain multiple clusters, and the operation and maintenance of clusters pose a great challenge. Summary of the Invention

[0003] Therefore, the technical problem to be solved by the present invention is to overcome the defect that the operation and maintenance of clusters in the prior art are relatively difficult, and thus provide a method and system for managing cloud-edge Kubernetes.

[0004] To achieve the above object, the present invention provides the following technical solutions:

[0005] In a first aspect, an embodiment of the present invention provides a method for managing cloud-edge Kubernetes, including: deploying a Kubernetes proxy and a set of Kubernetes meta-clusters; deploying a Kubernetes business cluster by using the Kubernetes meta-clusters; obtaining lifecycle information through the Kubernetes proxy end; the Kubernetes meta-clusters obtaining the life state information of the Kubernetes business cluster in real time, and driving the Kubernetes business cluster to reach the target state based on the lifecycle information.

[0006] In an embodiment, the method for managing cloud-edge Kubernetes further includes: obtaining application operation information through the Kubernetes proxy end; the Kubernetes business cluster performing corresponding application operations based on the application operation information.

[0007] In an embodiment, the method for managing cloud-edge Kubernetes further includes: the Kubernetes proxy parsing the received information to obtain lifecycle information and application operation information.

[0008] In one embodiment, the process of deploying a service cluster using a Kubernetes meta-cluster includes: distributing the master components of the Kubernetes service cluster on the same host; mounting the host as a node in the Kubernetes meta-cluster; and using the elastic network card capability provided by the VPC of the Kubernetes meta-cluster to bind the elastic network card to the pod running the apiserver of the master component of the service cluster.

[0009] In one embodiment, the process of deploying a service cluster using a Kubernetes meta-cluster further includes: creating a Kubernetes service cluster in binary mode; distributing the master components of the Kubernetes service cluster on the same host, where the master components run in the Kubernetes service cluster; mounting the host as a node in the Kubernetes service cluster; and using the elastic network card capability provided by the VPC of the Kubernetes meta-cluster to bind the elastic network card to the pod running the apiserver of the master component of the service cluster.

[0010] In one embodiment, the method for managing cloud-edge Kubernetes further includes: creating Kubernetes service clusters in various public cloud providers and managing the Kubernetes service clusters on public clouds in a unified manner.

[0011] In one embodiment, the process of driving a Kubernetes service cluster to reach a target state based on lifecycle information includes: real-time monitoring the changes of the CRD of the Kubernetes service cluster and driving the CRD to reach the target state based on the lifecycle information.

[0012] In a second aspect, an embodiment of the present invention provides a cloud-edge Kubernetes management system, including: a deployment module for deploying Kubernetes proxy and a set of Kubernetes meta-clusters; a service cluster deployment module for deploying a Kubernetes service cluster using the Kubernetes meta-cluster; an information acquisition module for obtaining lifecycle information through the Kubernetes proxy side; and a management module for the Kubernetes meta-cluster to obtain the life state information of the Kubernetes service cluster in real time and drive the Kubernetes service cluster to reach the target state based on the lifecycle information.

[0013] In a third aspect, an embodiment of the present invention provides a computer device, including: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method for managing cloud-edge Kubernetes in the first aspect of the embodiment of the present invention.

[0014] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to execute the method for managing cloud-edge Kubernetes in the first aspect of the embodiment of the present invention.

[0015] The technical solution of the present invention has the following advantages:

[0016] The method and system for managing cloud-edge Kubernetes provided by the present invention deploy a Kubernetes proxy and a set of Kubernetes meta-clusters; use the Kubernetes meta-clusters to deploy Kubernetes business clusters; obtain lifecycle information through the Kubernetes proxy side; the Kubernetes meta-clusters obtain the life status information of the Kubernetes business clusters in real time, and drive the Kubernetes business clusters to reach the target state based on the lifecycle information, so as to adopt kube-on-kube cloud-edge Kubernetes management, without manual intervention, and realize the management of edge Kubernetes through Kubernetes. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for the description of the specific embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0018] Figure 1 It is a flowchart of a specific example of the management method provided by the embodiment of the present invention;

[0019] Figure 2 It is a flowchart of another specific example of the management method provided by the embodiment of the present invention;

[0020] Figure 3 It is a flowchart of another specific example of the management method provided by the embodiment of the present invention;

[0021] Figure 4Flow chart of another specific example of the tube inclusion method provided by the embodiment of the present invention;

[0022] Figure 5 Kube-on-kube architecture diagram provided by the embodiment of the present invention;

[0023] Figure 6 Kube-operator architecture diagram provided by the embodiment of the present invention;

[0024] Figure 7 Composition diagram of a specific example of the tube inclusion system provided by the embodiment of the present invention;

[0025] Figure 8 Composition diagram of a specific example of a computer device provided by the embodiment of the present invention. Detailed implementation manners

[0026] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0027] In the description of the present invention, it should be noted that, unless otherwise clearly defined and limited, the terms "installation", "connection" and "connection" should be understood in a broad sense. For example, it may be a fixed connection, a detachable connection or an integral connection; it may be a mechanical connection or an electrical connection; it may be a direct connection or an indirect connection through an intermediate medium, and it may also be the communication inside two components. It may be a wireless connection or a wired connection. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific situations.

[0028] In addition, the technical features involved in different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0029] Embodiment 1

[0030] The embodiment of the present invention provides a method for including cloud-edge kubernetes, as Figure 1 shown, including:

[0031] Step S11: Deploy kubernetes proxy and a set of kubernetes meta-clusters.

[0032] Specifically, in the embodiments of the present invention, a proxy server (ProxyServer, abbreviated as procy) of Kubernetes can be deployed on a cloud platform, and the managed information can be obtained through Kubernetes proxy. That is, Kubernetes proxy is an API (Application Programming Interface) proxy, and all API-related calls have to go through the Kubernetes proxy side.

[0033] Step S12: Deploy a Kubernetes service cluster by using the Kubernetes meta-cluster.

[0034] Specifically, in the embodiments of the present invention, the kube-on-kube method is adopted to manage the Kubernetes service cluster, and Kubernetes is used to deploy and manage each edge service cluster, that is, Kubernetes runs on Kubernetes, and the Kubernetes-hosted Kubernetes method is used to automatically manage the cluster.

[0035] Step S13: Obtain the lifecycle information through the Kubernetes proxy side.

[0036] Specifically, the lifecycle information in the embodiments of the present invention includes, but is not limited to, the creation, deletion, scaling, and upgrade of the cluster, etc.

[0037] Step S14: The Kubernetes meta-cluster obtains the life status information of the Kubernetes service cluster in real time, and drives the Kubernetes service cluster to reach the target state based on the lifecycle information.

[0038] Specifically, the management operation of the Kubernetes meta-cluster in the embodiments of the present invention is implemented by using Kubernetes operator. Kubernetes operator detects and monitors the life status information of the Kubernetes service cluster in real time, and judges whether the life status information of the Kubernetes service cluster is consistent with the target state. When the two are inconsistent, Kubernetes operator will make corresponding instructions according to the change of the life status information of the Kubernetes service cluster to drive the Kubernetes service cluster to reach the target state.

[0039] In a specific embodiment, as Figure 2 shown, the method for managing cloud-edge Kubernetes further includes:

[0040] Step S21: Obtain application operation information through the kubernetes proxy end.

[0041] Specifically, the managed information obtained by the kubernetes proxy end in the embodiments of the present invention not only includes lifecycle information, but also includes application operation information, where the application operation information includes, but is not limited to, the creation, deletion, and release and update of applications in the cluster.

[0042] Step S22: The kubernetes business cluster performs corresponding application operations based on the application operation information.

[0043] Specifically, the kubernetes proxy end directly sends the lifecycle information to the kubernetes meta-cluster and sends the application operation information to the kubernetes business cluster.

[0044] In a specific embodiment, the method for managing the cloud-edge kubernetes further includes: the kubernetes proxy parses the received information to obtain lifecycle information and application operation information.

[0045] Specifically, since the kubernetes proxy is an API proxy, it can receive a large number of information, and the managed information not only includes lifecycle information and application operation information. Therefore, the kubernetes proxy can parse the received information and send the information to the corresponding cluster according to the information content. The parsing method is a mature method in the prior art and will not be elaborated here.

[0046] In a specific embodiment, as Figure 3 shown, the process of deploying a business cluster using the kubernetes meta-cluster includes:

[0047] Step S31: Distribute the master components of the kubernetes business cluster on the same host.

[0048] Specifically, since in the cluster control and management node, all commands are processed by the master component, in the embodiments of the present invention, the master components are all distributed on the same host for centralized management of the kubernetes business cluster.

[0049] Step S32: The host is mounted in the kubernetes meta-cluster in the form of a node.

[0050] Specifically, the node is the workload node of the Kubernetes cluster, and the master component of the Kubernetes meta-cluster assigns work to it. Therefore, the host can be mounted in the Kubernetes meta-cluster as a node to enable the Kubernetes meta-cluster to drive and manage the Kubernetes business cluster.

[0051] Step S33: Use the elastic network card capability provided by the vpc of the kubernetes meta cluster to bind the elastic network card to the pod running the apiserver of the business cluster master component.

[0052] Specifically, after the Kubernetes business cluster is deployed in the manner of steps S31 to S32, in a private cloud scenario, since the meta-cluster nodes span computer rooms, although the master component and the node nodes of the business cluster are in the same computer room, most of the node nodes in the meta-cluster are distributed in different computer rooms. For example, some companies may have network restrictions between different computer rooms, and the network may be blocked or only dedicated line connections may be available. In addition, in a public cloud scenario, the meta-cluster has its own independent vpc network (i.e., private network). Therefore, an embodiment of the present invention utilizes the elastic network card capability provided by the vpc of the Kubernetes meta-cluster to bind the elastic network card to the pod of the business cluster master component running the apiserver. At this point, the pod running the master has joined both the vpc of the meta-cluster and the vpc of the user, i.e., a pod is in both networks at the same time, thereby achieving intercommunication related to the user's node.

[0053] In a specific embodiment, in addition to the creation of the business cluster master running in the meta cluster and the node in the business cluster as given in steps S31 to S33, the embodiment of the present invention can also deploy the kubernetes business cluster in a way that the master and node of the business cluster are both in the computer room where the business cluster is located. Specifically, Figure 4 As shown in the figure, the process of deploying a business cluster using the Kubernetes meta cluster also includes:

[0054] Step S41: Create a Kubernetes service cluster in binary mode.

[0055] Step S42: Distribute the master components of the Kubernetes service cluster on the same host, and the master components run in the Kubernetes service cluster.

[0056] Specifically, similar to step S31, the master components are evenly distributed on the same host for centralized management of the kubernetes business cluster.

[0057] Step S43: The host is mounted in the kubernetes business cluster in the form of a node.

[0058] Specifically, different from step S32, in step S43, the host is mounted in the kubernetes business cluster in the form of a node, while in step S32, the host is mounted in the kubernetes meta-cluster in the form of a node.

[0059] Step S44: Utilize the elastic network card capability provided by the vpc of the kubernetes meta-cluster to bind the elastic network card to the pod running the apiserver of the master component in the business cluster.

[0060] Specifically, the embodiment of the present invention utilizes the elastic network card capability provided by the vpc to establish communication between the kubernetes meta-cluster and the kubernetes business cluster, so that the pod running the master joins both the vpc of the meta-cluster and the vpc of the user.

[0061] In a specific embodiment, the method for managing and integrating cloud-edge kubernetes further includes: creating a kubernetes business cluster in various public cloud providers to manage the kubernetes business clusters on the public cloud in a unified manner.

[0062] Specifically, in addition to deploying the kubernetes meta-cluster and implementing the management and integration of the kubernetes business cluster in the kube-on-kube manner, the embodiment of the present invention can also deploy the kubernetes business cluster on the public cloud. The public cloud receives the management and integration information of the cluster and drives the cluster to reach the target state.

[0063] In a specific embodiment, the process of driving the kubernetes business cluster to reach the target state based on the lifecycle information includes: continuously monitoring the changes of the CRD of the kubernetes business cluster and driving the CRD to reach the target state based on the lifecycle information.

[0064] Specifically, the kubernetes-operator of the embodiment of the present invention implements the kube-on-kube architecture as Figure 5 shown. The kubernetes cluster management service manages an independent kubernetes cluster, and the two clusters are independent of each other. Figure 5The solid line with an arrow represents the operations for the lifecycle management of the business cluster, including the creation, deletion, scaling, and upgrade of the cluster. The dashed line with an arrow represents the operations for the applications in the business cluster, including the creation, deletion, publishing, and updating of the applications. On the left is the meta-cluster with kubernetes-operator deployed. kubernetes-operator uses etcd to store only part of the configuration information.

[0065] Specifically, the architecture diagram of kube-operator is as Figure 6 shown. kubernetes-operator mainly includes a custom controller and an HTTP Server. The controller mainly listens for changes in the CRD and makes it reach the final state. The HTTP Server provides multiple RESTful APIs for operating on the CRD (creation, deletion, scaling, receiving callbacks, etc.).

[0066] Embodiment 2

[0067] The embodiment of the present invention provides a management system for cloud-edge kubernetes, as Figure 7 shown, including:

[0068] Deployment module 1, used to deploy kubernetes proxy and a set of kubernetes meta-clusters; this module executes the method described in step S11 of Embodiment 1, which will not be elaborated here.

[0069] Business cluster deployment module 2, used to deploy kubernetes business clusters using the kubernetes meta-cluster; this module executes the method described in step S12 of Embodiment 1, which will not be elaborated here.

[0070] Information acquisition module 3, used to obtain lifecycle information through the kubernetes proxy side; this module executes the method described in step S13 of Embodiment 1, which will not be elaborated here.

[0071] Management module 4, used for the kubernetes meta-cluster to obtain the life state information of the kubernetes business cluster in real time, and drive the kubernetes business cluster to reach the target state based on the lifecycle information; this module executes the method described in step S14 of Embodiment 1, which will not be elaborated here.

[0072] Embodiment 3

[0073] The embodiment of the present invention provides a computer device, as Figure 8As shown in the figure, it includes: at least one processor 401, such as a CPU (Central Processing Unit), at least one communication interface 403, a memory 404, and at least one communication bus 402. Among them, the communication bus 402 is used to realize the connection and communication between these components. Among them, the communication interface 403 may include a display screen and a keyboard. Optionally, the communication interface 403 may also include a standard wired interface and a wireless interface. The memory 404 may be a high-speed RAM memory (Random Access Memory, volatile random access memory), or a non-volatile memory, such as at least one disk memory. Optionally, the memory 404 may also be at least one storage device located far from the aforementioned processor 401. Among them, the processor 401 may execute the method for managing cloud-edge kubernetes in Embodiment 1. A set of program codes are stored in the memory 404, and the processor 401 calls the program codes stored in the memory 404 to execute the method for managing cloud-edge kubernetes in Embodiment 1.

[0074] Among them, the communication bus 402 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The communication bus 402 can be divided into an address bus, a data bus, a control bus, etc. For the sake of simplicity of representation, Figure 8 only one line is used to represent it in the figure, but it does not mean that there is only one bus or one type of bus.

[0075] Among them, the memory 404 may include a volatile memory, such as a random-access memory (RAM); the memory may also include a non-volatile memory, such as a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD); the memory 404 may also include a combination of the above types of memories.

[0076] Among them, the processor 401 can be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and an NP.

[0077] Among them, the processor 401 may further include a hardware chip. The above-mentioned hardware chip can be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The above-mentioned PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0078] Optionally, the memory 404 is also used to store program instructions. The processor 401 can call the program instructions to implement the method for managing cloud-edge Kubernetes in Embodiment 1 of the present application.

[0079] The embodiment of the present invention also provides a computer-readable storage medium, on which computer-executable instructions are stored, and the computer-executable instructions can execute the method for managing cloud-edge Kubernetes in Embodiment 1. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above-mentioned types of memories.

[0080] Obviously, the above embodiments are only examples for clear illustration and are not limitations on the implementation manners. For those of ordinary skill in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation manners here. And the obvious changes or modifications derived therefrom are still within the protection scope of the present invention.

Claims

1. A method for managing Kubernetes at the edge of the cloud, characterized in that, it includes: Deploy Kubernetes proxy and a set of Kubernetes meta-clusters; Use the Kubernetes meta-cluster to deploy the Kubernetes business cluster; Obtain lifecycle information through the Kubernetes proxy; The Kubernetes meta-cluster obtains the life status information of the Kubernetes business cluster in real time, and drives the Kubernetes business cluster to reach the target state based on the lifecycle information; The process of using the Kubernetes meta-cluster to deploy the business cluster includes: distributing the master components of the Kubernetes business cluster on the same host; the host is mounted in the Kubernetes meta-cluster in the form of a node; using the elastic network card capability provided by the VPC of the Kubernetes meta-cluster, binding the elastic network card to the pod running the apiserver of the master component of the business cluster; Obtain application operation information through the Kubernetes proxy; The Kubernetes business cluster performs corresponding application operations based on the application operation information.

2. The method for managing Kubernetes at the edge of the cloud according to claim 1, characterized in that, it further includes: The Kubernetes proxy parses the received information to obtain lifecycle information and application operation information.

3. The method for managing Kubernetes at the edge of the cloud according to claim 1, characterized in that, The process of using the Kubernetes meta-cluster to deploy the business cluster further includes: Create the Kubernetes business cluster in binary mode; Distribute the master components of the Kubernetes business cluster on the same host, and the master components run in the Kubernetes business cluster; The host is mounted in the Kubernetes business cluster in the form of a node; Use the elastic network card capability provided by the VPC of the Kubernetes meta-cluster to bind the elastic network card to the pod running the apiserver of the master component of the business cluster.

4. The method for managing Kubernetes at the edge of the cloud according to claim 1, characterized in that, it further includes: Create Kubernetes business clusters in various public cloud providers and manage the Kubernetes business clusters on public clouds in a unified manner.

5. The method for managing Kubernetes at the edge of the cloud according to claim 1, characterized in that, The process of driving the Kubernetes business cluster to reach the target state based on the lifecycle information includes: Monitor the changes of the CRD of the kubernetes business cluster in real time, and drive the CRD to reach the target state based on the lifecycle information.

6. A management system for cloud-edge kubernetes, characterized in that, it includes: A deployment module for deploying kubernetes proxy and a set of kubernetes meta-clusters; A business cluster deployment module for deploying a kubernetes business cluster using the kubernetes meta-cluster; An information acquisition module for acquiring lifecycle information through the kubernetes proxy end; A management module for the kubernetes meta-cluster to obtain the life state information of the kubernetes business cluster in real time, and drive the kubernetes business cluster to reach the target state based on the lifecycle information; The process of deploying a business cluster using the kubernetes meta-cluster includes: Distribute the master components of the kubernetes business cluster on the same host; Mount the host in the kubernetes meta-cluster in the form of a node; Use the elastic network card capability provided by the vpc of the kubernetes meta-cluster to bind the elastic network card to the pod running the apiserver of the business cluster master component; Obtain application operation information through the kubernetes proxy end; The kubernetes business cluster performs corresponding application operations based on the application operation information.

7. A computer device, characterized in that, it includes: At least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the management method of cloud-edge kubernetes according to any one of claims 1-5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to execute the management method of cloud-edge kubernetes according to any one of claims 1-5.

Citation Information

Patent Citations

  • Management method and device based on Kubernetes cluster and computer readable storage medium

    CN110531987A

  • Large-scale k8s cluster operation and maintenance method and device based on multiple architectures

    CN112000438A

  • Multi-Kubernetes cluster nano-tube method, nano-tube device and computer readable storage medium

    CN112187888A