A method, device, equipment and medium for metadata backup of a container cluster

CN116401097BActive Publication Date: 2026-10-09JINAN INSPUR DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310385021.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-07
Publication Date
2026-10-09
Estimated Expiration
2043-04-07

AI Technical Summary

Technical Problem

Kubernetes集群内元数据资源的备份和容灾,一直是一个难以很好解决的问题

Benefits of technology

[0033]The present invention has the following beneficial technical effects: The method for metadata backup of container clusters provided in the embodiments of the present invention defines tags for discovering resources and adds the tags to the CRD of the metadata to be backed up in the main environment; creates the CRD and namespace of the metadata to be backed up in the backup environment, and obtains and configures the kubeconfig on the main environment and the backup environment; queries the metadata to be backed up in the main environment based on the defined tags and through the kubeconfig of the main environment, and sorts the queried metadata; and reconstructs and backs up the metadata in the backup environment according to the sorting through the kubeconfig of the backup environment. This technical solution can completely preserve the metadata data chain of cloud-native applications, avoid data loss when the container cluster environment fails, and plays an important role in application recovery.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116401097B_ABST
    Figure CN116401097B_ABST
Patent Text Reader

Abstract

The application provides a kind of metadata backup method, device and equipment of container cluster and readable medium, method includes: defining the label of discovery resource, and adding label to the CRD of metadata needing backup in main environment;Create CRD and namespace of metadata needing backup on backup environment, and obtain kubeconfig on main environment and backup environment and configure kubeconfig;Metadata needing backup is queried on the basis of defined label and through kubeconfig of main environment, and the metadata found is sorted;Metadata is reestablished backup according to sorting in backup environment through kubeconfig of backup environment.The scheme of the application can completely save the metadata data chain of cloud native application, can avoid data loss when container cluster environment fails, and plays an important role in application recovery.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computers, and more specifically to a method, apparatus, device, and readable medium for backing up metadata of a container cluster. Background Technology

[0002] With the development of cloud-native technologies and the increasing maturity of the cloud-native market, many large enterprises have adopted Kubernetes (an open-source container application cluster management service) technology to "cloudify" their previously large-scale infrastructure, creating dozens or even hundreds of clusters within the enterprise. Backup and disaster recovery of metadata resources within Kubernetes clusters has always been a difficult problem to solve effectively. Although Kubernetes cluster backups can be achieved through Etcd backup and recovery, it is difficult to restore a single namespace (an abstract collection of resources and objects), and the backed-up data is also difficult to restore on another Kubernetes cluster. For user-developed cloud-native applications, due to the strong management relationships and logic between their CRDs (custom resource definitions), the backed-up data is currently difficult to restore.

[0003] For Kubernetes backup and disaster recovery, the most important aspect is the backup and recovery of metadata. Regardless of the application, it can be recovered through redeployment. However, user data consists of data stored in the database and various metadata configured in Kubernetes. Loss or unrecoverable metadata is a real disaster. Summary of the Invention

[0004] In view of this, the purpose of this invention is to provide a method, apparatus, device and readable medium for metadata backup of container clusters. By using the technical solution of this invention, the metadata data chain of cloud-native applications can be completely preserved, and data loss can be avoided when the container cluster environment fails, which plays an important role in application recovery.

[0005] To achieve the above objectives, one aspect of the present invention provides a method for backing up metadata of a container cluster, comprising the following steps:

[0006] Define tags for discovered resources and add the tags to the CRD of the metadata that needs to be backed up in the main environment;

[0007] Create the CRD and namespace of the metadata that needs to be backed up on the backup environment, and obtain the kubeconfig (the file used to configure cluster access is called the kubeconfig file, which is a common way to reference configuration files) from the primary and backup environments and configure the kubeconfig.

[0008] Based on the defined tags, the system queries the metadata that needs to be backed up on the main environment using the kubeconfig of the main environment, and sorts the queried metadata.

[0009] The kubeconfig of the backup environment rebuilds the metadata backup according to the sorting in the backup environment.

[0010] According to one embodiment of the present invention, it further includes:

[0011] Determine the namespace where the metadata that needs to be backed up in the main environment is located.

[0012] According to one embodiment of the present invention, it further includes:

[0013] In response to the completion of creating the CRD containing the metadata that needs to be backed up on the backup environment, query whether the metadata exists under the CRD created in the backup environment;

[0014] If metadata exists under a CRD created in the backup environment, the existing metadata will be deleted.

[0015] According to one embodiment of the present invention, sorting the retrieved metadata includes:

[0016] The metadata that needs to be backed up is linked into a tree structure through the ownerReference in the metadata (which describes the relationship between multiple resources).

[0017] According to one embodiment of the present invention, rebuilding the backup of metadata in the backup environment according to the sorting order through the kubeconfig of the backup environment includes:

[0018] Backups are created sequentially in the backup environment, starting from the root resource of the tree structure and working upwards.

[0019] According to one embodiment of the present invention, creating backups in the backup environment sequentially upwards from the root resource of the tree structure includes:

[0020] Check if the metadata contains ownerReference;

[0021] In response to the existence of ownerReference for metadata, the corresponding metadata is searched in the backup environment based on the metadata name and type;

[0022] After modifying the ownerReference of the metadata to the metadata found on the standby environment, create the backup.

[0023] According to one embodiment of the present invention, the kubeconfig configuration in the main environment is used to connect to the main environment apiserver and discover metadata, and the kubeconfig configuration in the backup environment is used to connect to the backup environment and rebuild metadata.

[0024] Another aspect of the present invention provides an apparatus for backing up metadata of a container cluster, the apparatus comprising:

[0025] Add a module, configure the module to define tags for discovering resources, and add the tags to the CRD of the metadata that needs to be backed up in the main environment;

[0026] The module is configured to create the CRD and namespace of the metadata to be backed up on the backup environment, and to obtain and configure the kubeconfig on both the primary and backup environments.

[0027] The query module is configured to query the metadata that needs to be backed up on the main environment based on the defined tags and through the kubeconfig of the main environment, and sort the queried metadata.

[0028] The backup module is configured to rebuild and back up metadata in the backup environment based on sorting using the kubeconfig of the backup environment.

[0029] Another aspect of the embodiments of the present invention also provides a computer device, the computer device comprising:

[0030] At least one processor; and

[0031] The memory stores computer instructions that can be executed by a processor, which, when executed by the processor, implement the steps of any of the methods described above.

[0032] In another aspect, embodiments of the present invention also provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of any of the above methods.

[0033] The present invention has the following beneficial technical effects: The method for metadata backup of container clusters provided in the embodiments of the present invention defines tags for discovering resources and adds the tags to the CRD of the metadata to be backed up in the main environment; creates the CRD and namespace of the metadata to be backed up in the backup environment, and obtains and configures the kubeconfig on the main environment and the backup environment; queries the metadata to be backed up in the main environment based on the defined tags and through the kubeconfig of the main environment, and sorts the queried metadata; and reconstructs and backs up the metadata in the backup environment according to the sorting through the kubeconfig of the backup environment. This technical solution can completely preserve the metadata data chain of cloud-native applications, avoid data loss when the container cluster environment fails, and plays an important role in application recovery. Attached Figure Description

[0034] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other embodiments can be obtained based on these drawings without creative effort.

[0035] Figure 1 A schematic flowchart illustrating a method for backing up metadata of a container cluster according to an embodiment of the present invention;

[0036] Figure 2 A schematic diagram of an apparatus for backing up metadata of a container cluster according to an embodiment of the present invention;

[0037] Figure 3 This is a schematic diagram of a computer device according to an embodiment of the present invention;

[0038] Figure 4 This is a schematic diagram of a computer-readable storage medium according to an embodiment of the present invention. Detailed Implementation

[0039] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to specific examples and the accompanying drawings.

[0040] Based on the above objectives, a first aspect of the embodiments of the present invention provides an embodiment of a method for metadata backup of a container cluster. Figure 1 The diagram shown is a schematic flowchart of the method.

[0041] like Figure 1 As shown, the method may include the following steps:

[0042] S1 defines tags for discovered resources and adds these tags to the CRDs of the metadata that need to be backed up in the main environment. For example, `metadata.backup-k8s.io=""`. Because metadata may be associated with secrets (storage and sharing sensitive, encrypted configuration information) and configmaps (generally used to manage configuration files or a large amount of environment variable information), secrets and configmaps are default backup resources and do not require any tags. It can also determine the namespace where the metadata to be backed up in the main environment resides. If not set, metadata from all namespaces will be backed up.

[0043] S2 creates the CRDs and namespaces of the metadata to be backed up on the backup environment, and obtains and configures the kubeconfigs from both the primary and backup environments. Because metadata backups need to be restored, a backup environment is required. The CRDs and namespaces of the metadata types to be backed up are pre-created on the backup environment. If the metadata cannot be coordinated between two sets of operators, then coordination in the backup environment needs to be stopped. The primary environment's kubeconfig connects to the primary environment's API server, discovers the metadata types, CRDs, metadata, secrets, and configmaps to be backed up, and the backup environment's kubeconfig connects to the backup environment's API server to rebuild the data on the backup environment.

[0044] S3 uses defined tags and the kubeconfig of the host environment to query the metadata that needs to be backed up on the host environment, and sorts the retrieved metadata. Based on the defined namespace and backup tags, it queries the kubeconfig of the host environment for the metadata that needs to be backed up. It defines metadata backup tags, such as metadata.backup-k8s.io, and adds this tag to the CRD (Catalog Detailed Document) type of metadata that needs to be backed up. Based on this tag, it discovers the CRD type and metadata that need to be backed up, and sorts and concatenates the metadata into a tree structure using the ownerReference in the metadata.

[0045] S4 uses the kubeconfig of the backup environment to rebuild and back up the metadata in the backup environment according to the sorting. The metadata is rebuilt and backed up on the backup environment using the kubeconfig of the backup environment. When rebuilding the metadata, it starts from the root resource of the metadata tree structure and creates it upwards. After the metadata is created, the reference ID in the ownerReference of the metadata is modified in real time according to the new ID.

[0046] By using the technical solution of this invention, the metadata data chain of cloud-native applications can be completely preserved, which can avoid data loss when the container cluster environment fails, and plays an important role in application recovery.

[0047] In a preferred embodiment of the present invention, it further includes:

[0048] Determine the namespace containing the metadata that needs to be backed up in the primary environment. You can determine the namespace containing the metadata that needs to be backed up in the primary environment as needed. If you do not set it, the corresponding metadata in all namespaces will be backed up. Therefore, in some cases, it is not necessary to determine the namespace containing the metadata.

[0049] In a preferred embodiment of the present invention, it further includes:

[0050] In response to the completion of creating the CRD containing the metadata that needs to be backed up on the backup environment, query whether the metadata exists under the CRD created in the backup environment;

[0051] If metadata exists under a CRD created in the backup environment, the existing metadata will be deleted. This ensures that the data in the backup environment is clean before backup, and also ensures the accuracy of the backup data.

[0052] In a preferred embodiment of the present invention, sorting the retrieved metadata includes:

[0053] The metadata that needs to be backed up is linked into a tree structure through the ownerReference in the metadata.

[0054] In a preferred embodiment of the present invention, rebuilding the backup of metadata in the backup environment according to the sorting order through the kubeconfig of the backup environment includes:

[0055] Backups are created sequentially in the backup environment, starting from the root resource of the tree structure and working upwards.

[0056] In a preferred embodiment of the present invention, creating backups in the backup environment sequentially upwards from the root resource of the tree structure includes:

[0057] Check if the metadata contains ownerReference;

[0058] In response to the existence of ownerReference for metadata, the corresponding metadata is searched in the backup environment based on the metadata name and type, and the ID of the searched metadata is obtained;

[0059] After modifying the ID referenced in the metadata's ownerReference to the ID of the metadata found on the standby environment, create the backup.

[0060] In a preferred embodiment of the present invention, the kubeconfig configuration in the main environment is used to connect to the main environment apiserver and discover metadata, and the kubeconfig configuration in the backup environment is used to connect to the backup environment and rebuild metadata.

