Ingress component management method, device and storage medium

By deploying a management controller outside the cluster, acquiring sharded resources, and creating Ingress component running nodes and controllers, the inconsistency caused by reliance on manual cluster management is resolved, and automated unified management of the Ingress component is achieved.

CN117472575BActive Publication Date: 2026-11-20CHINA MERCHANTS BANK
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311466796.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-03
Publication Date
2026-11-20
Estimated Expiration
2043-11-03

AI Technical Summary

Technical Problem

When managing Ingress components in a cluster, existing technologies rely on the professional skills of administrators, resulting in numerous management tasks and inconsistent rules across different clusters, leading to low management uniformity.

Method used

By deploying a management controller outside the cluster, sharded resources are obtained, Ingress component running nodes are created according to the cluster node configuration, and Ingress controllers and resources are built to achieve resource scheduling, so as to uniformly manage Ingress components of multiple clusters.

Benefits of technology

It enables automatic generation and configuration of Ingress components, and manages all clusters according to the same standard, which improves the uniformity of management and reduces the dependence on administrators.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117472575B_ABST
    Figure CN117472575B_ABST
Patent Text Reader

Abstract

The application discloses an Ingress component management method and device and a storage medium, and relates to the technical field of Ingress component management. The method comprises the following steps: acquiring sharding resources deployed in each cluster; creating corresponding Ingress component running nodes in each cluster respectively according to the node configurations of each cluster, wherein the node configurations of each cluster are obtained by a management controller based on the sharding resources of each cluster; constructing corresponding Ingress controllers of each cluster respectively, constructing corresponding Ingress resources of each cluster respectively, and sending the Ingress resources corresponding to each Ingress controller and the Ingress component running nodes obtained by construction to each Ingress controller correspondingly. The application realizes an Ingress component management scheme through a management controller and an Ingress controller deployed outside a cluster, so that unified management of multiple clusters is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to an Ingress component management method, device, and storage medium. Background Technology

[0002] Currently, managing (creating or modifying) Ingress components in a cluster requires administrators to deploy Ingress controllers within the cluster and manage those controllers. This process relies on the administrators' expertise, and with multiple clusters, the management tasks are numerous, potentially leading to inconsistent rules across different clusters. Consequently, the uniformity of Ingress component management is low. Summary of the Invention

[0003] The main objective of this invention is to provide an Ingress component management method, device, and storage medium. It aims to provide a solution for managing Ingress components by creating an Ingress controller, corresponding Ingress resources, and Ingress component running nodes through an externally deployed management controller, thereby achieving unified management of multiple clusters.

[0004] To achieve the above objectives, this invention provides an Ingress component management method, applied to management controllers deployed outside of various clusters. The Ingress component management method includes the following steps:

[0005] Obtain the sharded resources deployed in each of the aforementioned clusters;

[0006] Based on the node configuration of each cluster, corresponding Ingress component running nodes are created in each cluster, wherein the node configuration of each cluster is obtained by the management controller based on the sharding resource configuration of each cluster;

[0007] Each cluster is constructed with its own Ingress controller and Ingress resources. The Ingress resources and Ingress component running nodes corresponding to each Ingress controller are then sent to each Ingress controller so that the Ingress controller can schedule resources according to the received Ingress resources and Ingress component running nodes to manage the Ingress components.

[0008] Optionally, before the step of obtaining the sharded resources deployed in each of the clusters, the method further includes:

[0009] Acquire at least one shard group resource;

[0010] Based on the allocation strategy and deployment method corresponding to each shard group resource, the shard resources corresponding to each shard resource group are deployed to the corresponding cluster.

[0011] Optionally, the step of deploying the shard resources corresponding to each shard resource group to the corresponding cluster according to the allocation strategy and deployment method corresponding to each shard group resource includes:

[0012] Obtain the allocation strategy, wherein the allocation strategy includes a one-to-one correspondence between the resources of each shard group and each cluster;

[0013] According to the allocation strategy, a corresponding cluster is allocated to each of the sharding groups, and sharding resources corresponding to each of the sharding groups are constructed respectively.

[0014] Based on the attributes of each cluster, determine the deployment method corresponding to each shard resource;

[0015] Based on the deployment method corresponding to each of the sharded resources, each of the sharded resources is deployed to its respective cluster.

[0016] Optionally, before the step of creating corresponding Ingress component running nodes in each of the clusters according to their respective node configurations, the method further includes:

[0017] Based on the attributes and sharding resources of each cluster, select the cluster configuration corresponding to each cluster, wherein the cluster configuration includes at least one of node configuration, load balancing configuration and Ingress controller configuration.

[0018] Optionally, the step of constructing the Ingress controller corresponding to each of the clusters includes:

[0019] Based on the Ingress controller configuration corresponding to each cluster, the Ingress controller corresponding to each cluster is rendered in each cluster.

[0020] Optionally, the fragment group resource is a non-namespace resource, and the fragment resource is a namespace resource.

[0021] To achieve the above objectives, the present invention also provides an Ingress component management method, applied to an Ingress controller corresponding to any target cluster, wherein the Ingress controller corresponding to the target cluster is constructed from a management controller deployed outside each of the clusters, and the Ingress component management method includes the following steps:

