A method and system for lightweight edge cloud security group

By deploying a security group management module and edge clients in the edge cloud, unified management of security group rules in the Kubernetes cluster is achieved, solving the problem that Kubernetes cannot provide a security group configuration experience and realizing the consistency and unified management of security groups in the edge cloud.

CN114510316BActive Publication Date: 2024-10-22CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111598325.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-24
Publication Date
2024-10-22
Estimated Expiration
2041-12-24

AI Technical Summary

Technical Problem

The existing Kubernetes does not provide security group capabilities, making it difficult for users to have the same security group configuration experience on Kubernetes virtual machines as on the central cloud.

Method used

This paper provides a method and system for lightweight edge cloud security groups. The system calls the interface of the security group management module through the cloud management system to record the security group rules in the database. The edge client creates a virtual machine container in the edge device and injects the annotation of the associated security group. The edge client establishes a connection with the cloud management system through WebSocket and actively initiates a security group rule synchronization request to ensure that the security group rules are updated in a timely manner and are consistent in the edge device.

Benefits of technology

It implements a security group method for Kubernetes cluster cloud hosts, is compatible with all Kubernetes network plugins, and provides a centralized and unified solution for managing security group rules for widely distributed edge clouds.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114510316B_ABST
    Figure CN114510316B_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for lightweight edge cloud security groups. The method includes: a cloud management system calling an interface of a security group management module to record security group rules in a database; an edge client deployed on an edge device initiating a synchronization request to the security group management module to synchronize the latest security group rules to the edge device; the edge client receiving a virtual machine creation instruction from the cloud management system and creating a corresponding virtual machine container on the edge device, as well as injecting annotations associated with the security group; wherein, if a container event is detected, the corresponding security group rule is obtained from the edge device, and the obtained security group rule is embedded into the target container pointed to by the container event. The technical solution provided in this application enables the configuration of security groups within edge devices in a Kubernetes cluster.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of Internet technology, and in particular to a method and system for a lightweight edge cloud security group. Background Art

[0002] A security group is a logical grouping. Cloud servers with the same network security isolation requirements in the same region can be added to the same security group. Users can configure security group rules to achieve unified network access control. In a security group, you can release the corresponding port number and IP access rights of the system, such as setting only certain IP addresses to access this server, or disabling certain specified ports or FTP and ping functions.

[0003] Lightweight edge cloud introduces a rich cloud-native technology stack through hybrid deployment of containers and virtual machines to help edge applications distribute, deploy, elasticize and migrate across clouds faster. It provides edge cloud clusters in the form of containers and virtual machines, usually directly deploying Kubernetes (k8s) clusters using bare metal, supports multiple runtimes, provides application containers, security containers (KataContainer) and virtual machine containers (Kubevirt) services, unifies the cloud-native technology stack, and further reduces resource overhead.

[0004] However, the existing Kubernetes does not provide security group capabilities, making it difficult for users to have a security group configuration experience on k8s virtual machines that is consistent with the central cloud. Summary of the invention

[0005] In view of this, an embodiment of the present invention provides a method and system for lightweight edge cloud security groups, which can configure security groups in edge devices in a Kubernetes cluster.

[0006] On the one hand, the present invention provides a method for lightweight edge cloud security groups, the method comprising: a cloud management system calls an interface of a security group management module to record security group rules into a database through the security group management module; an edge client deployed in an edge device initiates a synchronization request to the security group management module to synchronize the latest security group rules to the edge device; the edge client receives a virtual machine creation instruction issued by the cloud management system, creates a corresponding virtual machine container in the edge device, and injects annotations of associated security groups; wherein, if a container event is detected, the corresponding security group rules are obtained from the edge device, and the obtained security group rules are embedded in the target container pointed to by the container event.

[0007] In one embodiment, the edge client establishes a connection with the cloud management system via a websocket to receive the virtual machine creation instruction from the cloud management system, so as to actively initiate a security group rule synchronization request to the cloud management system.

