Multi-cluster Kubernetes configuration management method and system

Through the combination of configuration center and grayscale release policies, the problems of inconsistency in versions and complex management in multi-cluster Kubernetes configuration management are solved, centralized management and grayscale updates are realized, and configuration consistency and security are ensured.

CN120335889APending Publication Date: 2025-07-18AGZZX OPTOELECTRONICS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510453836.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-10
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

The existing multi-cluster Kubernetes configuration management methods have problems with scalability and reliability, resulting in inconsistent configuration versions and complex management, and it is impossible to effectively verify the stability and consistency of configuration data.

Method used

Through the configuration center, the management interface is built, the grayscale release strategy is used to select the initial release cluster, monitor the operating status and perform configuration updates, roll back clusters that do not meet the conditions, and combine permission management and audit logs to achieve centralized management and grayscale updates.

Benefits of technology

The multi-cluster configuration management process is simplified, the consistency of configuration updates is ensured, configuration redundancy is reduced, the risk of full release is reduced, and the reliability and security of configuration management is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120335889A_ABST
    Figure CN120335889A_ABST
Patent Text Reader

Abstract

The invention provides a multi-cluster Kubernetes configuration management method and system, and the method comprises the steps: S1, creating a configuration center, and constructing a management interface by the configuration center, so as to carry out the configuration management of a plurality of clusters through the management interface; s2, acquiring a configuration update request, selecting an initial release cluster from the plurality of clusters based on a gray release strategy, and performing configuration update on the initial release cluster according to the configuration update request; s3, monitoring the running state of the initial release cluster, and judging whether the running state meets a preset condition or not; if yes, performing configuration updating on a cluster related to the configuration updating request; and if not, the initial configuration cluster rolls back. According to the multi-cluster Kubernetes configuration management method and the system thereof, centralized management can be performed on configuration management resources of a plurality of clusters through the configuration center so as to simplify a configuration updating process of a multi-cluster environment, gray level updating is realized, and risks caused by total release of configuration updating are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a multi-cluster Kubernetes configuration management method and system thereof. Background Art

[0002] As a container orchestration platform, Kubernetes is widely used in distributed systems and microservice architectures. The configuration mapping resources in the container orchestration platform are resources for storing non-confidential configuration data, and are usually used for the configuration management of container applications. However, in a multi-cluster environment, the existing configuration management methods are unable to cope in terms of scalability. When the clusters of an enterprise continue to increase, there are complex management problems with the configuration mapping resources. The management of configuration mapping resources in different clusters lacks consistency, which easily leads to inconsistent configuration versions in different clusters, resulting in different application behaviors in each cluster. In addition, the existing configuration management methods cannot verify the validity and stability of the configuration data, so the reliability of the existing configuration management methods is relatively low. Summary of the Invention

[0003] The technical problem to be solved by the present invention is: to provide a multi-cluster Kubernetes configuration management method and system thereof, so as to solve the problems of inconsistent configuration management configuration and low reliability of configuration management in existing multi-clusters.

[0004] In order to solve the above technical problems, the technical solution adopted by the present invention is: a multi-cluster Kubernetes configuration management method, including the following steps: S1. Create a configuration center, and the configuration center constructs a management interface to perform configuration management on multiple clusters through the management interface; S2. Obtain a configuration update request, select an initial release cluster from multiple clusters based on the gray release strategy, and perform configuration update on the initial release cluster according to the configuration update request; S3. Monitor the running state of the initial release cluster, and determine whether the running state meets a preset condition; if so, perform configuration update on the clusters related to the configuration update request; if not, roll back the initial release cluster.

[0005] Further, in step S2, selecting an initial release cluster from multiple clusters based on the gray release strategy includes: randomly selecting a preset number of clusters from the multiple clusters corresponding to the configuration update request as the initial release clusters.

[0006] Further, the gray release strategy includes a release ratio; Selecting an initial release cluster from multiple said clusters based on a gray release policy, including: obtaining the number of related clusters of the cluster corresponding to the configuration update request, and calculating the preset number according to the release ratio and the number of related clusters.

[0007] Furthermore, the gray release policy includes a preset cluster object; In step S2, selecting an initial release cluster from multiple said clusters based on a gray release policy, including: setting the initial release cluster according to the preset cluster object.

[0008] Furthermore, in step S2, it also includes: generating an audit log according to the configuration update request; wherein, the audit log includes the operation time, operation content, and operation object.