[0022] The system receives Ingress resources and Ingress component running nodes sent by the management controller, wherein the Ingress resources are constructed by the management controller, the Ingress component running nodes are created by the management controller according to the node configuration of the target cluster, and the node configuration of the target cluster is obtained by the management controller based on the sharding resource configuration of the target cluster.

[0023] Resource scheduling is performed based on the Ingress resources and the running nodes of the Ingress components to achieve the management of the Ingress components.

[0024] Optionally, the step of resource scheduling based on the Ingress resource and the Ingress component running node includes:

[0025] Based on the Ingress resources, construct runtime resources, wherein the runtime resources include at least one of deployment resources, service resources, and service management resources;

[0026] The runtime resources are scheduled to the Ingress component runtime node.

[0027] To achieve the above objectives, the present invention also provides a management controller, which is deployed outside each cluster, and the management controller includes:

[0028] The acquisition module is used to acquire the sharded resources deployed in each of the aforementioned clusters;

[0029] A creation module is used to create corresponding Ingress component running nodes in each of the clusters according to their respective node configurations, wherein the node configurations of each cluster are obtained by the management controller based on the sharding resource configurations of each cluster.

[0030] The sending module is used to construct the Ingress controller corresponding to each of the clusters, and to construct the Ingress resources corresponding to each of the clusters. The module then sends the Ingress resources and Ingress component running nodes corresponding to each Ingress controller to each Ingress controller, so that the Ingress controller can perform resource scheduling based on the received Ingress resources and Ingress component running nodes to achieve the management of the Ingress components.

[0031] To achieve the above objectives, the present invention also provides an Ingress controller, which corresponds to any target cluster. The Ingress controller corresponding to the target cluster is constructed from a management controller deployed outside each of the clusters. The Ingress controller includes:

[0032] The receiving module is used to receive Ingress resources and Ingress component running nodes sent by the management controller, wherein the Ingress resources are constructed by the management controller, the Ingress component running nodes are created by the management controller according to the node configuration of the target cluster, and the node configuration of the target cluster is obtained by the management controller based on the sharding resource configuration of the target cluster;

[0033] The scheduling module is used to schedule resources based on the Ingress resources and the running nodes of the Ingress components, so as to realize the management of the Ingress components.

[0034] To achieve the above objectives, the present invention also provides an Ingress component management device, the Ingress component management device comprising: a memory, a processor, and an Ingress component management program stored in the memory and executable on the processor, wherein the Ingress component management program, when executed by the processor, implements the steps of the Ingress component management method as described above.

[0035] Furthermore, to achieve the above objectives, the present invention also proposes a computer-readable storage medium storing an Ingress component management program, which, when executed by a processor, implements the steps of the Ingress component management method as described above.

[0036] In this invention, a management controller deployed outside each cluster acquires the sharded resources deployed in each cluster; based on the node configuration of each cluster, it creates corresponding Ingress component running nodes in each cluster, wherein the node configuration of each cluster is obtained by the management controller based on the sharded resource configuration of each cluster; it constructs Ingress controllers and Ingress resources corresponding to each cluster, and sends the constructed Ingress resources and Ingress component running nodes corresponding to each Ingress controller to each Ingress controller, so that the Ingress controller can perform resource scheduling according to the received Ingress resources and Ingress component running nodes to realize the management of Ingress components. This invention realizes the automatic generation of Ingress controllers and the automatic configuration of Ingress resources and Ingress component running nodes. The Ingress components of each cluster are managed based on the Ingress resources and Ingress component running nodes sent to the Ingress controller, eliminating the need for administrators to manage the Ingress components of each cluster individually. This allows the management tasks of each cluster to be managed uniformly according to the same standard, thereby improving the uniformity of Ingress component management.

[0037] In this invention, an Ingress controller is applied to any target cluster. This Ingress controller is constructed by a management controller deployed outside each cluster. It receives Ingress resources and Ingress component running nodes from the management controller. The Ingress resources are constructed by the management controller, and the Ingress component running nodes are created by the management controller based on the node configuration of the target cluster. The node configuration of the target cluster is obtained by the management controller based on the sharded resources of the target cluster. Resource scheduling is performed based on the Ingress resources and Ingress component running nodes to manage the Ingress components. Since the management is based on the Ingress resources and Ingress component running nodes issued by the management controller, there is no need for administrators to manage the Ingress components of each cluster individually. This allows for unified management of the management tasks of each cluster using the same standard, thereby improving the uniformity of Ingress component management. Attached Figure Description

[0038] Figure 1 This is a schematic diagram of the hardware operating environment involved in the embodiments of the present invention;

[0039] Figure 2This is a flowchart illustrating the first embodiment of the Ingress component management method of the present invention;

[0040] Figure 3 This is a flowchart illustrating the management controller according to an embodiment of the present invention in a processing scenario;

[0041] Figure 4 This is a schematic diagram of a fragmented resource according to an embodiment of the present invention;

[0042] Figure 5 This is a schematic diagram of a fragmented group resource according to an embodiment of the present invention;

[0043] Figure 6 This is a schematic diagram of a structure of an Ingress configuration template according to an embodiment of the present invention;

