Cluster processing method, device, electronic device and computer readable storage medium
By generating and deploying components in cloud servers, the automatic conversion of Kubernetes native cluster to edge clusters is achieved, solving the compatibility and resource utilization problems in the existing technology, and improving the flexibility of the cluster and the linkage of Kubernetes.
Patent Information
- Application Number
- CN202010901604.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-31
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2040-08-31
AI Technical Summary
When converting Kubernetes native clusters into edge clusters, the existing technology has compatibility and resource utilization problems, and the deployment method is cumbersome and lacks flexibility and scalability.
By generating the first component and the second component in the cloud server, the first component is used to modify the native cluster interface parameters, and the second component is used to deploy proxy components in the native cluster node to realize automatic conversion of edge clusters, avoiding native clusters Cropping and manual or script conversion of cluster core components.
It realizes automatic conversion from native cluster to edge cluster, ensures compatibility and resource occupancy, improves cluster flexibility and Kubernetes linkage, and supports the autonomy of edge clusters.
Smart Images

Figure CN112035217B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of cloud computing, and in particular to a cluster processing method, device, electronic device and computer-readable storage medium. Background Art
[0002] Kubernetes is a containerized application for managing multiple hosts in a cloud platform. It supports automated deployment, large-scale scalability, and application container management. A native cluster deployed with Kubernetes can be called a Kubernetes native cluster, and an edge cluster deployed with Kubernetes can be called a Kubernetes edge cluster.
[0003] In the existing technology, there are two solutions for converting a Kubernetes native cluster into a Kubernetes edge cluster:
[0004] Solution 1: Deploy a tailored edge cluster using Kubernetes
[0005] An obvious feature of this type of Kubernetes edge cluster is to tailor the major Kubernetes components to adapt them to the limited resource environment at the edge, and add your own edge technology solutions in the tailoring process. Therefore, the deployment method of this Kubernetes edge cluster is basically the same as the deployment method of the native Kubernetes cluster.
[0006] There are many ways to deploy Kubernetes, which can be basically divided into two categories:
[0007] 1) Deploy a tailored version of the Kubernetes cluster in binary mode. This type of deployment method basically relies on remotely logging into the edge node by logging into the node, executing the corresponding Kubernetes installation naming or installation script on the edge node, and installing the tailored version of the Kubernetes edge cluster;
[0008] 2) Deploy a tailored Kubernetes cluster in container mode. This deployment method is an upgraded version of the binary deployment method. The core components of the tailored Kubernetes cluster and its own extension components are containerized and run in Kubernetes mode to provide external services.
[0009] Solution 2: Convert Kubernetes cluster manually or by script
[0010] This type of Kubernetes edge cluster does not modify the code of the core components of the native Kubernetes cluster, but only adds its own edge cluster solution to the native Kubernetes cluster, ensuring full compatibility with the native Kubernetes cluster.
[0011] However, the deployment method cannot follow the Kubernetes deployment solution for two reasons:
[0012] 1) Because edge devices are not like cloud servers, they may just be smart boxes without public IP addresses, and their resources are generally limited, especially the CPU (central processing unit) and memory. Without the tailored core components of Kubernetes, edge devices cannot fully meet the operating environment of the core components of Kubernetes.
[0013] 2) If you do not tailor the core components of Kubernetes, you can only expand your own edge technology solutions on Kubernetes. However, the operating environment of edge devices, especially some smart boxes, is very different from that of the cloud. Simply relying on Kubernetes extension plug-ins or extension interfaces cannot meet the edge technology solutions and perform automated deployment, and encounter difficulties in batch implementation.
[0014] In particular, the acquisition and reset of some environmental information of edge devices, the deployment dependencies of edge components, etc., need to be initialized and dynamically acquired. This is why there are solutions for manual reset and running specific scripts to initialize.
[0015] However, both of the above solutions have some problems.
[0016] The disadvantages of the first solution are as follows:
[0017] 1) After cutting out the functions of the core components of Kubernetes and adding its own edge technology solutions, the deployment scheme of Kubernetes is followed. Although the deployment is relatively easy, it has a fatal flaw: it is not fully compatible with Kubernetes. As Kubernetes iterates and develops, the problem will become more and more serious, not to mention the introduction of new features of Kubernetes.
[0018] 2) After trimming the major core components of Kubernetes and adding your own edge technology solutions, as the edge technology solutions continue to be enriched and more and more compatible edge devices are available, it slowly becomes more and more bloated. The device resources saved at the beginning of trimming, such as CPU and memory, are consumed, which may be more than if the major core components of Kubernetes were not trimmed.
[0019] The disadvantages of the second solution are as follows:
[0020] Converting a Kubernetes cluster to an edge Kubernetes cluster manually or using scripts is cumbersome and cannot be implemented in batches in a production environment. Scripts can achieve the goal indirectly, but lack the corresponding flexibility and linkage with other components of the Kubernetes cluster. They are highly dependent on the basic environment and are prone to errors as the environment changes. They also have poor compatibility and scalability.
[0021] To sum up, Solution 1 will cut out the major core components of Kubernetes, add its own edge technology solutions, and follow the Kubernetes deployment solution to achieve the purpose of deploying a Kubernetes edge cluster. However, with the enrichment of solutions and the development of Kubernetes, the compatibility with Kubernetes and the resource usage of edge devices will become worse and worse over time. Solution 2 can achieve the goal in disguise through manual and scripting, but it lacks flexibility, scalability, and linkage with Kubernetes, and is extremely prone to errors. Summary of the invention
[0022] The present application provides a cluster processing method, device, electronic device and computer-readable storage medium, which can solve the above problems. The technical solution is as follows:
[0023] On the one hand, a cluster processing method is provided, the method is applied to any server in the cloud, and the method includes:
[0024] When receiving a conversion instruction for converting a preset native cluster into an edge cluster, generating a first component and a second component based on a preset edge cluster management component; the first component is used to modify the parameters of the native cluster interface in any server, and the second component is used to deploy a proxy component in any node in the native cluster;
[0025] Based on the first component, the parameters of the native cluster interface are modified to obtain a modified native cluster interface, and the second component is sent to each node in the native cluster, so that the second component deploys the proxy component in each node, and the cluster composed of the deployed nodes is used as an edge cluster, so that each node in the edge cluster can exchange data with the modified native cluster interface in any server through the proxy component.
[0026] On the other hand, a cluster processing method is provided, the method being applied to any node in a native cluster, the method comprising:
[0027] receiving a second component sent by the cloud;
[0028] deploying an agent component based on the second component;
[0029] Data interaction is performed with the cloud through the proxy component.
[0030] On the other hand, a cluster processing device is provided, the device is applied to any server in the cloud, and the device includes:
[0031] A first processing module, configured to generate a first component and a second component based on a preset edge cluster management component when receiving a conversion instruction for converting a preset native cluster into an edge cluster; the first component is configured to modify parameters of a native cluster interface in any server, and the second component is configured to deploy a proxy component in any node in the native cluster;
[0032] The second processing module is used to modify the parameters of the native cluster interface based on the first component to obtain the modified native cluster interface, and send the second component to each node in the native cluster, so that the second component deploys the proxy component in each node, and uses the cluster composed of the deployed nodes as an edge cluster, so that each node in the edge cluster can exchange data with the modified native cluster interface in any server through the proxy component.
[0033] Preferably, the edge cluster management component includes at least two preset component templates, and the at least two preset component templates include a first component template corresponding to the first component and a second component template corresponding to the second component;
[0034] The first processing module comprises:
[0035] A filling submodule, used to use the edge cluster management component to fill the parameter values in the first component template and the parameter values in the second component template respectively, to obtain the filled first component template and the second component template;
[0036] The initialization submodule is used to initialize the filled first component template and the second component template respectively to obtain the first component and the second component.
[0037] Preferably, the first component includes preset interface parameters;
[0038] The second processing module comprises:
[0039] An updating submodule, used to update the parameters of the native cluster interface using the preset interface parameters to obtain updated interface parameters;
[0040] The first restart submodule is used to restart the native cluster interface based on the updated interface parameters, and obtain a modified native cluster interface when the restart is completed.
[0041] On the other hand, a cluster processing device is provided, the device is applied to any node in a native cluster, and the device includes:
[0042] A receiving module, used for receiving a second component sent by the cloud;
[0043] A deployment module, used for deploying an agent component based on the second component;
[0044] And, calling the proxy component to perform data interaction with the cloud.
[0045] Preferably, the second component comprises a preset proxy component template;
[0046] The deployment module includes:
[0047] A writing submodule, used for writing the proxy component template into a preset storage address through the second component;
[0048] And, calling a preset container management component to obtain the proxy component template from the storage address, and initializing the proxy component template to obtain the proxy component.
[0049] Preferably, the deployment module further includes:
[0050] A health detection submodule, used for performing health detection on the proxy component through the second component;
[0051] A configuration file updating submodule, used for writing the address information of the proxy component into the configuration file of the container management component to obtain an updated configuration file when the health check passes;
[0052] The second restart submodule is used to restart the container management component through the second component, so that the restarted container management component runs the updated configuration file.
[0053] Preferably, calling the proxy component to perform data interaction with the cloud comprises:
[0054] The restarted container management component calls the proxy component to perform data interaction with the cloud.
[0055] Preferably, the second component runs in a preset container in the any node, the container management component runs in the any node, and the preset container and the any node share the process identifier of the any node;
[0056] The second restart submodule includes:
[0057] An acquiring unit, configured to acquire a corresponding preset process in any of the nodes based on the process identifier;
[0058] A process switching unit, which switches the process corresponding to the second component to the preset process through a preset process switching instruction;
[0059] A restart unit is used to restart the container management component in any one of the nodes based on the preset process.
[0060] In another aspect, an electronic device is provided, the electronic device comprising:
[0061] processor, memory, and bus;
[0062] The bus is used to connect the processor and the memory;
[0063] The memory is used to store operation instructions;
[0064] The processor is used to call the operation instruction, and the executable instruction enables the processor to perform the operation corresponding to the cluster processing method of the present application.
[0065] On the other hand, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the cluster processing method of the present application is implemented.
[0066] The beneficial effects of the technical solution provided by this application are:
[0067] When any server in the cloud receives a conversion instruction for converting a preset native cluster into an edge cluster, a first component and a second component are generated based on a preset edge cluster management component; the first component is used to modify the parameters of the native cluster interface in any server, and the second component is used to deploy a proxy component in any node in the native cluster; then the parameters of the native cluster interface are modified based on the first component to obtain a modified native cluster interface, and the second component is sent to each node in the native cluster, so that the second component deploys the proxy component in each node, and the cluster composed of the deployed nodes is used as an edge cluster, so that each node in the edge cluster interacts with the modified native cluster interface in any server through the proxy component. In this way, an edge cluster management component is deployed in any server in the cloud, and then a first component and a second component are generated based on the edge cluster management component. The first component modifies the parameters of the native cluster interface in the server, and restarts the modified native cluster interface. At the same time, the second component is sent to each node. Each node deploys a proxy component based on the second component, so that each node can interact with the modified native cluster interface in the server based on its own proxy component. The deployed nodes form an edge cluster, thereby realizing the automatic conversion from the native cluster to the edge cluster.
[0068] Moreover, based on the native cluster, there is no need to tailor the functions of the core components in the native cluster, nor is there any need to convert the cluster manually or through scripts. This not only ensures the compatibility of the native cluster and the resource occupancy rate of the nodes in the edge cluster, but also improves the flexibility, scalability and linkage of cluster conversion with Kubernetes.
[0069] Furthermore, after converting the native cluster to the edge cluster, the edge cluster can be converted back to the native cluster through recovery instructions, further improving the flexibility of the cluster. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in describing the embodiments of the present application.
[0071] Figure 1 A schematic diagram of an application environment of a cluster processing method of the present application;
[0072] Figure 2 A schematic diagram of a process flow of a cluster processing method provided by an embodiment of the present application;
[0073] Figure 3 A schematic flow chart of a cluster processing method provided in another embodiment of the present application;
[0074] Figure 4 A schematic diagram of the core component architecture of a cluster processing method provided in yet another embodiment of the present application;
[0075] Figure 5 A complete schematic diagram of a cluster processing method provided in yet another embodiment of the present application;
[0076] Figure 6 A schematic diagram of the structure of a cluster processing device provided in yet another embodiment of the present application;
[0077] Figure 7 A schematic diagram of the structure of a cluster processing device provided in yet another embodiment of the present application;
[0078] Figure 8 A schematic diagram of the structure of an electronic device for cluster processing provided in yet another embodiment of the present application. DETAILED DESCRIPTION
[0079] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present invention.
[0080] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.
[0081] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0082] First, several terms involved in this application are introduced and explained:
[0083] Cloud technology refers to a hosting technology that unifies hardware, software, network and other resources within a wide area network or local area network to achieve data computing, storage, processing and sharing.
[0084] Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool, which can be used on demand and is flexible and convenient. Cloud computing technology will become an important support. The backend services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites and more portal websites. With the rapid development and application of the Internet industry, in the future, each item may have its own identification mark, which needs to be transmitted to the backend system for logical processing. Data of different levels will be processed separately. All kinds of industry data need strong system backing support, which can only be achieved through cloud computing.
[0085] Cloud computing is a computing model that distributes computing tasks on a resource pool composed of a large number of computers, allowing various application systems to obtain computing power, storage space and information services as needed. The network that provides resources is called a "cloud". From the user's perspective, the resources in the "cloud" are infinitely scalable and can be obtained at any time, used on demand, expanded at any time, and paid for by use.
[0086] As a provider of basic cloud computing capabilities, a cloud computing resource pool (referred to as a cloud platform, generally referred to as an IaaS (Infrastructure as a Service) platform) will be established, and various types of virtual resources will be deployed in the resource pool for external customers to choose to use. The cloud computing resource pool mainly includes: computing devices (virtualized machines, including operating systems), storage devices, and network devices.
[0087] According to the logical function division, the PaaS (Platform as a Service) layer can be deployed on the IaaS (Infrastructure as a Service) layer, and the SaaS (Software as a Service) layer can be deployed on the PaaS layer. SaaS can also be deployed directly on IaaS. PaaS is a platform for software operation, such as databases, web containers, etc. SaaS is a variety of business software, such as web portals, SMS mass senders, etc. Generally speaking, SaaS and PaaS are upper layers relative to IaaS.
[0088] The native cluster in this application can be a Kubernetes native cluster. Kubernetes is a containerized application for managing multiple hosts in a cloud platform. It supports automated deployment, large-scale scalability, and application container management. In Kubernetes, multiple containers can be created, each of which runs an application instance. Then, through the built-in load balancing strategy, the group of application instances can be managed, discovered, and accessed, and these details do not require the operation and maintenance personnel to perform complex manual configuration and processing.
[0089] The edge cluster in the present application may be a cluster composed of multiple nodes without a public IP (Internet Protocol), and the cluster is obtained by converting a native cluster (the specific conversion method is detailed in the following embodiment).
[0090] The cluster processing method, device, electronic device and computer-readable storage medium provided in the present application are intended to solve the above technical problems in the prior art.
[0091] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0092] The embodiment of the present invention provides an application environment of a cluster processing method, see Figure 1 , the application environment includes: a first device 101 and a second device 102. The first device 101 and the second device 102 are connected via a network, the first device 101 is an access device, and the second device 102 is an accessed device. The first device 101 can be a node in a native cluster, and the second device 102 can be a server in the cloud. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The node can be a device without a public IP, such as a smart car, a smart speaker, a smart watch, etc., but is not limited to this. The node and the server can be directly or indirectly connected via wired or wireless communication, and this application is not limited here.
[0093] In the above application environment, the cloud and the node can each execute a cluster processing method. In an embodiment of the present invention, a cluster processing method is provided, which can be applied to any server in the cloud, such as Figure 2As shown, the method includes:
[0094] Step S201, when a conversion instruction for converting a preset native cluster into an edge cluster is received, a first component and a second component are generated based on a preset edge cluster management component; the first component is used to modify the parameters of the native cluster interface in any server, and the second component is used to deploy a proxy component in any node in the native cluster;
[0095] In actual applications, the edge cluster management component edgeadm can be installed in the server. The edge cluster management component is a binary command tool for managing edge clusters. It has the function of generating and filling edge cluster core component templates and is the entry point for triggering the conversion of native clusters into edge clusters.
[0096] Typical uses of edge cluster management components include:
[0097] 1) Convert the native cluster to an edge cluster;
[0098] 2) The transformed edge cluster is restored to the original cluster before transformation;
[0099] 3) Customize the attributes of the edge cluster for conversion.
[0100] Of course, in addition to the typical uses mentioned above, other uses may also be included, which may be set according to actual needs in practical applications, and the embodiments of the present invention do not limit this.
[0101] Applied in the embodiment of the present invention, the user can initiate a conversion instruction to convert the native cluster into an edge cluster in the edge management component. When the server receives the conversion instruction through the edge management component, it can generate the first component master helper-job and the second component node helper-job based on the edge management component. Among them, the first component is used to modify the parameters of the native cluster interface in the server, and the second component is used to deploy the proxy component in any node in the native cluster. In addition, the first component can also complete the setting and startup of the properties of the relevant components in the server, and the connection of the link; the second component can also complete the setting and startup of the properties of the relevant components in the node, and the connection of the link.
[0102] It should be noted that after the server generates the second component, the second component can be sent to each node in the native cluster, and the second component in each node can be deployed as a proxy component.
[0103] In a preferred embodiment of the present invention, the edge cluster management component includes at least two preset component templates, and the at least two preset component templates include a first component template corresponding to the first component and a second component template corresponding to the second component;
[0104] Generating a first component and a second component based on a preset edge cluster management component includes:
[0105] Using the edge cluster management component to fill the parameter values in the first component template and the parameter values in the second component template respectively, to obtain the filled first component template and the second component template;
[0106] The filled first component template and the second component template are respectively initialized to obtain a first component and a second component.
[0107] Specifically, the edge cluster management component has preset component templates of multiple standard components, including a first component template corresponding to the first component and a second component template corresponding to the second component. Multiple parameters are preset in each component template, and the edge cluster management component can automatically fill in the parameter value for each parameter in each component template, thereby obtaining each filled component template, including the filled first component template and the filled second component template. Then, each filled component template is initialized respectively, thereby obtaining each component, including the first component and the second component.
[0108] In the embodiment of the present invention, in addition to the deployment of standard components, non-standard components also need to be deployed, and the edge cluster management component is used to deploy standard components, so non-standard components can be deployed through the first component and the second component. Among them, the standard component is a pre-defined component generated by the edge cluster management component, and except for the standard component, other components are non-standard components.
[0109] Furthermore, in actual applications, all parameters in any component template can be automatically filled in by the edge cluster management component, can be manually filled in by the user, or can be filled in by a combination of the two.
[0110] For example, component template A includes three parameters a, b, and c. These three parameters can all be automatically filled with parameter values by the edge management component, or all be manually filled with parameter values by the user, or the user can first manually fill in the parameter values of b and c, and then the edge management component automatically fills in the parameter value of a. The specific filling method can be adjusted according to actual needs, and the embodiment of the present invention does not limit this.
[0111] It should be noted that the component template in the embodiment of the present invention may be in YAML format, which is a recursive abbreviation of "YAML Ain'ta Markup Language" (YAML is not a markup language). YAML is a highly readable format for expressing data serialization. Of course, other formats available for component templates are also applicable to the embodiment of the present invention, and can be set according to actual needs in actual applications, and the embodiment of the present invention does not limit this.
[0112] Step S202: Modify the parameters of the native cluster interface based on the first component to obtain a modified native cluster interface, and send the second component to each node in the native cluster, so that the second component deploys a proxy component in each node, and uses the cluster composed of the deployed nodes as an edge cluster, so that each node in the edge cluster interacts with the modified native cluster interface in any server through the proxy component.
[0113] After obtaining the first component and the second component, the parameter value of the native cluster interface Kubernetes APIService in the server can be modified through the first component to obtain the modified native cluster interface, and the second component is sent to each node in the native cluster at the same time. Each node deploys the proxy component through the second component. In this way, the cluster composed of the deployed nodes forms an edge cluster, and each deployed node interacts with the modified native cluster interface in the server through the proxy component. Among them, since the second component is to deploy the proxy component in the node, the specific method of deployment is described in detail in the embodiment of the node.
[0114] In a preferred embodiment of the present invention, the first component includes preset interface parameters;
[0115] Modifying the parameters of the native cluster interface based on the first component to obtain a modified native cluster interface includes:
[0116] Use the preset interface parameters to update the parameters of the native cluster interface to obtain updated interface parameters;
[0117] The native cluster interface is restarted based on the updated interface parameters. When the restart is completed, the modified native cluster interface is obtained.
[0118] Specifically, the generated first component may include preset interface parameters, so the first component may update the parameter values of the parameters of the native cluster interface with the parameter values of the preset interface parameters, thereby obtaining updated interface parameters. Since the parameter values of the native cluster interface are modified, the first component needs to restart the native cluster interface. After the restart is completed, the modified native cluster interface runs normally, and the first component exits.
[0119] In an embodiment of the present invention, when any server in the cloud receives a conversion instruction for converting a preset native cluster into an edge cluster, a first component and a second component are generated based on a preset edge cluster management component; the first component is used to modify the parameters of the native cluster interface in any server, and the second component is used to deploy a proxy component in any node in the native cluster; then the parameters of the native cluster interface are modified based on the first component to obtain a modified native cluster interface, and the second component is sent to each node in the native cluster, so that the second component deploys the proxy component in each node, and the cluster composed of the deployed nodes is used as an edge cluster, so that each node in the edge cluster interacts with the modified native cluster interface in any server through the proxy component. In this way, an edge cluster management component is deployed in any server in the cloud, and then a first component and a second component are generated based on the edge cluster management component. The first component modifies the parameters of the native cluster interface in the server, and restarts the modified native cluster interface. At the same time, the second component is sent to each node. Each node deploys a proxy component based on the second component, so that each node can interact with the modified native cluster interface in the server based on its own proxy component. The deployed nodes form an edge cluster, thereby realizing the automatic conversion from the native cluster to the edge cluster.
[0120] Moreover, based on the native cluster, there is no need to tailor the functions of the core components in the native cluster, nor is there any need to convert the cluster manually or through scripts. This not only ensures the compatibility of the native cluster and the resource occupancy rate of the nodes in the edge cluster, but also improves the flexibility, scalability and linkage of cluster conversion with Kubernetes.
[0121] Furthermore, after converting the native cluster to the edge cluster, the edge cluster can be converted back to the native cluster through recovery instructions, further improving the flexibility of the cluster.
[0122] In an embodiment of the present invention, a cluster processing method is provided, which can be applied to any node in a native cluster, such as Figure 3 As shown, the method includes:
[0123] Step S301, receiving a second component sent by the cloud;
[0124] Specifically, any node in the native cluster receives the second component sent by any server in the cloud. The generation method of the second component can be specifically referred to steps S201 to S202, which will not be described in detail here.
[0125] Step S302, deploying an agent component based on the second component;
[0126] After the node receives the second component, the proxy component can be deployed in the node through the second component.
[0127] In a preferred embodiment of the present invention, the second component includes a preset proxy component template;
[0128] Deploy the proxy component based on the second component, including:
[0129] Writing the proxy component template to a preset storage address through the second component;
[0130] The proxy component template is obtained from the storage address through the preset container management component, and the proxy component template is initialized to obtain the proxy component.
[0131] Specifically, the second component includes a preset proxy component template, so the second component can write the proxy component template to a preset storage address, such as a Pod directory. The storage address can be detected by the preset container management component kubelet. When the container management component detects that a new component template is written to the storage address, the new component template can be obtained and initialized, and the new component can run normally. Therefore, when the container management component detects that the proxy component template is written to the storage address, the proxy component template can be obtained from the storage address, and the proxy component template can be initialized to obtain the proxy component lite-apiserver.
[0132] It should be noted that in the embodiment of the present invention, a program must be run on each node to manage the life cycle of the container. This program is the container management component. The container management component is the most important controller in Kubernetes. The container management component is responsible for driving the container execution layer. It runs on the host machine (that is, the node) in binary.
[0133] Each node in Kubernetes has at least one container, and each container is isolated from each other and the host machine on which it runs. Each container has its own file system, and processes between containers do not affect each other, and computing resources can be distinguished. In addition, containers take up less resources and are quick to deploy. Each component can be packaged into a container image, which runs in the container, and each component has a one-to-one relationship with the container.
[0134] In a preferred embodiment of the present invention, it also includes:
[0135] Perform health check on the proxy component through the second component;
[0136] When the health check passes, the address information of the proxy component is written into the configuration file of the container management component to obtain an updated configuration file;
[0137] The container management component is restarted by the second component, so that the restarted container management component runs the updated configuration file.
[0138] Specifically, after obtaining the proxy component, the second component can also perform a health check on the proxy component, that is, check whether the proxy component can work normally. If it can, the address information of the proxy component is written into the configuration file of the container management component to obtain an updated configuration file. Since the configuration file of the container management component is updated, the second component can restart the container management component, and the restarted container management component can run the updated configuration file.
[0139] The purpose of writing the address information of the proxy component into the configuration file of the container management component is to establish a link between the container management component and the proxy component, so that the proxy component and the container management component can exchange data. The format of the address information can be "IP: port number", for example, 127.0.0.1:1357. Of course, address information in other formats is also applicable to the embodiment of the present invention, and can be set according to actual needs in actual applications, and the embodiment of the present invention does not limit this.
[0140] In a preferred embodiment of the present invention, the second component runs in a preset container in any node, the container management component runs in any node, and the preset container and any node share the process identifier of any node;
[0141] Restarting the container management component through the second component includes:
[0142] Obtain the corresponding preset process in any node based on the process identifier;
[0143] Switching the process corresponding to the second component to a preset process through a preset process switching instruction;
[0144] Restart the container management component in any node based on the preset process.
[0145] Specifically, since the second component is generated by the edge component management component, it needs to run in the container in the node, and the container management component manages each container, so it runs on the host machine of the container, that is, in the node.
[0146] However, under normal circumstances, the host machine's processes are not visible in the container, that is, the processes of the container management component are not visible in the container, so the host machine cannot be operated through the container.
[0147] In response to this situation, in an embodiment of the present invention, the container and the node share the same process identifier, so that the process of the container management component can be seen and obtained in the container, and then a preset process switching instruction, such as linuxnsenter, is used to switch the process of the second component to the preset process of the node, and then the restart command is executed on the container management component through the preset process to restart the container management component through the second component in the container.
[0148] The preset process may be process No. 1 of the node. Of course, other process switching instructions and other preset processes are also applicable to the embodiment of the present invention, and in practical applications, they can be set according to actual needs, and the embodiment of the present invention does not limit this.
[0149] Step S303: data interaction with the cloud through the proxy component.
[0150] After the proxy component in the node is deployed, the node can exchange data with the server through the proxy component.
[0151] Among them, data interaction with the cloud is carried out through the proxy component, including:
[0152] After the restart, the container management component interacts with the cloud through the proxy component.
[0153] After the container management component is restarted, data is exchanged with the proxy component based on the address information of the proxy component, and the proxy component exchanges data with the cloud.
[0154] In an embodiment of the present invention, the proxy component can cache data. When the node is disconnected from the cloud, the proxy component can cache the data sent by the container management component. When the node is connected to the cloud again, the cached data can be sent to the cloud, thereby realizing the autonomy of each node in the edge cluster.
[0155] Moreover, under normal circumstances, since the nodes in the edge cluster do not have public IP addresses, the cloud cannot send binary files to the nodes in each edge cluster. In the embodiment of the present invention, by deploying a proxy component, the cloud can send binary files to the nodes in each edge cluster through the proxy component based on the native cluster, thus realizing cloud-edge collaboration between the cloud and the edge cluster.
[0156] Furthermore, since the second component has the function of setting and starting the properties of the relevant components in the node and connecting the links, the nodes in the weak network can also achieve weak network component management through the second component.
[0157] In an embodiment of the present invention, any node in the native cluster receives the second component sent by the cloud, and then the second component writes the proxy component template it contains to a preset storage address. The preset container management component detects the proxy component template and initializes it, thereby obtaining the proxy component. When the health check of the proxy component by the second component passes, the address information of the proxy component is written into the configuration file of the container management component to obtain an updated configuration file. Then, based on the process identifier shared by the container and the node and the preset process switching instruction, the second component restarts the container management component. The restarted container management component runs the updated configuration file, and the container management component can interact with the cloud through the proxy component. This solves the problem that the cloud cannot send binary files to the nodes in each edge cluster, and realizes the cloud-edge collaboration between the cloud and the edge cluster.
[0158] Furthermore, since the proxy component can cache data, when the node is disconnected from the cloud, the proxy component can cache the data sent by the container management component, and when the node is connected to the cloud again, the cached data can be sent to the cloud, thereby realizing the autonomy of each node in the edge cluster.
[0159] Furthermore, since the second component has the function of setting and starting the properties of the relevant components in the node and connecting the links, the nodes in the weak network can also achieve weak network component management through the second component.
[0160] For ease of understanding, the present invention provides an overall description of the method for converting a native cluster into an edge cluster. Figure 4 As shown, it is an architecture diagram of the core components of an embodiment of the present invention. The architecture diagram includes the cloud and the edge. The cloud includes the edge cluster management component edgeadm, the first component master helper-job, and each server master, and any master includes the native cluster interface Kubernetes APIService; the edge includes multiple nodes node, and any node includes the second component node helper-job, the proxy component lite-apiserver, and the container management component kubelet. Among them, the specific method of data interaction between each component can refer to steps S201 to S202 and steps S301 to S303, which will not be repeated here.
[0161] Further, if Figure 5 The complete architecture diagram of the embodiment of the present invention is shown in FIG. In addition to the above core components, the architecture diagram also includes:
[0162] Cloud-edge collaboration components:
[0163] Cloud-edge collaborative tunnel component (Tunnel Cloud): proxy cloud requests to the edge;
[0164] Edge-to-edge cloud-to-edge collaborative tunnel component (Tunnel Edge): accepts requests from the cloud-to-edge collaborative tunnel component and forwards cloud requests to the edge component;
[0165] Proxy component (lite-apiserver): Proxy edge component requests to the cloud and cache key cloud data for edge autonomy.
[0166] Distributed health check components:
[0167] Distributed health check edge component on each node (Edge Health): senses the health of edge nodes;
[0168] Distributed health check cloud component (Edge Health Admssion): assists the Kubernetes controller.
[0169] Edge application management components:
[0170] : Application Grid Controller; and,
[0171] Application Grid Wrapper: Closes the loop of application traffic.
[0172] As can be seen from the architecture diagram, the application network controller, health check cloud component, and cloud-edge collaborative tunnel component must be deployed on the cloud; the edge-edge collaborative tunnel component, proxy component, health check edge component, and application mesh traffic control component need to be deployed on the edge.
[0173] The properties and typical requirements of each component that needs to be deployed are shown in Table 1:
[0174]
[0175]
[0176] As can be seen from Table 1, due to the different deployment methods of various components, there are Deployment, DaemonSet, and StaticPod. The key is that their corresponding YAML templates are not exactly the same, and corresponding filling parameters are required. Therefore, the existing methods for converting native clusters to edge clusters have the following problems:
[0177] 1) Edge components include cloud components and edge components, and both cloud and edge have multiple copies;
[0178] 2) The properties of edge components vary, including Deployment, DaemonSet, StaticPod, etc.
[0179] 3) The YAML templates of each component are not complete and need to rely on some information of the native Kubernetes cluster to be filled or generated;
[0180] 4) There are requirements for the startup sequence and access sequence between components, and the startup sequence of each component must be strictly controlled;
[0181] 5) The properties of the native Kubernetes core components need to be set and restarted. Especially when the core components are deployed in binary mode, how to ensure that the edge component binary can be correctly set and restarted in a weak network environment.
[0182] After listing the above problems, it seems that the above problems can be solved by deploying a binary agent on the node. However, since both the cloud and the edge have multiple copies, the edge network is weak, and the nodes do not have public IPs, it is obviously not feasible to send binary files to many nodes, especially in a native Kubernetes cluster. The method based on steps S201 to S202 and steps S301 to S303 fully utilizes the capabilities of Kubernetes to solve the above problems.
[0183] Figure 6 A schematic diagram of a cluster processing device provided in another embodiment of the present application is shown in FIG. Figure 6 As shown, the device of this embodiment can be applied to any server in the cloud, and the device includes:
[0184] A first processing module 601 is used to generate a first component and a second component based on a preset edge cluster management component when receiving a conversion instruction for converting a preset native cluster into an edge cluster; the first component is used to modify the parameters of the native cluster interface in any server, and the second component is used to deploy a proxy component in any node in the native cluster;
[0185] The second processing module 602 is used to modify the parameters of the native cluster interface based on the first component to obtain the modified native cluster interface, and send the second component to each node in the native cluster, so that the second component deploys the proxy component in each node, and uses the cluster composed of the deployed nodes as the edge cluster, so that each node in the edge cluster can exchange data with the modified native cluster interface in any server through the proxy component.
[0186] In a preferred embodiment of the present invention, the edge cluster management component includes at least two preset component templates, and the at least two preset component templates include a first component template corresponding to the first component and a second component template corresponding to the second component;
[0187] The first processing module includes:
[0188] A filling submodule, used to use the edge cluster management component to fill the parameter values in the first component template and the parameter values in the second component template respectively, to obtain the filled first component template and the second component template;
[0189] The initialization submodule is used to initialize the filled first component template and the second component template respectively to obtain the first component and the second component.
[0190] In a preferred embodiment of the present invention, the first component includes preset interface parameters;
[0191] The second processing module includes:
[0192] The update submodule is used to update the parameters of the native cluster interface using the preset interface parameters to obtain the updated interface parameters;
[0193] The first restart submodule is used to restart the native cluster interface based on the updated interface parameters, and obtain the modified native cluster interface when the restart is completed.
[0194] The cluster processing device of this embodiment can execute the cluster processing method shown in the first embodiment of the present application. The implementation principle is similar and will not be repeated here.
[0195] In an embodiment of the present invention, when any server in the cloud receives a conversion instruction for converting a preset native cluster into an edge cluster, a first component and a second component are generated based on a preset edge cluster management component; the first component is used to modify the parameters of the native cluster interface in any server, and the second component is used to deploy a proxy component in any node in the native cluster; then the parameters of the native cluster interface are modified based on the first component to obtain a modified native cluster interface, and the second component is sent to each node in the native cluster, so that the second component deploys the proxy component in each node, and the cluster composed of the deployed nodes is used as an edge cluster, so that each node in the edge cluster interacts with the modified native cluster interface in any server through the proxy component. In this way, an edge cluster management component is deployed in any server in the cloud, and then a first component and a second component are generated based on the edge cluster management component. The first component modifies the parameters of the native cluster interface in the server, and restarts the modified native cluster interface. At the same time, the second component is sent to each node. Each node deploys a proxy component based on the second component, so that each node can interact with the modified native cluster interface in the server based on its own proxy component. The deployed nodes form an edge cluster, thereby realizing the automatic conversion from the native cluster to the edge cluster.
[0196] Moreover, based on the native cluster, there is no need to tailor the functions of the core components in the native cluster, nor is there any need to convert the cluster manually or through scripts. This not only ensures the compatibility of the native cluster and the resource occupancy rate of the nodes in the edge cluster, but also improves the flexibility, scalability and linkage of cluster conversion with Kubernetes.
[0197] Furthermore, after converting the native cluster to the edge cluster, the edge cluster can be converted back to the native cluster through recovery instructions, further improving the flexibility of the cluster.
[0198] Figure 7 A schematic diagram of a cluster processing device provided in another embodiment of the present application is shown in FIG. Figure 7 As shown, the device of this embodiment can be applied to any server in the cloud, and the device includes:
[0199] A receiving module 701, configured to receive a second component sent by the cloud;
[0200] A deployment module 702, configured to deploy the proxy component based on the second component;
[0201] And, call the proxy component to interact with the cloud for data.
[0202] In a preferred embodiment of the present invention, the second component includes a preset proxy component template;
[0203] The deployment modules include:
[0204] A writing submodule, used for writing the proxy component template into a preset storage address through the second component;
[0205] And, calling a preset container management component to obtain a proxy component template from a storage address, and initializing the proxy component template to obtain a proxy component.
[0206] In a preferred embodiment of the present invention, the deployment module further includes:
[0207] A health detection submodule, used for performing health detection on the proxy component through the second component;
[0208] The configuration file update submodule is used to write the address information of the proxy component into the configuration file of the container management component when the health check passes, so as to obtain an updated configuration file;
[0209] The second restart submodule is used to restart the container management component through the second component, so that the restarted container management component runs the updated configuration file.
[0210] In a preferred embodiment of the present invention, calling the proxy component to interact with the cloud for data includes:
[0211] After the restart, the container management component calls the proxy component to interact with the cloud for data.
[0212] In a preferred embodiment of the present invention, the second component runs in a preset container in any node, the container management component runs in any node, and the preset container and any node share the process identifier of any node;
[0213] The second restart submodule includes:
[0214] An acquisition unit, used for acquiring a corresponding preset process in any node based on a process identifier;
[0215] A process switching unit, which switches the process corresponding to the second component to a preset process through a preset process switching instruction;
[0216] The restart unit is used to restart the container management component in any node based on a preset process.
[0217] The cluster processing device of this embodiment can execute the cluster processing method shown in the second embodiment of the present application. The implementation principle is similar and will not be repeated here.
[0218] In an embodiment of the present invention, any node in the native cluster receives the second component sent by the cloud, and then the second component writes the proxy component template it contains to a preset storage address. The preset container management component detects the proxy component template and initializes it, thereby obtaining the proxy component. When the health check of the proxy component by the second component passes, the address information of the proxy component is written into the configuration file of the container management component to obtain an updated configuration file. Then, based on the process identifier shared by the container and the node and the preset process switching instruction, the second component restarts the container management component. The restarted container management component runs the updated configuration file, and the container management component can interact with the cloud through the proxy component. This solves the problem that the cloud cannot send binary files to the nodes in each edge cluster, and realizes the cloud-edge collaboration between the cloud and the edge cluster.
[0219] Furthermore, since the proxy component can cache data, when the node is disconnected from the cloud, the proxy component can cache the data sent by the container management component, and when the node is connected to the cloud again, the cached data can be sent to the cloud, thereby realizing the autonomy of each node in the edge cluster.
[0220] Furthermore, since the second component has the function of setting and starting the properties of the relevant components in the node and connecting the links, the nodes in the weak network can also achieve weak network component management through the second component.
[0221] In another embodiment of the present application, an electronic device is provided, which includes: a memory and a processor; at least one program, stored in the memory, for being executed by the processor, which can achieve, compared with the prior art: when any server in the cloud receives a conversion instruction for converting a preset native cluster into an edge cluster, a first component and a second component are generated based on a preset edge cluster management component; the first component is used to modify the parameters of the native cluster interface in any server, and the second component is used to deploy a proxy component in any node in the native cluster; then the parameters of the native cluster interface are modified based on the first component to obtain a modified native cluster interface, and the second component is sent to each node in the native cluster, so that the second component deploys the proxy component in each node, and the cluster composed of the deployed nodes is used as an edge cluster, so that each node in the edge cluster interacts with the modified native cluster interface in any server through the proxy component. In this way, an edge cluster management component is deployed in any server in the cloud, and then a first component and a second component are generated based on the edge cluster management component. The first component modifies the parameters of the native cluster interface in the server, and restarts the modified native cluster interface. At the same time, the second component is sent to each node. Each node deploys a proxy component based on the second component, so that each node can interact with the modified native cluster interface in the server based on its own proxy component. The deployed nodes form an edge cluster, thereby realizing the automatic conversion from the native cluster to the edge cluster.
[0222] Moreover, based on the native cluster, there is no need to tailor the functions of the core components in the native cluster, nor is there any need to convert the cluster manually or through scripts. This not only ensures the compatibility of the native cluster and the resource occupancy rate of the nodes in the edge cluster, but also improves the flexibility, scalability and linkage of cluster conversion with Kubernetes.
[0223] Furthermore, after converting the native cluster to the edge cluster, the edge cluster can be converted back to the native cluster through recovery instructions, further improving the flexibility of the cluster.
[0224] In an alternative embodiment, an electronic device is provided, such as Figure 8 As shown, Figure 8 The electronic device 8000 shown includes: a processor 8001 and a memory 8003. The processor 8001 and the memory 8003 are connected, such as through a bus 8002. Optionally, the electronic device 8000 may also include a transceiver 8004. It should be noted that in actual applications, the transceiver 8004 is not limited to one, and the structure of the electronic device 8000 does not constitute a limitation on the embodiments of the present application.
[0225] The processor 8001 may be a CPU, a general processor, a DSP, an ASIC, an FPGA or other programmable logic device, a transistor logic device, a hardware component or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. The processor 8001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0226] The bus 8002 may include a path to transmit information between the above components. The bus 8002 may be a PCI bus or an EISA bus, etc. The bus 8002 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0227] The memory 8003 can be a ROM or other type of static storage device that can store static information and instructions, a RAM or other type of dynamic storage device that can store information and instructions, or an EEPROM, CD-ROM or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to this.
[0228] The memory 8003 is used to store application code for executing the solution of the present application, and the execution is controlled by the processor 8001. The processor 8001 is used to execute the application code stored in the memory 8003 to implement the content shown in any of the above method embodiments.
[0229] Another embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer is run on a computer, the computer can execute the corresponding content in the aforementioned method embodiment. Compared with the prior art, when any server in the cloud receives a conversion instruction for converting a preset native cluster into an edge cluster, a first component and a second component are generated based on a preset edge cluster management component; the first component is used to modify the parameters of the native cluster interface in any server, and the second component is used to deploy an agent component in any node in the native cluster; then the parameters of the native cluster interface are modified based on the first component to obtain a modified native cluster interface, and the second component is sent to each node in the native cluster, so that the second component deploys the agent component in each node, and the cluster composed of the deployed nodes is used as an edge cluster, so that each node in the edge cluster interacts with the modified native cluster interface in any server through the agent component. In this way, an edge cluster management component is deployed in any server in the cloud, and then a first component and a second component are generated based on the edge cluster management component. The first component modifies the parameters of the native cluster interface in the server, and restarts the modified native cluster interface. At the same time, the second component is sent to each node. Each node deploys a proxy component based on the second component, so that each node can interact with the modified native cluster interface in the server based on its own proxy component. The deployed nodes form an edge cluster, thereby realizing the automatic conversion from the native cluster to the edge cluster.
[0230] Moreover, based on the native cluster, there is no need to tailor the functions of the core components in the native cluster, nor is there any need to convert the cluster manually or through scripts. This not only ensures the compatibility of the native cluster and the resource occupancy rate of the nodes in the edge cluster, but also improves the flexibility, scalability and linkage of cluster conversion with Kubernetes.
[0231] Furthermore, after converting the native cluster to the edge cluster, the edge cluster can be converted back to the native cluster through recovery instructions, further improving the flexibility of the cluster.
[0232] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0233] The above descriptions are only some embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
[0234] The embodiment of the present application provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that when the computer device executes the computer instructions, the following conditions are achieved:
[0235] Play the target video and determine whether the target video is an interactive video; if the target video is determined to be an interactive video, obtain the interactive content corresponding to the target video and the display time of the interactive content; when the target video is played to the display time, display the interactive display page corresponding to the interactive content; when the interactive message of the first user is obtained, display the corresponding interactive feedback page based on the interactive content and the interactive message.
Claims
1. A cluster processing method, It is characterized in that The method is applied to any server in the cloud, and the method includes: When receiving a conversion instruction for converting a preset native cluster into an edge cluster, generating a first component and a second component based on a preset edge cluster management component; the first component is used to modify the parameters of the native cluster interface in any server, and the second component is used to deploy a proxy component in any node in the native cluster; Based on the first component, the parameters of the native cluster interface are modified to obtain a modified native cluster interface, and the second component is sent to each node in the native cluster, so that the second component deploys the proxy component in each node, and the cluster composed of the deployed nodes is used as an edge cluster, so that each node in the edge cluster can exchange data with the modified native cluster interface in any server through the proxy component.
2. The cluster processing method according to claim 1, It is characterized in that The edge cluster management component includes at least two preset component templates, wherein the at least two preset component templates include a first component template corresponding to the first component and a second component template corresponding to the second component; The generating of the first component and the second component based on the preset edge cluster management component includes: Using the edge cluster management component to fill in the parameter values in the first component template and the parameter values in the second component template respectively, to obtain the filled first component template and the filled second component template; The filled first component template and the second component template are respectively initialized to obtain a first component and a second component.
3. The cluster processing method according to claim 1 or 2, It is characterized in that The first component includes preset interface parameters; The modifying the parameters of the native cluster interface based on the first component to obtain a modified native cluster interface includes: Using the preset interface parameters to update the parameters of the native cluster interface to obtain updated interface parameters; The native cluster interface is restarted based on the updated interface parameters, and when the restart is completed, a modified native cluster interface is obtained.
4. A cluster processing method, It is characterized in that The method is applied to any node in the native cluster, and the method includes: receiving a second component sent by any server in the cloud; deploying an agent component based on the second component; Interacting data with a modified native cluster interface of any server in the cloud through the proxy component; The modified native cluster interface is obtained by any server modifying the parameters of the native cluster interface based on the first component; The first component and the second component are determined by any server based on the following method: When receiving a conversion instruction for converting a preset native cluster into an edge cluster, generating a first component and a second component based on a preset edge cluster management component; the first component is used to modify the parameters of the native cluster interface in any server, and the second component is used to deploy a proxy component in any node in the native cluster; The second component is sent by any of the servers to each node in the native cluster, so that each node deploys the proxy component based on the second component, and each node in the native cluster is converted into the edge cluster when the second component is deployed.
5. The cluster processing method according to claim 4, It is characterized in that The second component includes a preset proxy component template; The deploying the proxy component based on the second component includes: Writing the proxy component template into a preset storage address through the second component; The proxy component template is obtained from the storage address through a preset container management component, and the proxy component template is initialized to obtain a proxy component.
6. The cluster processing method according to claim 5, It is characterized in that Also includes: Performing health check on the proxy component by using the second component; When the health check passes, writing the address information of the proxy component into the configuration file of the container management component to obtain an updated configuration file; The container management component is restarted by the second component, so that the restarted container management component runs the updated configuration file.
7. The cluster processing method according to claim 6, It is characterized in that The proxy component interacts with the modified native cluster interface of any server in the cloud through data, including: The restarted container management component exchanges data with the modified native cluster interface of any server in the cloud through the proxy component.
8. The cluster processing method according to claim 6, It is characterized in that The second component runs in a preset container in the any node, the container management component runs in the any node, and the preset container and the any node share the process identifier of the any node; The restarting the container management component by using the second component includes: Acquire a corresponding preset process in any of the nodes based on the process identifier; Switching the process corresponding to the second component to the preset process through a preset process switching instruction; The container management component is restarted in any one of the nodes based on the preset process.
9. A cluster processing device, It is characterized in that The device is applied to any server in the cloud, and the device includes: A first processing module, configured to generate a first component and a second component based on a preset edge cluster management component when receiving a conversion instruction for converting a preset native cluster into an edge cluster; the first component is configured to modify parameters of a native cluster interface in any server, and the second component is configured to deploy a proxy component in any node in the native cluster; The second processing module is used to modify the parameters of the native cluster interface based on the first component to obtain the modified native cluster interface, and send the second component to each node in the native cluster, so that the second component deploys the proxy component in each node, and uses the cluster composed of the deployed nodes as an edge cluster, so that each node in the edge cluster can exchange data with the modified native cluster interface in any server through the proxy component.
10. The cluster processing device according to claim 9, It is characterized in that The edge cluster management component includes at least two preset component templates, wherein the at least two preset component templates include a first component template corresponding to the first component and a second component template corresponding to the second component; When the first processing module generates the first component and the second component based on the preset edge cluster management component, it is specifically used to: Using the edge cluster management component to fill in the parameter values in the first component template and the parameter values in the second component template respectively, to obtain the filled first component template and the filled second component template; The filled first component template and the second component template are respectively initialized to obtain a first component and a second component.
11. The cluster processing device according to claim 9 or 10, It is characterized in that The first component includes preset interface parameters; When the second processing module modifies the parameters of the native cluster interface based on the first component to obtain the modified native cluster interface, it is specifically used to: Using the preset interface parameters to update the parameters of the native cluster interface to obtain updated interface parameters; The native cluster interface is restarted based on the updated interface parameters, and when the restart is completed, a modified native cluster interface is obtained.
12. A cluster processing device, It is characterized in that The device is applied to any node in a native cluster, and the device includes: A receiving module, used for receiving a second component sent by any server in the cloud; A deployment module, used for deploying an agent component based on the second component; and, calling the proxy component to perform data interaction with a modified native cluster interface of any server in the cloud; The modified native cluster interface is obtained by any server modifying the parameters of the native cluster interface based on the first component; The first component and the second component are determined by any server based on the following method: When receiving a conversion instruction for converting a preset native cluster into an edge cluster, generating a first component and a second component based on a preset edge cluster management component; the first component is used to modify the parameters of the native cluster interface in any server, and the second component is used to deploy a proxy component in any node in the native cluster; The second component is sent by any of the servers to each node in the native cluster, so that each node deploys the proxy component based on the second component, and each node in the native cluster is converted into the edge cluster when the second component is deployed.
13. The processing device of the cluster according to claim 12, wherein the second component comprises a preset proxy component template; When the deployment module deploys the proxy component based on the second component, the deployment module is specifically used to: Writing the proxy component template into a preset storage address through the second component; The proxy component template is obtained from the storage address through a preset container management component, and the proxy component template is initialized to obtain a proxy component.
14. The processing device of the cluster according to claim 13, wherein the deployment module comprises: A health detection submodule, used for performing health detection on the proxy component through the second component; A configuration file updating submodule, used for writing the address information of the proxy component into the configuration file of the container management component to obtain an updated configuration file when the health check passes; The second restart submodule is used to restart the container management component through the second component, so that the restarted container management component runs the updated configuration file.
15. The cluster processing device according to claim 14, It is characterized in that When the deployment module interacts with the modified native cluster interface of any server in the cloud through the proxy component, the deployment module is specifically used to: The restarted container management component exchanges data with the modified native cluster interface of any server in the cloud through the proxy component.
16. The cluster processing device according to claim 14, It is characterized in that The second component runs in a preset container in the any node, the container management component runs in the any node, and the preset container and the any node share the process identifier of the any node; When the second restart submodule restarts the container management component through the second component, the second restart submodule is specifically used to: Acquire a corresponding preset process in any of the nodes based on the process identifier; Switching the process corresponding to the second component to the preset process through a preset process switching instruction; The container management component is restarted in any one of the nodes based on the preset process.
17. An electronic device, It is characterized in that It includes: processor, memory, and bus; The bus is used to connect the processor and the memory; The memory is used to store operation instructions; The processor is used to execute the cluster processing method described in any one of claims 1 to 8 by calling the operation instruction.
18. A computer-readable storage medium, It is characterized in that The computer storage medium is used to store computer instructions, and when the computer storage medium is run on a computer, the computer can execute the cluster processing method described in any one of claims 1 to 8.