[0009] Furthermore, before step S1, it also includes the steps of: setting management permissions for all release users, and setting permission rules for all clusters; In step S2, it also includes: obtaining the release user of the configuration update request, and determining whether the management permission of the release user meets the permission rules of the clusters related to the configuration update request; if so, selecting an initial release cluster from multiple said clusters based on a gray release policy; if not, generating and sending a permission error message.

[0010] Furthermore, in step S2, it also includes: obtaining the configuration information of the configuration update request, and storing the configuration information in the database module; wherein, the configuration information includes configuration data and version information.

[0011] Another object of the present invention is to provide a multi-cluster Kubernetes configuration management system for implementing the above multi-cluster Kubernetes configuration management method, including a configuration center, the configuration center includes an interface server and a gray release module, the interface server is used to provide a management interface, so that the configuration center performs configuration management on multiple clusters through the management interface, the gray release module is used to generate a gray release policy, and the configuration center performs configuration updates on multiple clusters according to the gray release policy.

[0012] Furthermore, the configuration center also includes a permission management module, and the permission management module is used to set management permissions for all release users and set permission rules for all clusters.

[0013] Furthermore, the configuration center also includes a database module, and the database module is used to store configuration information, and the configuration information includes configuration data and version information.

[0014] The beneficial effects of the present invention are as follows: The multi-cluster Kubernetes configuration management method provided by the present invention can centrally manage the configuration management resources of multiple clusters through a configuration center, so as to simplify the configuration management process, ensure the consistency of configuration updates for multiple clusters, and reduce configuration redundancy. In addition, the multi-cluster Kubernetes configuration management method can implement gray-scale updates for multiple clusters, and after verifying the effectiveness of the configuration through the initial release cluster, perform configuration updates on all clusters related to the configuration request, reducing the risks caused by full-scale releases during configuration updates.

[0015] Correspondingly, the multi-cluster Kubernetes configuration management system provided by the present invention centrally manages the configuration management resources of multiple clusters through a configuration center to simplify the configuration management process, and at the same time implements gray-scale updates for multiple clusters, reducing the risks caused by full-scale releases during configuration updates. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 is a flowchart of the steps of the multi-cluster Kubernetes configuration management method described in the present invention; Figure 2 is a block diagram of the multi-cluster Kubernetes configuration management system described in the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0017] To describe in detail the technical content, achieved objectives, and effects of the present invention, the following is described in conjunction with the embodiments and with reference to the accompanying drawings.

[0018] Please refer to Figure 1 , a multi-cluster Kubernetes configuration management method, including the following steps: S1. Create a configuration center, and the configuration center constructs a management interface to manage the configurations of multiple clusters through the management interface; S2. Obtain a configuration update request, select an initial release cluster from multiple clusters based on the gray-scale release strategy, and perform configuration updates on the initial release cluster according to the configuration update request; S3. Monitor the running status of the initial release cluster, and determine whether the running status meets the preset conditions; if so, perform configuration updates on the clusters related to the configuration update request; if not, roll back the initial release cluster.

[0019] As can be seen from the above description, the beneficial effects of the present invention are as follows: The multi-cluster Kubernetes configuration management method provided by the present invention can centrally manage the configuration management resources of multiple clusters through a configuration center to simplify the configuration management process, ensure the consistency of configuration updates for multiple clusters, and reduce configuration redundancy. In addition, the multi-cluster Kubernetes configuration management method can implement gray-scale updates for multiple clusters. After verifying the effectiveness of the configuration through the initial release cluster, the configuration is updated for all clusters related to the configuration request, reducing the risk caused by full-scale release of configuration updates.

[0020] Further, in step S2, selecting an initial release cluster from multiple clusters based on a gray-scale release policy includes: randomly selecting a preset number of clusters from the multiple clusters corresponding to the configuration update request as the initial release cluster.

[0021] As can be seen from the above description, the multi-cluster Kubernetes configuration management method can randomly select among multiple clusters as the initial release cluster. After the running state of the initial release cluster is valid and stable after configuration update, the configuration is updated for all clusters related to the configuration update request.

[0022] Further, the gray-scale release policy includes a release ratio. Selecting an initial release cluster from multiple clusters based on a gray-scale release policy includes: obtaining the number of related clusters corresponding to the configuration update request, and calculating the preset number according to the release ratio and the number of related clusters.