[0044] Figure 7 This is a schematic diagram of the structure of an Ingress resource according to an embodiment of the present invention;

[0045] Figure 8 This is a flowchart illustrating the segmentation controller in the management controller according to an embodiment of the present invention in a processing scenario.

[0046] Figure 9 This is a flowchart illustrating the second embodiment of the Ingress component management method of the present invention;

[0047] Figure 10 This is a schematic diagram of a device structure for a management controller according to an embodiment of the present invention;

[0048] Figure 11 This is a schematic diagram of the device structure of an Ingress controller according to an embodiment of the present invention.

[0049] The objectives, features, and advantages of this invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0050] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0051] like Figure 1 As shown, Figure 1 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiments of the present invention.

[0052] It should be noted that the Ingress component management device in this embodiment of the invention can be a smartphone, personal computer, server, or other device, and no specific limitation is made here.

[0053] like Figure 1As shown, the Ingress component management device may include: a processor 1001, such as a CPU; a network interface 1004; a user interface 1003; a memory 1005; and a communication bus 1002. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen or an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed RAM or non-volatile memory, such as a disk drive. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0054] Those skilled in the art will understand that Figure 1 The device structure shown does not constitute a limitation on the Ingress component management device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0055] like Figure 1 As shown, the memory 1005, as a computer storage medium, may include an operating system, a network communication module, a user interface module, and an Ingress component management program. The operating system is a program that manages and controls the device's hardware and software resources, supporting the operation of the Ingress component management program and other software or programs. Figure 1 In the device shown, the user interface 1003 is mainly used for data communication with the client; the network interface 1004 is mainly used for establishing a communication connection with the server; and the processor 1001 can be used to call the Ingress component management program stored in the memory 1005 and perform the following operations:

[0056] Obtain the sharded resources deployed in each of the aforementioned clusters;

[0057] Based on the node configuration of each cluster, corresponding Ingress component running nodes are created in each cluster, wherein the node configuration of each cluster is obtained by the management controller based on the sharding resource configuration of each cluster;

[0058] Each cluster is constructed with its own Ingress controller and Ingress resources. The Ingress resources and Ingress component running nodes corresponding to each Ingress controller are then sent to each Ingress controller so that the Ingress controller can schedule resources according to the received Ingress resources and Ingress component running nodes to manage the Ingress components.

[0059] Furthermore, prior to the operation of acquiring the shard resources deployed in each of the clusters, the processor 1001 can also be used to call the Ingress component management program stored in the memory 1005 to perform the following operations:

[0060] Acquire at least one shard group resource;

[0061] Based on the allocation strategy and deployment method corresponding to each shard group resource, the shard resources corresponding to each shard resource group are deployed to the corresponding cluster.

[0062] Furthermore, the operation of deploying the shard resources corresponding to each shard resource group to the corresponding cluster according to the allocation strategy and deployment method of each shard group resource includes:

[0063] Obtain the allocation strategy, wherein the allocation strategy includes a one-to-one correspondence between the resources of each shard group and each cluster;

[0064] According to the allocation strategy, a corresponding cluster is allocated to each of the shard groups, and shard resources corresponding to each of the shard groups are constructed respectively.

[0065] Based on the attributes of each cluster, determine the deployment method corresponding to each shard resource;

[0066] Based on the deployment method corresponding to each of the sharded resources, each of the sharded resources is deployed to its respective cluster.

[0067] Furthermore, before the operation of creating corresponding Ingress component running nodes in each of the clusters according to their respective node configurations, the processor 1001 can also call the Ingress component management program stored in the memory 1005 to perform the following operations:

[0068] Based on the attributes and sharding resources of each cluster, select the cluster configuration corresponding to each cluster, wherein the cluster configuration includes at least one of node configuration, load balancing configuration and Ingress controller configuration.

[0069] Furthermore, the operation of constructing the Ingress controller corresponding to each of the clusters includes:

[0070] Based on the Ingress controller configuration corresponding to each cluster, the Ingress controller corresponding to each cluster is rendered in each cluster.

[0071] Alternatively, user interface 1003 is primarily used for data communication with the client; network interface 1004 is primarily used for establishing communication connections with the server; and processor 1001 can be used to call the Ingress component management program stored in memory 1005 and perform the following operations:

[0072] The system receives Ingress resources and Ingress component running nodes sent by the management controller, wherein the Ingress resources are constructed by the management controller, the Ingress component running nodes are created by the management controller according to the node configuration of the target cluster, and the node configuration of the target cluster is obtained by the management controller based on the sharding resource configuration of the target cluster.

[0073] Resource scheduling is performed based on the Ingress resources and the running nodes of the Ingress components to achieve the management of the Ingress components.

[0074] Furthermore, the operation of resource scheduling based on the Ingress resources and the Ingress component running node includes:

[0075] Based on the Ingress resources, construct runtime resources, wherein the runtime resources include at least one of deployment resources, service resources, and service management resources;

[0076] The runtime resources are scheduled to the Ingress component runtime node.

[0077] Based on the above structure, various embodiments of the Ingress component management method are proposed.

[0078] Reference Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the Ingress component management method of the present invention.