[0008] In one embodiment, the latest security group rules synchronized from the security group management module are stored in the edge device in the form of configmap.

[0009] In one embodiment, obtaining the corresponding security group rule from the edge device includes:

[0010] Identify the target container pointed to by the container event, and obtain the corresponding security group rule from the configmap according to the security group associated with the annotation of the target container.

[0011] In one embodiment, the method further comprises:

[0012] If a security group rule event is detected, identify the target security group pointed to by the security group rule event, traverse each virtual machine container associated with the target security group, and compare whether the security group rules in the virtual machine container are consistent with the security group rules represented by the security group rule event; if they are inconsistent, refresh the security group rules in the virtual machine container.

[0013] On the other hand, the present invention also provides a system for a lightweight edge cloud security group, the system comprising a cloud management system, a security group management module and an edge device, wherein: the cloud management system is used to call the interface of the security group management module to record the security group rules into a database through the security group management module; an edge client is deployed in the edge device, and the edge client is used to initiate a synchronization request to the security group management module to synchronize the latest security group rules to the edge device; the edge client is also used to receive a virtual machine creation instruction issued by the cloud management system, and create a corresponding virtual machine container in the edge device, and inject annotations of the associated security group; wherein, if a container event is detected, the corresponding security group rules are obtained from the edge device, and the obtained security group rules are embedded in the target container pointed to by the container event.

[0014] In one embodiment, the edge client establishes a connection with the cloud management system via a websocket to receive the virtual machine creation instruction from the cloud management system, so as to actively initiate a security group rule synchronization request to the cloud management system.

[0015] In one embodiment, the latest security group rules synchronized from the security group management module are stored in the edge device in the form of configmap.

[0016] In one embodiment, the edge client is further used to: identify the target container pointed to by the container event, and obtain the corresponding security group rule from the configmap according to the security group associated with the annotation of the target container.

[0017] In one embodiment, the edge client is also used to: if a security group rule event is detected, identify the target security group pointed to by the security group rule event, traverse each virtual machine container associated with the target security group, and compare whether the security group rules in the virtual machine container are consistent with the security group rules represented by the security group rule event; if they are inconsistent, refresh the security group rules in the virtual machine container.

[0018] The technical solution provided by this application has at least the following technical effects:

[0019] 1) Provides a security group method suitable for k8s cluster cloud hosts and compatible with all k8s network plug-ins.

[0020] 2) It provides a centralized and unified method for managing security group rules for widely distributed edge clouds. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The features and advantages of the present invention will be more clearly understood by referring to the accompanying drawings, which are schematic and should not be construed as limiting the present invention in any way. In the accompanying drawings:

[0022] Figure 1 A schematic diagram of the steps of a method for lightweight edge cloud security group in one embodiment of the present invention is shown;

[0023] Figure 2 A schematic diagram of the system structure of a lightweight edge cloud security group in one embodiment of the present invention is shown;

[0024] Figure 3 A schematic diagram of the process of a lightweight edge cloud security group in one embodiment of the present invention is shown. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0026] See also Figure 1, a method for lightweight edge cloud security group provided in this application may include the following steps.

[0027] S1: The cloud management system calls the interface of the security group management module to record the security group rules into the database through the security group management module;

[0028] S2: The edge client deployed in the edge device initiates a synchronization request to the security group management module to synchronize the latest security group rules to the edge device;

[0029] S3: The edge client receives the virtual machine creation instruction issued by the cloud management system, and creates a corresponding virtual machine container in the edge device, and injects annotations of the associated security group; wherein, if a container event is detected, the corresponding security group rules are obtained from the edge device, and the obtained security group rules are embedded in the target container pointed to by the container event.

[0030] In one embodiment, the edge client establishes a connection with the cloud management system via a websocket to receive the virtual machine creation instruction from the cloud management system, so as to actively initiate a security group rule synchronization request to the cloud management system.