[0023] As can be seen from the above description, the multi-cluster Kubernetes configuration management method can select an initial release cluster according to the release ratio set by the user.

[0024] Further, the gray-scale release policy includes a preset cluster object. In step S2, selecting an initial release cluster from multiple clusters based on a gray-scale release policy includes: setting the initial release cluster according to the preset cluster object.

[0025] As can be seen from the above description, the multi-cluster Kubernetes configuration management method can set a specified cluster as the initial release cluster according to the preset cluster object set by the user.

[0026] Further, in step S2, it further includes: generating an audit log according to the configuration update request; wherein, the audit log includes the operation time, operation content, and operation object.

[0027] As can be seen from the above description, all operations of the configuration center are recorded in the review log, which is convenient for tracing and auditing.

[0028] Further, before the step S1, the method further includes steps of setting management permissions for all publishing users and setting permission rules for all clusters. In the step S2, it further includes: obtaining the publishing user of the configuration update request, and determining whether the management permission of the publishing user meets the permission rules of the cluster related to the configuration update request; if so, selecting an initial publishing cluster from multiple clusters based on the gray release policy; if not, generating and sending a permission error message.

[0029] As can be seen from the above description, the configuration center can manage the configuration permissions of users and clusters through the RBAC mechanism to enhance the security of this multi-cluster Kubernetes configuration management method.

[0030] Further, in the step S2, it further includes: obtaining the configuration information of the configuration update request and storing the configuration information in the database module; wherein, the configuration information includes configuration data and version information.

[0031] As can be seen from the above description, this multi-cluster Kubernetes configuration management method can store the configuration information through the database module, where the configuration information includes configuration data and version information, to support the version control and rollback of configuration data and ensure the reliability of configuration data changes.

[0032] Please refer to Figure 2 , another object of the present invention is to provide a multi-cluster Kubernetes configuration management system, which is used to implement the above multi-cluster Kubernetes configuration management method, including a configuration center, the configuration center includes an interface server and a gray release module, the interface server is used to provide a management interface so that the configuration center performs configuration management on multiple clusters through the management interface, the gray release module is used to generate a gray release policy, and the configuration center performs configuration updates on multiple clusters according to the gray release policy.

[0033] As can be seen from the above description, this multi-cluster Kubernetes configuration management system provided by the present invention at least includes all the beneficial effects of the above multi-cluster Kubernetes configuration management method.

[0034] Further, the configuration center further includes a permission management module, and the permission management module is used to set management permissions for all publishing users and set permission rules for all clusters.

[0035] As described above, the multi-cluster Kubernetes configuration management system can versionally store configuration data through the database module to support version control and rollback, ensuring the reliability of configuration changes.

[0036] Furthermore, the configuration center further includes a database module, which is used to store configuration information, and the configuration information includes configuration data and version information.

[0037] As described above, the configuration center can manage the configuration permissions of users and clusters through the RBAC mechanism to enhance the security of the multi-cluster Kubernetes configuration management method.

[0038] Embodiment 1 Please refer to Figure 1 , Embodiment 1 of the present invention is: a multi-cluster Kubernetes configuration management method, including the following steps: S1. Create a configuration center, and the configuration center constructs a management interface to perform configuration management on multiple clusters through the management interface; S2. Obtain a configuration update request, select an initial release cluster from multiple clusters based on the gray release strategy, and perform configuration update on the initial release cluster according to the configuration update request; S3. Monitor the running status of the initial release cluster, and determine whether the running status meets the preset conditions; if so, perform configuration update on the clusters related to the configuration update request; if not, roll back the initial release cluster.

[0039] In this embodiment, the configuration center provides a unified API interface for all clusters through the Apiserver as the management interface, and the administrator can perform configuration management on the configurations of multiple clusters through this management interface.

[0040] The administrator can perform configuration management on each cluster through the management center. This multi-cluster Kubernetes configuration management method does not require switching and operating on multiple clusters. When the number of clusters increases, it can effectively reduce the complexity of operation and maintenance, realize centralized control of the multi-cluster environment, and improve the scalability of the multi-cluster environment.

[0041] In addition, this multi-cluster Kubernetes configuration management method provided in this embodiment can ensure the consistency of multi-cluster management, realize the reuse of configurations, avoid the problem of inconsistent configuration versions in different clusters, and ensure the behavioral consistency of each cluster.