[0079] This invention provides an embodiment of an Ingress component management method. It should be noted that although the flowchart shows a logical order, in some cases, the steps shown or described may be executed in a different order. In this embodiment, the execution entity of the Ingress component management method is a management controller deployed outside each cluster. The management controller can be a personal computer, smartphone, server, or other device.

[0080] Reference Figure 3 The management controller acquires shard group resources, deploys the shard resources to various clusters based on the shard group resources, and selects the corresponding node configuration, load balancing configuration, and Ingress configuration for each cluster. It then constructs an Ingress controller for each cluster and corresponding Ingress resources for each cluster. The Ingress controller performs resource scheduling for the Ingress component based on the Ingress resources.

[0081] This embodiment is not limited, and for ease of description, the execution subject is omitted from the description of each embodiment. In this embodiment, the Ingress component management method includes:

[0082] Step S10: Obtain the sharded resources deployed in each of the clusters;

[0083] Optionally, the sharded resource is a namespaced resource, that is, the name of the sharded resource can be set to the cluster in which it resides.

[0084] Since there is a one-to-one correspondence between sharded resources and clusters, this setting makes it easy to view the cluster name corresponding to the sharded resources, and facilitates the management controller to configure the node configuration of each cluster based on the sharded resources.

[0085] In step S10, prior to the step of obtaining the shard resources deployed in each of the clusters, the method further includes:

[0086] Step S01: Obtain at least one shard group resource;

[0087] In this embodiment, it should be noted that the shard group resource can provide a Manage Policy field to specify the deployment strategy of the shard CR, such as parallel or sequential ready. The shard group resource can also provide a StrategyType field to specify the update strategy, such as rolling update or update on deletion.

[0088] For example, retrieve the shard group resources created by the user.

[0089] Optionally, the fragment group resources are non-namespace resources.

[0090] Since the shard group resources are created by the user and do not have a corresponding relationship with the cluster or anything else, there is no need to check the name of the shard group resources.

[0091] Step S02: For each shard group resource, according to the allocation strategy and deployment method corresponding to the shard group resource, deploy the shard resources within the shard group resource to the cluster corresponding to the shard group resource.

[0092] For example, the allocation strategy and deployment method corresponding to each of the shard group resources are obtained. For each shard group resource, the shard resources in the shard group resource are deployed to the cluster corresponding to the shard group resource according to the allocation strategy and deployment method corresponding to the shard group resource.

[0093] Optionally, the management controller includes a shard group controller and a shard controller. The shard group controller stores allocation policies. The allocation policies corresponding to each shard group resource are obtained from the shard group controller. The deployment methods corresponding to each shard group resource are obtained. The shard controller deploys the shard resources corresponding to each shard resource group to the corresponding cluster according to the allocation policies and deployment methods corresponding to each shard group resource.

[0094] Optionally, in a feasible embodiment, for each shard group resource, the shard resources within the shard group resource are deployed to the cluster corresponding to the shard group resource according to the allocation strategy and deployment method corresponding to the shard group resource.

[0095] In step S02, the step of deploying the shard resources corresponding to each shard resource group to the corresponding cluster according to the allocation strategy and deployment method of each shard group resource includes:

[0096] Step S021, obtain the allocation strategy, wherein the allocation strategy includes a one-to-one correspondence between the resources of each shard group and each cluster;

[0097] In this embodiment, it should be noted that the allocation strategy can be set by the user as needed, or it can be generated by the shard group controller in the management controller.

[0098] Optionally, in one feasible embodiment, the allocation strategy configured by the user is obtained.

[0099] Alternatively, in another feasible embodiment, the allocation strategy is obtained from the shard group controller in the management controller.

[0100] Step S022: According to the allocation strategy, allocate corresponding clusters to each of the sharding groups and construct sharding resources corresponding to each of the sharding groups respectively;

[0101] Optionally, in a feasible embodiment, the sharding controller in the management controller allocates corresponding clusters to each of the sharding groups according to the allocation strategy, and constructs sharding resources corresponding to each of the sharding groups respectively.

[0102] Step S023: Determine the deployment method corresponding to each shard resource based on the attributes of each cluster;

[0103] Optionally, in one feasible embodiment, the sharding controller in the management controller determines the deployment method corresponding to each sharding resource based on the attributes of each cluster.

[0104] Step S024: Deploy each of the shard resources to its corresponding cluster according to the deployment method corresponding to each shard resource.

[0105] Optionally, in a feasible embodiment, the sharding controller in the management controller deploys each sharding resource to its corresponding cluster according to the deployment method corresponding to each sharding resource.

[0106] Step S20: Based on the node configuration of each cluster, create corresponding Ingress component running nodes in each cluster, wherein the node configuration of each cluster is obtained by the management controller based on the sharding resource configuration of each cluster.

[0107] Optionally, in one feasible embodiment, the sharding controller in the management controller creates corresponding Ingress component running nodes in each of the clusters according to the node configuration of each cluster.

[0108] In step S20, before the step of creating corresponding Ingress component running nodes in each of the clusters according to their respective node configurations, the method further includes:

[0109] Step S11: Select the cluster configuration corresponding to each cluster according to the attributes and shard resources of each cluster, wherein the cluster configuration includes at least one of node configuration, load balancing configuration and Ingress controller configuration.