[0061] By using the technical solution of this invention, the metadata data chain of cloud-native applications can be completely preserved, which can avoid data loss when the container cluster environment fails, and plays an important role in application recovery.

[0062] It should be noted that those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc. The embodiments of the computer program described above can achieve the same or similar effects as any of the corresponding foregoing method embodiments.

[0063] Furthermore, the method disclosed in the embodiments of the present invention can also be implemented as a computer program executed by a CPU, which may be stored in a computer-readable storage medium. When the computer program is executed by the CPU, it performs the functions defined in the method disclosed in the embodiments of the present invention.

[0064] Based on the above objectives, a second aspect of the embodiments of the present invention provides an apparatus for metadata backup of a container cluster, such as... Figure 2 As shown, the device 200 includes:

[0065] Add a module, configure the module to define tags for discovering resources, and add the tags to the CRD of the metadata that needs to be backed up in the main environment;

[0066] The module is configured to create the CRD and namespace of the metadata to be backed up on the backup environment, and to obtain and configure the kubeconfig on both the primary and backup environments.

[0067] The query module is configured to query the metadata that needs to be backed up on the main environment based on the defined tags and through the kubeconfig of the main environment, and sort the queried metadata.

[0068] The backup module is configured to rebuild and back up metadata in the backup environment based on sorting using the kubeconfig of the backup environment.

[0069] In view of the above objectives, a third aspect of the present invention provides a computer device. Figure 3 The diagram shown is a schematic representation of an embodiment of the computer device provided by the present invention. Figure 3 As shown, embodiments of the present invention include the following apparatus: at least one processor 21; and a memory 22 storing computer instructions 23 executable on the processor, which, when executed by the processor, implement the following method:

[0070] Define tags for discovered resources and add the tags to the CRD of the metadata that needs to be backed up in the main environment;

[0071] Create the CRD and namespace of the metadata that needs to be backed up on the backup environment, and obtain the kubeconfig on the primary and backup environments and configure the kubeconfig.

[0072] Based on the defined tags, the system queries the metadata that needs to be backed up on the main environment using the kubeconfig of the main environment, and sorts the queried metadata.

[0073] The kubeconfig of the backup environment rebuilds the metadata backup according to the sorting in the backup environment.

[0074] In a preferred embodiment of the present invention, it further includes:

[0075] Determine the namespace where the metadata that needs to be backed up in the main environment is located.

[0076] In a preferred embodiment of the present invention, it further includes:

[0077] In response to the completion of creating the CRD containing the metadata that needs to be backed up on the backup environment, query whether the metadata exists under the CRD created in the backup environment;

[0078] If metadata exists under a CRD created in the backup environment, the existing metadata will be deleted.

[0079] In a preferred embodiment of the present invention, sorting the retrieved metadata includes:

[0080] The metadata that needs to be backed up is linked into a tree structure through the ownerReference in the metadata.

[0081] In a preferred embodiment of the present invention, rebuilding the backup of metadata in the backup environment according to the sorting order through the kubeconfig of the backup environment includes:

[0082] Backups are created sequentially in the backup environment, starting from the root resource of the tree structure and working upwards.

[0083] In a preferred embodiment of the present invention, creating backups in the backup environment sequentially upwards from the root resource of the tree structure includes:

[0084] Check if the metadata contains ownerReference;

[0085] In response to the existence of ownerReference for metadata, the corresponding metadata is searched in the backup environment based on the metadata name and type;

[0086] After modifying the ownerReference of the metadata to the metadata found on the standby environment, create the backup.

[0087] In a preferred embodiment of the present invention, the kubeconfig configuration in the main environment is used to connect to the main environment apiserver and discover metadata, and the kubeconfig configuration in the backup environment is used to connect to the backup environment and rebuild metadata.

[0088] In view of the above objectives, a fourth aspect of the present invention provides a computer-readable storage medium. Figure 4 The diagram shown is a schematic representation of an embodiment of the computer-readable storage medium provided by the present invention. Figure 4 As shown, computer-readable storage medium 31 stores a computer program 32 that, when executed by a processor, performs the following methods:

[0089] Define tags for discovered resources and add the tags to the CRD of the metadata that needs to be backed up in the main environment;

[0090] Create the CRD and namespace of the metadata that needs to be backed up on the backup environment, and obtain the kubeconfig on the primary and backup environments and configure the kubeconfig.

[0091] Based on the defined tags, the system queries the metadata that needs to be backed up on the main environment using the kubeconfig of the main environment, and sorts the queried metadata.

[0092] The kubeconfig of the backup environment rebuilds the metadata backup according to the sorting in the backup environment.

[0093] In a preferred embodiment of the present invention, it further includes:

[0094] Determine the namespace where the metadata that needs to be backed up in the main environment is located.

[0095] In a preferred embodiment of the present invention, it further includes:

[0096] In response to the completion of creating the CRD containing the metadata that needs to be backed up on the backup environment, query whether the metadata exists under the CRD created in the backup environment;

[0097] If metadata exists under a CRD created in the backup environment, the existing metadata will be deleted.

[0098] In a preferred embodiment of the present invention, sorting the retrieved metadata includes:

[0099] The metadata that needs to be backed up is linked into a tree structure through the ownerReference in the metadata.

[0100] In a preferred embodiment of the present invention, rebuilding the backup of metadata in the backup environment according to the sorting order through the kubeconfig of the backup environment includes:

[0101] Backups are created sequentially in the backup environment, starting from the root resource of the tree structure and working upwards.

[0102] In a preferred embodiment of the present invention, creating backups in the backup environment sequentially upwards from the root resource of the tree structure includes:

[0103] Check if the metadata contains ownerReference;

[0104] In response to the existence of ownerReference for metadata, the corresponding metadata is searched in the backup environment based on the metadata name and type;

[0105] After modifying the ownerReference of the metadata to the metadata found on the standby environment, create the backup.

[0106] In a preferred embodiment of the present invention, the kubeconfig configuration in the main environment is used to connect to the main environment apiserver and discover metadata, and the kubeconfig configuration in the backup environment is used to connect to the backup environment and rebuild metadata.

[0107] Furthermore, the method disclosed in the embodiments of the present invention can also be implemented as a computer program executed by a processor, which may be stored in a computer-readable storage medium. When the computer program is executed by the processor, it performs the functions defined in the method disclosed in the embodiments of the present invention.

[0108] Furthermore, the above-described method steps and system units can also be implemented using a controller and a computer-readable storage medium for storing a computer program that enables the controller to perform the functions of the above-described steps or units.

[0109] Those skilled in the art will also understand that the various exemplary logic blocks, modules, circuits, and algorithm steps described in conjunction with the disclosure herein can be implemented as electronic hardware, computer software, or a combination of both. To clearly illustrate this interchangeability between hardware and software, the functionality of various illustrative components, blocks, modules, circuits, and steps has been generally described. Whether this functionality is implemented as software or as hardware depends on the specific application and the design constraints imposed on the system as a whole. Those skilled in the art can implement the functionality in various ways for each specific application, but such implementation decisions should not be construed as departing from the scope of the embodiments disclosed herein.

[0110] In one or more exemplary designs, functionality may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, functionality may be stored as one or more instructions or code on or transmitted via a computer-readable medium. Computer-readable media include computer storage media and communication media, including any medium that facilitates the transfer of a computer program from one location to another. Storage media may be any available medium accessible to a general-purpose or special-purpose computer. By way of example, and not limitation, computer-readable media may include RAM, ROM, EEPROM, CD-ROM or other optical disc storage devices, disk storage devices or other magnetic storage devices, or any other medium that may be used to carry or store the required program code in the form of instructions or data structures and is accessible to a general-purpose or special-purpose computer or a general-purpose or special-purpose processor. Furthermore, any connection may be appropriately referred to as computer-readable media. For example, if software is transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, then the aforementioned coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are all included in the definition of media. As used herein, disks and optical discs include compact discs (CDs), laser discs, optical discs, digital multifunction discs (DVDs), floppy disks, and Blu-ray discs, wherein disks typically reproduce data magnetically, while optical discs reproduce data optically using lasers. Combinations of the above should also be included within the scope of computer-readable media.