[0042] In addition, the multi-cluster Kubernetes configuration management method provided in this embodiment can select an initial release cluster according to the gray release policy, and gradually update the configurations of all clusters corresponding to the configuration update request, reducing the risks brought by full-scale configuration updates for all clusters.

[0043] Specifically, the gray release policy includes a release ratio, and optionally includes a preset cluster object.

[0044] In step S2, selecting an initial release cluster from multiple clusters based on the gray release policy includes: S21. Determine whether the gray release policy includes the preset cluster object; if so, execute step S22; if not, execute step S23; S22. Set the initial release cluster according to the preset cluster object; S23. Obtain the number of related clusters of the clusters corresponding to the configuration update request, calculate the preset number according to the release ratio and the number of related clusters; randomly select the preset number of clusters from the multiple clusters corresponding to the configuration update request as the initial release cluster.

[0045] In this embodiment, the publishing user can set a specified cluster as the gray release target by configuring a preset cluster object. If the user does not configure a preset cluster object, the initial release cluster is randomly selected according to the release ratio selected by the publishing user.

[0046] Before step S1 in this embodiment, it further includes the steps of: setting management permissions for all users, and setting permission rules for all clusters; In step S2, it further includes: obtaining the publishing user of the configuration update request, and determining whether the management permission of the publishing user meets the permission rules of the clusters related to the configuration update request; if so, select an initial release cluster from multiple clusters based on the gray release policy; if not, generate and send a permission error message.

[0047] In traditional multi-cluster configuration management, the permissions and security policies of different clusters are managed separately, and the administrators of each cluster may have different permission policies, resulting in chaotic permission management in the multi-cluster environment and easily leading to problems such as configuration leakage or unauthorized changes.

[0048] However, the multi-cluster Kubernetes configuration management method provided in this embodiment performs permission management through the RBAC (Role-Based Access Control) mechanism, thereby ensuring that the configuration information is only operable by authorized publishing users and clusters. The RBAC mechanism effectively prevents unauthorized access through clear role assignments and permission definitions, ensuring the security and stability of the configuration.

[0049] In step S2 of this embodiment, it further includes: generating an audit log according to the configuration update request; wherein, the audit log includes an operation time, an operation content, and an operation object.

[0050] This multi-cluster Kubernetes configuration management method provided in this embodiment can comprehensively record the changes of the configuration through the audit log. Especially in a multi-cluster environment, managers can effectively track the change history of the configuration through the audit log. When a problem occurs with the configuration, quickly locate the source of responsibility for the configuration change.

[0051] In step S2 of this embodiment, it further includes: obtaining the configuration information of the configuration update request and storing the configuration information in the database module; wherein, the configuration information includes configuration data and version information.

[0052] In this embodiment, the configuration data is stored in the database module in a versioned manner. Each time a configuration update request is received, the new version of the configuration data and its version information are recorded, so that the configuration center can provide a rollback function for the multi-cluster environment through the database module, so that the configuration center can control the multi-cluster to restore to the previous version of the configuration data.

[0053] This embodiment also provides a multi-cluster Kubernetes configuration management system, which is used to execute the above multi-cluster Kubernetes configuration management method. It includes a configuration center, and the configuration center includes an interface server, a gray release module, a database module, and a permission management module; The interface server is used to provide a management interface, so that the configuration center can perform configuration management on multiple clusters through the management interface; specifically, in this embodiment, Kubernetes provides an interface set for managing Kubemetes to the outside through Apiservel, so that the configuration center provides a unified API interface as the management interface through Apiserver, processes the configuration management requests of multiple clusters through the management interface, and performs operations such as adding, deleting, modifying, and querying the configurations of multiple clusters; The gray release module is used to generate a gray release strategy, and the configuration center updates the configurations of multiple clusters according to the gray release strategy; the gray release module supports selectively releasing configuration updates by cluster, ensuring that the configuration updates are carried out step by step, and verifying the reliability of the new configuration before full-scale release, reducing the risks brought by full-scale release of new configurations; The database module is used to store configuration information, which includes configuration data and version information; the database module is used to store the configuration data in a versioned manner to achieve version control. Each configuration change generates a new version, and the historical records are retained for later administrators to roll back and audit the configuration data. The permission management module is used to set management permissions for all publishing users and set permission rules for all clusters; the permission management module in this embodiment uses the RBAC mechanism to manage the permissions of publishing personnel and clusters to ensure that only authorized users and clusters can operate.