[0110] Optionally, in a feasible embodiment, if the cluster configuration includes node configuration, the infrastructure configuration template is obtained by the sharding controller in the management controller based on the Infrastructure field, wherein the infrastructure configuration template includes a node configuration template, and the node configuration corresponding to each cluster is selected according to the node configuration template, the attributes of each cluster and the sharding resources.

[0111] Optionally, in another feasible embodiment, if the cluster configuration includes a load balancing configuration, the sharding controller in the management controller obtains the infrastructure configuration template based on the Infrastructure field, wherein the infrastructure configuration template includes a load balancing configuration template, and the load balancing configuration corresponding to each cluster is selected according to the load balancing configuration template, the attributes of each cluster, and the sharding resources.

[0112] Optionally, in another feasible embodiment, if the cluster configuration includes an Ingress controller configuration, an infrastructure configuration template is obtained through the shard controller in the management controller, wherein the infrastructure configuration template includes an Ingress controller configuration template, and the Ingress controller configuration corresponding to each cluster is selected according to the Ingress controller configuration template, the attributes of each cluster, and the shard resources.

[0113] Step S30: Construct Ingress controllers for each cluster and Ingress resources for each cluster. Send the Ingress resources and Ingress component running nodes for each Ingress controller to each Ingress controller so that the Ingress controllers can schedule resources according to the received Ingress resources and Ingress component running nodes to manage the Ingress components.

[0114] Optionally, in one feasible embodiment, the shard controller in the management controller obtains the resource configuration template based on the Config field, and renders the Ingress resources corresponding to each Ingress controller based on the resource configuration template and the attributes of each cluster.

[0115] Optionally, an Ingress component is created, wherein the Ingress component includes at least one of a log collection component, a fault management and self-healing component, and a health status monitoring component.

[0116] Optionally, a TLS (Transport Layer Security) certificate is applied for, and the TLS certificate is encapsulated and distributed to each of the clusters.

[0117] Optionally, the IP (Internet Protocol) address of the load balancer corresponding to the load balancing configuration is registered to the domain name service system, and the Ingress resource is registered to the application management platform.

[0118] Optionally, refer to Figure 4 The sharded resources include sharding specification information and sharding status information. The sharding specification information includes at least one of the following: cluster name, number of Ingress component instance replicas, route selector based on route label, route selector based on namespace, infrastructure configuration template, load balancer configuration template, Ingress component configuration template, Ingress component configuration canary template, and Ingress component default certificate. The Ingress component configuration canary template is used for scenarios involving Ingress component canary updates and scenarios where multiple technology stack Ingress components coexist. The Ingress component default certificate can be configured with multiple certificates. The sharding status information includes the status; the status is used to display the processing results of each stage. If an anomaly occurs, the anomaly information is recorded in the corresponding status to assist in operation and maintenance troubleshooting. The states include: type, observation generation, stage, number of Ingress controller instances in the ready state, and number of Ingress controller instances in the ready state with updated configuration. The design and meaning of the type field are as follows: Ready: This field is set to True when all other types are True; otherwise, it is set to False and records the most recent error message for that type. Observation generation includes the generation in which the Ingress Shard controller has acquired the custom resource. The stage is generally the Ingress Shard resource state, including Ready, Failed, Pending, and Unknown.

[0119] Optionally, refer to Figure 5The shard group resources include shard group specification information and shard group status information. The shard group specification information includes cluster name, Ingress configuration, Ingress canary configuration, template, management permission, policy, minimum number of seconds that should be ready without any of its containers crashing, processing deadline, and pause. The cluster name is used to create a namespace in the Kubernetes Meta (an open-source application for managing containerized applications on multiple hosts in a cloud platform) cluster. This namespace manages all Custom Resources (CRs) of the corresponding cluster. The Ingress configuration is used to create an Ingress load balancer component in the business cluster. The Ingress canary configuration is used to configure canary updates and ensure stable cluster operation. The template is used to create templates for Ingress Shard CR resources. The management license includes a management policy, which specifies the strategy for the Ingress Shard Group Controller to process Ingress Shard resources. The policy takes the values ​​Ordered Ready or Parallel. Ordered Ready means that the Controller will create and update Ingress Shard resources one by one, and will only process the next Ingress Shard resource after the current Ingress Shard resource is in the Ready state. The policy includes a strategy for updating Ingress Shard resources, which includes rolling updates and / or updates during deletion. The minimum number of seconds required for an Ingress Shard CR resource to be ready without any of its containers crashing is defined as the minimum number of Min Ready Seconds required after creation to be considered ready and usable. If an Ingress Shard resource is not ready after the processing deadline, the Ingress Shard processing is considered failed, and its status must be set to Failed. When the pause is set to True, it indicates that the Ingress Shard Group resource will not enter the controller's coordination process. The shard group status information includes: status, observation generation, revision, ready shard, updated shard, and shard.The status is used to record the status of Ingress Shard resources. The Type field is designed as follows: Ready indicates that multiple clusters' Ingress Shard resources have been created and are in the Ready state; conversely, the Ready field records Ingress Shards that are not yet Ready and the reasons for this, for troubleshooting purposes. The observation generation includes the generation number of the custom resource obtained by the Ingress Shard Group controller. The revision includes information on the Ingress component configuration revision version, used to record configuration information and configuration changes, and can be used to query the differences between the current version and the previous revision version for configuration tracking and rollback. The ready shard is the name of the Ingress Shard resource in the Ready state; the shard is the name of the Ingress Shard resource in the Available state; and the updated shard is the name of the Ingress Shard resource that has been updated.