[0031] In one embodiment, the latest security group rules synchronized from the security group management module are stored in the edge device in the form of configmap.

[0032] In one embodiment, obtaining the corresponding security group rule from the edge device includes:

[0033] Identify the target container pointed to by the container event, and obtain the corresponding security group rule from the configmap according to the security group associated with the annotation of the target container.

[0034] In one embodiment, the method further comprises:

[0035] If a security group rule event is detected, identify the target security group pointed to by the security group rule event, traverse each virtual machine container associated with the target security group, and compare whether the security group rules in the virtual machine container are consistent with the security group rules represented by the security group rule event; if they are inconsistent, refresh the security group rules in the virtual machine container.

[0036] See also Figure 2 and Figure 3 In a specific application example, the technical solution provided by this application may include the following components:

[0037] Cloud management system: Centrally deploy and manage edge clouds in a unified manner, manage edge cloud virtual machine container resource allocation and life cycle, manage security group rules and virtual machine security group associations;

[0038] Security group management module: Unified management of security group rules for all edge clouds, providing security group rule verification and storage capabilities, and providing a cloud-edge security group rule synchronization interface;

[0039] Edge cloud k8s (edge ​​device): edge cloud base, deploying cloud-edge configuration synchronization components. User virtual machines also run in the k8s pod (container), that is, running the kvm (Kernel-based Virtual Machine) process in the pod;

[0040] Edge agent (edge ​​client): deployed on edge k8s, communicates with the cloud management system to achieve cloud-edge synchronization, receives instructions from the cloud management system to create virtual machines, synchronize cloud security group rules and versions, etc.;

[0041] Security group controller in the edge cloud: Embeds security group rules into the VM pod based on the association between the VM and the security group.

[0042] like Figure 2 and Figure 3 As shown, in practical application, the technical solution of the present application can be implemented in the following ways:

[0043] Manage edge cloud through cloud management system: Edge agent is deployed in edge k8s and establishes connection with cloud management system through websocket. After receiving the instruction from cloud management system, Edge agent calls k8s api to manage instances in edge cloud. Edge agent can also actively initiate synchronization request to cloud.

[0044] Security group rule management and cloud-edge synchronization: The cloud management system calls the security group management module interface to record the security group rules in the database (DataBase, DB); the edge agent periodically initiates synchronization requests to the security group management module to synchronize the latest security group rules from the cloud to the edge, and saves them in the form of ConfigMap on the edge k8s;

[0045] Edge virtual machine associated with security group: The cloud management system sends instructions to create virtual machines and associate security groups to Edgeagent. Edge agent calls k8s API to create virtual machine pods and injects annotations associated with security groups.

[0046] Security group rules take effect: The edge security group controller monitors events of VM pods and security group ConfigMaps. If a pod event is received, the corresponding rules are obtained from ConfigMap according to the security group associated with the VM pod annotation and embedded in the pod. If a security group rule ConfigMap event is received, all VM pods associated with this security group are traversed to compare the md5 of the security group rules to see if they are consistent. If there is a difference, the rules in the pod are refreshed.

[0047] The present application also provides a system for a lightweight edge cloud security group, the system comprising a cloud management system, a security group management module, and an edge device, wherein:

[0048] The cloud management system is used to call the interface of the security group management module to record the security group rules into the database through the security group management module;

[0049] An edge client is deployed in the edge device, and the edge client is used to initiate a synchronization request to the security group management module to synchronize the latest security group rules to the edge device;

[0050] The edge client is also used to receive a virtual machine creation instruction issued by the cloud management system, and to create a corresponding virtual machine container in the edge device, and to inject annotations of the associated security group; wherein, if a container event is detected, the corresponding security group rules are obtained from the edge device, and the obtained security group rules are embedded in the target container pointed to by the container event.

[0051] In one embodiment, the edge client establishes a connection with the cloud management system via a websocket to receive the virtual machine creation instruction from the cloud management system, so as to actively initiate a security group rule synchronization request to the cloud management system.