[0054] The multi-cluster Kubernetes configuration management method and system provided in this embodiment can meet the requirements of high efficiency, consistency, and scalability for multi-cluster configuration management. The configuration of the cluster is managed by a centralized configuration center, and the configuration data is stored in the database module. This method and system can implement functions such as version control, rollback, and gray release of the configuration in a multi-cluster environment, facilitating unified management and efficient update of the configuration data in multiple clusters.

[0055] In summary, the multi-cluster Kubernetes configuration management method provided by the present invention can centrally manage the configuration management resources of multiple clusters through the configuration center to simplify the configuration management process, ensure the consistency of configuration updates for multiple clusters, and reduce configuration redundancy; in addition, this multi-cluster Kubernetes configuration management method can implement gray updates for multiple clusters. After verifying the effectiveness of the configuration through the initial release cluster, the configuration is updated for all clusters related to the configuration request, reducing the risk caused by full-scale release during configuration updates.

[0056] The above are only the embodiments of the present invention, and do not limit the patent scope of the present invention accordingly. Any equivalent transformation made using the content of the specification and drawings of the present invention, or directly or indirectly applied in related technical fields, shall be equally included in the patent protection scope of the present invention.

Claims

1. A multi-cluster Kubernetes configuration management method, characterized in that Including the following steps: S1. Create a configuration center, and the configuration center constructs a management interface to perform configuration management on multiple clusters through the management interface; S2. Obtain a configuration update request, select an initial release cluster from multiple clusters based on the gray release policy, and perform configuration update on the initial release cluster according to the configuration update request; S3. Monitor the running status of the initial release cluster, and determine whether the running status meets the preset conditions; if so, perform configuration update on the clusters related to the configuration update request; if not, roll back the initial release cluster.

2. The multi-cluster Kubernetes configuration management method according to claim 1, wherein In the step S2, when selecting an initial release cluster from multiple clusters based on the gray release policy, it includes: randomly selecting a preset number of clusters from the multiple clusters corresponding to the configuration update request as the initial release cluster.

3. The multi-cluster Kubernetes configuration management method according to claim 2, wherein The gray release policy includes a release ratio; When selecting an initial release cluster from multiple clusters based on the gray release policy, it includes: obtaining the number of related clusters corresponding to the configuration update request, and calculating the preset number according to the release ratio and the number of related clusters.

4. The multi-cluster Kubernetes configuration management method according to claim 1, wherein The gray release policy includes a preset cluster object; In the step S2, when selecting an initial release cluster from multiple clusters based on the gray release policy, it includes: setting the initial release cluster according to the preset cluster object.

5. The multi-cluster Kubernetes configuration management method according to claim 1, characterized in that In the step S2, it further includes: generating an audit log according to the configuration update request; wherein, the audit log includes the operation time, operation content, and operation object.

6. The multi-cluster Kubernetes configuration management method according to claim 1, wherein Before the step S1, it further includes the steps of: setting management permissions for all release users, and setting permission rules for all clusters; In the step S2, it further includes: obtaining the release user of the configuration update request, and determining whether the management permission of the release user meets the permission rules of the clusters related to the configuration update request; if so, select an initial release cluster from multiple clusters based on the gray release policy; if not, generate and send a permission error message.

7. The multi-cluster Kubernetes configuration management method according to claim 1, wherein In the step S2, it further includes: obtaining the configuration information of the configuration update request, and storing the configuration information in the database module; wherein, the configuration information includes configuration data and version information.

8. A multi-cluster Kubernetes configuration management system, characterized in that, A multi-cluster Kubernetes configuration management method for implementing any one of claims 1 to 5, including a configuration center, the configuration center includes an interface server and a gray release module, the interface server is used to provide a management interface so that the configuration center performs configuration management on multiple clusters through the management interface, the gray release module is used to generate a gray release policy, and the configuration center performs configuration update on multiple clusters according to the gray release policy.

9. The multi-cluster Kubernetes configuration management system according to claim 8, wherein The configuration center further includes a permission management module, and the permission management module is used to set management permissions for all release users and set permission rules for all clusters.

10. The multi-cluster Kubernetes configuration management system according to claim 8, wherein, The configuration center further includes a database module, and the database module is used to store configuration information, and the configuration information includes configuration data and version information.