[0120] In step S30, the step of constructing the Ingress controller corresponding to each of the clusters includes:

[0121] Step S31: Based on the Ingress controller configuration corresponding to each cluster, render the Ingress controller corresponding to each cluster in each cluster.

[0122] Optionally, a deployment check is performed on the Ingress component.

[0123] Optionally, refer to Figure 6 The Ingress configuration template includes a default domain, namespace, controller namespace, Ingress model, controller type, and description. The default domain is the default subdomain of the Ingress component. The namespace is the namespace where the Ingress component is installed in each cluster. The controller namespace is the namespace where the Ingress controller Operator resides in each cluster. The Ingress model includes Ingress, Route, Gateway API (Application Programming Interface), and custom CRs. The controller type includes, but is not limited to, Nginx, HAProxy, OpenShift-router, Envoy, and Traefik. The description is a detailed description and explanation of this Ingress configuration.

[0124] Optionally, refer to Figure 7The Ingress resources include Ingress specification information and Ingress status information. The Ingress specification information includes domain name, proxy name, replicas, namespace selector, Ingress selector, image, node configuration, and optimization items. The domain name is the default domain name of the Ingress controller. The proxy name is the proxy type used to create the Ingress controller Deployment; possible values ​​include Nginx, Haproxy, Envoy, Traefik, etc. The replicas are the number of replicas specified when creating the Ingress controller Deployment. The namespace selector is one of the bases for Ingress sharding; all Ingresses under the selected namespace are managed by this Ingress controller. The Ingress selector is a commonly used Ingress sharding base; Ingresses that meet specific label requirements are managed by this Ingress controller. The image is an image of the Ingress Controller Deployment. The node configuration includes a node selector and taint tolerance configuration. The optimization items include parameters passed to the Ingress Controller Deployment, which can meet the needs of customizing the Ingress Controller. The Ingress status information includes Ingress controller instance data, status, and observation generation that are in an available state. The status displays the processing results of each stage. If an anomaly occurs, the anomaly information is recorded in the corresponding status to assist in troubleshooting. Specifically, "Ready" indicates that this field is set to True when all other Types are True; otherwise, it is set to False, and the most recent error message for that type is recorded. The main recorded status includes data verification permission. The observation generation is the generation number of the custom resource obtained by the Ingress controller Operator.

[0125] Optionally, refer to Figure 8 The sharding controller in the management controller obtains sharding resources, node configurations, load balancing configurations, and Ingress configurations, thereby enabling the construction of Ingress controllers, Ingress resources, and Ingress components, and coordinating and managing these components. It also registers sharding information with external systems, including domain name service systems and application management platforms.

[0126] In this invention, a management controller deployed outside each cluster acquires the sharded resources deployed in each cluster. Based on the node configuration of each cluster, corresponding Ingress component running nodes are created in each cluster, wherein the node configuration of each cluster is obtained by the management controller based on the sharded resource configuration of each cluster. Ingress controllers and Ingress resources corresponding to each cluster are constructed, and the constructed Ingress resources and Ingress component running nodes corresponding to each Ingress controller are sent to the respective Ingress controllers. The Ingress controllers then perform resource scheduling based on the received Ingress resources and Ingress component running nodes to achieve Ingress component management. This invention achieves automatic generation of Ingress controllers and automatic configuration of Ingress resources and Ingress component running nodes. Since the Ingress components of each cluster are managed based on the Ingress resources and Ingress component running nodes issued by the management controller to the Ingress controller, there is no need for administrators to manage the Ingress components of each cluster individually. This allows for unified management of the management tasks of each cluster using the same standard, thereby improving the uniformity of Ingress component management.

[0127] Furthermore, based on the first embodiment described above, a second embodiment of the Ingress component management method of the present invention is proposed. In this embodiment, the executing entity of the Ingress component management method is the Ingress controller corresponding to any target cluster. The Ingress controller can be a personal computer, smartphone, server, or other device, and is not limited in this embodiment. For ease of description, the executing entity is omitted in the following description of each embodiment. (Refer to...) Figure 9 The Ingress controller corresponding to the target cluster is constructed by a management controller deployed outside each cluster, and the Ingress component management method includes:

[0128] Step A10: Receive Ingress resources and Ingress component running nodes sent by the management controller, wherein the Ingress resources are constructed by the management controller, the Ingress component running nodes are created by the management controller according to the node configuration of the target cluster, and the node configuration of the target cluster is obtained by the management controller based on the sharding resource configuration of the target cluster;