[0052] In one embodiment, the latest security group rules synchronized from the security group management module are stored in the edge device in the form of configmap.

[0053] In one embodiment, the edge client is further used to: identify the target container pointed to by the container event, and obtain the corresponding security group rule from the configmap according to the security group associated with the annotation of the target container.

[0054] In one embodiment, the edge client is also used to: if a security group rule event is detected, identify the target security group pointed to by the security group rule event, traverse each virtual machine container associated with the target security group, and compare whether the security group rules in the virtual machine container are consistent with the security group rules represented by the security group rule event; if they are inconsistent, refresh the security group rules in the virtual machine container.

[0055] The technical solution provided by this application has at least the following technical effects:

[0056] 1) Provides a security group method suitable for k8s cluster cloud hosts and compatible with all k8s network plug-ins.

[0057] 2) It provides a centralized and unified method for managing security group rules for widely distributed edge clouds.

[0058] Those skilled in the art can understand that all or part of the processes in the above-mentioned implementation methods can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the implementation methods of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above-mentioned types of memory.

[0059] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for lightweight edge cloud security group, characterized in that: The method comprises: The cloud management system calls the interface of the security group management module to record the security group rules into the database through the security group management module; The edge client deployed in the edge device initiates a synchronization request to the security group management module to synchronize the latest security group rules to the edge device; The edge client receives the virtual machine creation instruction issued by the cloud management system, and creates a corresponding virtual machine container in the edge device, and injects the annotation of the associated security group; wherein, if a container event is detected, the corresponding security group rules are obtained from the edge device, and the obtained security group rules are embedded in the target container pointed to by the container event, and the latest security group rules synchronized from the security group management module are stored in the edge device in the form of configmap; Wherein, obtaining the corresponding security group rules from the edge device includes: Identify the target container pointed to by the container event, and obtain the corresponding security group rule from the configmap according to the security group associated with the annotation of the target container.

2. The method according to claim 1, characterized in that: The edge client establishes a connection with the cloud management system via websocket to receive the virtual machine creation instruction from the cloud management system, so as to actively initiate a security group rule synchronization request to the cloud management system.

3. The method according to claim 1, characterized in that The method further comprises: If a security group rule event is detected, identify the target security group pointed to by the security group rule event, traverse each virtual machine container associated with the target security group, and compare whether the security group rules in the virtual machine container are consistent with the security group rules represented by the security group rule event; if they are inconsistent, refresh the security group rules in the virtual machine container.

4. A lightweight edge cloud security group system, characterized in that: The system includes a cloud management system, a security group management module and an edge device, wherein: The cloud management system is used to call the interface of the security group management module to record the security group rules into the database through the security group management module; An edge client is deployed in the edge device, and the edge client is used to initiate a synchronization request to the security group management module to synchronize the latest security group rules to the edge device; The edge client is also used to receive the virtual machine creation instruction issued by the cloud management system, and create a corresponding virtual machine container in the edge device, and inject the annotation of the associated security group; wherein, if a container event is detected, the corresponding security group rules are obtained from the edge device, and the obtained security group rules are embedded in the target container pointed to by the container event, and the latest security group rules synchronized from the security group management module are stored in the edge device in the form of configmap; The edge client is further used to: identify the target container pointed to by the container event, and obtain the corresponding security group rule from the configmap according to the security group associated with the annotation of the target container.

5. The system according to claim 4, characterized in that The edge client establishes a connection with the cloud management system via websocket to receive the virtual machine creation instruction from the cloud management system, so as to actively initiate a security group rule synchronization request to the cloud management system.

6. The system according to claim 4, characterized in that The edge client is further used to: if a security group rule event is detected, identify the target security group pointed to by the security group rule event, traverse each virtual machine container associated with the target security group, and compare whether the security group rules in the virtual machine container are consistent with the security group rules represented by the security group rule event; If they are inconsistent, refresh the security group rules in the virtual machine container.