[0111] The above are exemplary embodiments disclosed in this invention. However, it should be noted that various changes and modifications can be made without departing from the scope of the embodiments of this invention as defined by the claims. The functions, steps, and / or actions of the methods according to the disclosed embodiments described herein do not need to be performed in any particular order. Furthermore, although the elements disclosed in the embodiments of this invention may be described or claimed individually, they may be understood as multiple unless explicitly limited to a singular number.

[0112] It should be understood that, as used herein, the singular form “a” is intended to include the plural form as well, unless the context clearly supports an exception. It should also be understood that, as used herein, “and / or” refers to any and all possible combinations of one or more of the associated listed items.

[0113] The embodiment numbers disclosed in the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0114] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0115] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of the invention (including the claims) is limited to these examples. Within the framework of the invention, technical features of the above embodiments or different embodiments can be combined, and many other variations of different aspects of the invention exist, which are not provided in the details for the sake of brevity. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the invention should be included within the protection scope of the invention.

Claims

1. A method for backing up metadata of a container cluster, characterized in that, Includes the following steps: Define tags for discovered resources and add the tags to the CRD of the metadata that needs to be backed up in the main environment; Create the CRD and namespace of the metadata that needs to be backed up on the backup environment, and obtain the kubeconfig on the primary and backup environments and configure the kubeconfig. Based on the defined tags, the system queries the metadata that needs to be backed up on the main environment using the kubeconfig of the main environment, and sorts the queried metadata. The kubeconfig of the backup environment rebuilds the metadata backup according to the sorting in the backup environment.

2. The method according to claim 1, characterized in that, Also includes: Determine the namespace where the metadata that needs to be backed up in the main environment is located.

3. The method according to claim 1, characterized in that, Also includes: In response to the completion of creating the CRD containing the metadata that needs to be backed up on the backup environment, query whether the metadata exists under the CRD created in the backup environment; If metadata exists under a CRD created in the backup environment, the existing metadata will be deleted.

4. The method according to claim 1, characterized in that, Sort the retrieved metadata, including: The metadata that needs to be backed up is linked into a tree structure through the ownerReference in the metadata.

5. The method according to claim 4, characterized in that, The backup environment is rebuilt using kubeconfig in the backup environment, based on sorting of metadata. This includes: Backups are created sequentially in the backup environment, starting from the root resource of the tree structure and working upwards.

6. The method according to claim 5, characterized in that, Creating backups in the backup environment, starting from the root resource of the tree structure and proceeding upwards, includes: Check if the metadata contains ownerReference; In response to the existence of ownerReference for metadata, the corresponding metadata is searched in the backup environment based on the metadata name and type; After modifying the ownerReference of the metadata to the metadata found on the standby environment, create the backup.

7. The method according to claim 1, characterized in that, The kubeconfig configuration in the primary environment is used to connect to the primary environment apiserver and discover metadata, while the kubeconfig configuration in the backup environment is used to connect to the backup environment and rebuild metadata.

8. An apparatus for backing up metadata of a container cluster, characterized in that, The device includes: Add a module, which is configured to define tags for discovered resources and add the tags to the CRD of metadata that needs to be backed up in the main environment; The acquisition module is configured to create a CRD and namespace for the metadata to be backed up on the backup environment, and to acquire and configure the kubeconfig on the primary and backup environments. The query module is configured to query the metadata that needs to be backed up on the main environment based on defined tags and through the kubeconfig of the main environment, and sort the queried metadata. The backup module is configured to rebuild and back up metadata in the backup environment according to the sorting order using the kubeconfig of the backup environment.

9. A computer device, characterized in that, include: At least one processor; as well as A memory storing computer instructions executable on the processor, which, when executed by the processor, implement the steps of the method according to any one of claims 1-7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-7.

Citation Information

Patent Citations

  • Big data acquisition and storage system and method for injection molding equipment

    CN110008286A

  • Container cluster processing method and system

    CN114443356A