[0129] Optionally, the management controller acquires at least one shard group resource; for each shard group resource, according to the allocation strategy and deployment method corresponding to the shard group resource, the shard resources within the shard group resource are deployed to the cluster corresponding to the shard group resource, thereby acquiring the shard resources deployed in each of the clusters; according to the attributes and shard resources of each cluster, the cluster configuration corresponding to each cluster is selected respectively, thereby creating corresponding Ingress component running nodes in each cluster according to the node configuration of each cluster, wherein the node configuration of each cluster is obtained by the management controller based on the shard resource configuration of each cluster.

[0130] Optionally, the management controller obtains an allocation strategy, wherein the allocation strategy includes a one-to-one correspondence between each shard group resource and each cluster; according to the allocation strategy, it allocates corresponding clusters to each shard group resource and constructs shard resources corresponding to each shard group resource; according to the attributes of each cluster, it determines the deployment method corresponding to each shard resource; according to the deployment method corresponding to each shard resource, it deploys each shard resource to its corresponding cluster. Step A20: resource scheduling is performed based on the Ingress resources and the Ingress component running nodes to achieve Ingress component management.

[0131] In step A20, the step of resource scheduling based on the Ingress resource and the Ingress component running node includes:

[0132] Step A21: Based on the Ingress resource, construct the runtime resource, wherein the runtime resource includes at least one of deployment resource, service resource, and service management resource;

[0133] Optionally, in one feasible embodiment, the Ingress controller extracts deployment resources, service resources, and / or service management resources from the Ingress resources.

[0134] Step A22: Schedule the running resources to the running node of the Ingress component.

[0135] Optionally, the Ingress component running node can be used as a scheduling environment to schedule the running resources.

[0136] In this invention, an Ingress controller is applied to any target cluster. This Ingress controller is constructed by a management controller deployed outside each cluster. It receives Ingress resources and Ingress component running nodes from the management controller. The Ingress resources are constructed by the management controller, and the Ingress component running nodes are created by the management controller based on the node configuration of the target cluster. The node configuration of the target cluster is obtained by the management controller based on the sharded resources of the target cluster. Resource scheduling is performed based on the Ingress resources and Ingress component running nodes to manage the Ingress components. Since the management is based on the Ingress resources and Ingress component running nodes issued by the management controller, there is no need for administrators to manage the Ingress components of each cluster individually. This allows for unified management of the management tasks of each cluster using the same standard, thereby improving the uniformity of Ingress component management.

[0137] Furthermore, embodiments of the present invention also propose a management controller, referring to... Figure 10 The management controller is deployed outside each cluster, and the management controller includes:

[0138] Acquisition module 10 is used to acquire shard resources deployed in each of the clusters.

[0139] The creation module 20 is used to create corresponding Ingress component running nodes in each of the clusters according to their respective node configurations, wherein the node configurations of each cluster are obtained by the management controller based on the sharding resource configurations of each cluster.

[0140] The sending module 30 is used to construct the Ingress controller corresponding to each of the clusters, and to construct the Ingress resources corresponding to each of the clusters, and to send the Ingress resources and Ingress component running nodes corresponding to each Ingress controller to each Ingress controller, so that the Ingress controller can perform resource scheduling according to the Ingress resources and Ingress component running nodes received by each controller, so as to realize the management of the Ingress component.

[0141] Furthermore, prior to the step of acquiring the sharded resources deployed in each of the clusters, the management controller further includes:

[0142] Acquire at least one shard group resource;

[0143] For each shard group resource, according to the allocation strategy and deployment method corresponding to the shard group resource, the shard resources within the shard group resource are deployed to the cluster corresponding to the shard group resource.

[0144] Furthermore, the management controller also includes:

[0145] Obtain the allocation strategy, wherein the allocation strategy includes a one-to-one correspondence between the resources of each shard group and each cluster;

[0146] According to the allocation strategy, a corresponding cluster is allocated to each of the shard groups, and shard resources corresponding to each of the shard groups are constructed respectively.

[0147] Based on the attributes of each cluster, determine the deployment method corresponding to each shard resource;

[0148] Based on the deployment method corresponding to each of the sharded resources, each of the sharded resources is deployed to its respective cluster.

[0149] Furthermore, before the step of creating corresponding Ingress component running nodes in each of the clusters according to their respective node configurations, the management controller further includes:

[0150] Based on the attributes and sharding resources of each cluster, select the cluster configuration corresponding to each cluster, wherein the cluster configuration includes at least one of node configuration, load balancing configuration and Ingress controller configuration.

[0151] Furthermore, the management controller also includes:

[0152] Based on the Ingress controller configuration corresponding to each cluster, the Ingress controller corresponding to each cluster is rendered in each cluster.

[0153] Furthermore, the fragment group resources are non-namespace resources, while the fragment resources are namespace resources.

[0154] All embodiments of the management controller of this invention can refer to the various embodiments of the Ingress component management method of this invention, which will not be repeated here.

[0155] Furthermore, this embodiment of the invention also proposes an Ingress controller, which corresponds to any target cluster. The Ingress controller corresponding to the target cluster is constructed by a management controller deployed outside each of the clusters, as described above. Figure 11 The management controller includes:

[0156] The receiving module 40 is used to receive Ingress resources and Ingress component running nodes sent by the management controller, wherein the Ingress resources are constructed by the management controller, the Ingress component running nodes are created by the management controller according to the node configuration of the target cluster, and the node configuration of the target cluster is obtained by the management controller based on the sharding resource configuration of the target cluster;

[0157] The scheduling module 50 is used to schedule resources based on the Ingress resources and the running nodes of the Ingress components to achieve the management of the Ingress components.

[0158] Furthermore, the scheduling module 50 is also used for:

[0159] Based on the Ingress resources, construct runtime resources, wherein the runtime resources include at least one of deployment resources, service resources, and service management resources;

[0160] The runtime resources are scheduled to the Ingress component runtime node.

[0161] All embodiments of the Ingress controller of the present invention can refer to the various embodiments of the Ingress component management method of the present invention, and will not be repeated here.

[0162] Furthermore, embodiments of the present invention also propose a computer-readable storage medium storing an Ingress component management program, which, when executed by a processor, implements the steps of the Ingress component management method described below.

[0163] The various embodiments of the Ingress component management device and computer-readable storage medium of the present invention can be referred to the various embodiments of the Ingress component management method of the present invention, and will not be repeated here.

[0164] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0165] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0166] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0167] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.

Claims

1. A method for managing Ingress components, characterized in that, The Ingress component management method, applied to management controllers deployed outside of various clusters, includes the following steps: Obtain the sharded resources deployed in each of the aforementioned clusters; Based on the node configuration of each cluster, corresponding Ingress component running nodes are created in each cluster, wherein the node configuration of each cluster is obtained by the management controller based on the sharding resource configuration of each cluster; Each cluster is constructed with its own Ingress controller and Ingress resources. The Ingress resources and Ingress component running nodes corresponding to each Ingress controller are then sent to each Ingress controller so that the Ingress controller can schedule resources according to the received Ingress resources and Ingress component running nodes to manage the Ingress components.

2. The Ingress component management method as described in claim 1, characterized in that, Prior to the step of acquiring the sharded resources deployed in each of the clusters, the method further includes: Acquire at least one shard group resource; Based on the allocation strategy and deployment method corresponding to each shard group resource, the shard resources corresponding to each shard resource group are deployed to the corresponding cluster.

3. The Ingress component management method as described in claim 2, characterized in that, The step of deploying the shard resources corresponding to each shard resource group to the corresponding cluster according to the allocation strategy and deployment method of each shard group resource includes: Obtain the allocation strategy, wherein the allocation strategy includes a one-to-one correspondence between the resources of each shard group and each cluster; According to the allocation strategy, a corresponding cluster is allocated to each of the shard groups, and shard resources corresponding to each of the shard groups are constructed respectively. Based on the attributes of each cluster, determine the deployment method corresponding to each shard resource; Based on the deployment method corresponding to each of the sharded resources, each of the sharded resources is deployed to its respective cluster.

4. The Ingress component management method as described in claim 1, characterized in that, Before the step of creating corresponding Ingress component running nodes in each of the clusters according to their respective node configurations, the method further includes: Based on the attributes and sharding resources of each cluster, select the cluster configuration corresponding to each cluster, wherein the cluster configuration includes at least one of node configuration, load balancing configuration and Ingress controller configuration.

5. The Ingress component management method as described in claim 4, characterized in that, The steps of constructing the Ingress controller corresponding to each of the clusters include: Based on the Ingress controller configuration corresponding to each cluster, the Ingress controller corresponding to each cluster is rendered in each cluster.

6. The Ingress component management method as described in claim 2 or 3, characterized in that, The fragment group resources are non-namespace resources, while the fragment resources are namespace resources.

7. A method for managing Ingress components, characterized in that, This is applied to the Ingress controller corresponding to any target cluster, wherein the Ingress controller corresponding to the target cluster is constructed from a management controller deployed outside each of the clusters. The Ingress component management method includes the following steps: The system receives Ingress resources and Ingress component running nodes sent by the management controller, wherein the Ingress resources are constructed by the management controller, the Ingress component running nodes are created by the management controller according to the node configuration of the target cluster, and the node configuration of the target cluster is obtained by the management controller based on the sharding resource configuration of the target cluster. Resource scheduling is performed based on the Ingress resources and the running nodes of the Ingress components to achieve the management of the Ingress components.

8. The Ingress component management method as described in claim 7, characterized in that, The step of resource scheduling based on the Ingress resources and the Ingress component running nodes includes: Based on the Ingress resources, construct runtime resources, wherein the runtime resources include at least one of deployment resources, service resources, and service management resources; The runtime resources are scheduled to the Ingress component runtime node.

9. An Ingress component management device, characterized in that, The Ingress component management device includes: a memory, a processor, and an Ingress component management program stored in the memory and executable on the processor. When the Ingress component management program is executed by the processor, it implements the steps of the Ingress component management method as claimed in any one of claims 1 to 6, or as claimed in any one of claims 7 to 8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores an Ingress component management program, which, when executed by a processor, implements the steps of the Ingress component management method as claimed in any one of claims 1 to 6, or as claimed in any one of claims 7 to 8.

Citation Information

Patent Citations

  • Cloud native platform Kubernetes-based cloud native big data component management system

    CN115827008A

  • Multi-cluster Ingress

    US20200314173A1