Resource object management method and device

By establishing a daemon process and configuring the network for each node in the Kubernetes system, the problem of the inability to separate the management plane from the business plane was solved, enabling effective management of resource objects and reducing maintenance costs.

CN115080229BActive Publication Date: 2025-10-28LENOVO (BEIJING) LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210531829.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-13
Publication Date
2025-10-28
Estimated Expiration
2042-05-13

AI Technical Summary

Technical Problem

In Kubernetes systems, the management plane and the business plane cannot be completely separated, which makes resource object management difficult.

Method used

By establishing a daemon process on each node of the container orchestration platform, configuring the network, and using the daemon process to manage the resource objects of the container composition, the management plane and the business plane are separated.

Benefits of technology

It achieves effective separation between the management plane and the business plane, and enables the creation, deletion, modification and querying of resource objects associated with container orchestration platform services, thereby reducing maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115080229B_ABST
    Figure CN115080229B_ABST
Patent Text Reader

Abstract

This application provides a resource object management method and apparatus; the resource object management method includes: establishing a daemon process for each node of the container orchestration platform; configuring the network of the container orchestration platform service; and, in response to the network configuration of the container orchestration platform service being effective, managing the resource objects of the container combination associated with the container orchestration platform service based on the first daemon process corresponding to the first node.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to container cluster management technology, and more particularly to a method and apparatus for managing resource objects. Background Technology

[0002] Kubernetes is a portable container orchestration and management platform designed for container services. It is an open-source container cluster management system that provides functions such as application deployment, maintenance, and scaling mechanisms. Kubernetes makes it easy to manage containerized applications running across clusters. Kubernetes is often abbreviated as k8s.

[0003] In multi-NIC (pod) scenarios, the management plane and business plane need to be separated to manage resource objects. However, in current Kubernetes systems, the management plane and business plane cannot be completely separated, thus hindering the management of resource objects. Summary of the Invention

[0004] This application provides a resource object management method and apparatus that can separate the management plane from the business plane in a Kubernetes system, thereby enabling the management of resource objects.

[0005] The technical solution of this application embodiment is implemented as follows:

[0006] In a first aspect, embodiments of this application provide a resource object management method, comprising: establishing a daemon process for each node of a container orchestration platform; configuring the network of the container orchestration platform service; and, in response to the network configuration of the container orchestration platform service being effective, managing resource objects of container combinations associated with the container orchestration platform service based on the first daemon process corresponding to the first node.

[0007] In some embodiments, the method further includes: determining whether the network of the container assembly corresponds to the network of the orchestration platform service; if the network of the container assembly corresponds to the network of the orchestration platform service, then determining that the network corresponding to the configured container orchestration platform service is valid.

[0008] In some embodiments, the management of resource objects of the container composition associated with the container orchestration platform service based on the first daemon process corresponding to the first node includes at least one of the following:

[0009] Based on the first daemon process corresponding to the first node, a resource object of the container composition associated with the container orchestration platform service is created;

[0010] Based on the first daemon process corresponding to the first node, delete the resource object of the container combination associated with the container orchestration platform service;

[0011] Based on the first daemon process corresponding to the first node, modify the resource object of the container composition associated with the container orchestration platform service;

[0012] Based on the first daemon process corresponding to the first node, query the resource objects of the container combination associated with the container orchestration platform service.

[0013] In some embodiments, creating a resource object for the container composition associated with the container orchestration platform service based on the first daemon process corresponding to the first node includes:

[0014] The first daemon process receives the first event handling request;

[0015] Parse the first event handling request and construct the configuration file;

[0016] Based on the configuration file, resource objects for the container composition associated with the container orchestration platform service are created.

[0017] In some embodiments, deleting the resource object of the container composition associated with the container orchestration platform service based on the first daemon process corresponding to the first node includes:

[0018] The first daemon process receives the second event handling request;

[0019] Parse the second event handling request to obtain the namespace and name of the resource object of the container composition associated with the container orchestration platform service;

[0020] The first daemon process constructs a deletion command based on the namespace and the name;

[0021] The first daemon executes the deletion command to delete the resource object of the container composition associated with the container orchestration platform service.

[0022] In some embodiments, modifying the resource object of the container composition associated with the container orchestration platform service based on the first daemon process corresponding to the first node includes:

[0023] The first daemon process receives a third event handling request;

[0024] Parse the third event handling request and delete the resource object of the container composition associated with the container orchestration platform service;

[0025] Rebuild the configuration file based on the third event handling request;

[0026] Resource objects for the container composition associated with the container orchestration platform service are created based on the rebuilt configuration file.

[0027] In some embodiments, querying the resource objects of the container composition associated with the container orchestration platform service based on the first daemon process corresponding to the first node includes:

[0028] The first daemon process receives the fourth event handling request;

[0029] Parse the fourth event handling request to obtain the namespace and name of the resource object of the container composition associated with the container orchestration platform service;

[0030] Build a query command based on the namespace and the name;

[0031] Based on the query command, query the resource objects of the container combination associated with the container orchestration platform service to obtain the query results.

[0032] Secondly, embodiments of this application provide a resource object management device, including: a creation module, used to create a daemon process for each node of a container orchestration platform;

[0033] The configuration module is used to configure the network of the container orchestration platform service;

[0034] The management module is used to manage the resource objects of the container combination associated with the container orchestration platform service in response to the network availability of the configured container orchestration platform service, based on the first daemon process corresponding to the first node.

[0035] In some embodiments, the resource object management apparatus further includes:

[0036] The processing module is used to determine whether the network of the container combination corresponds to the network of the orchestration platform service;

[0037] If the network of the container assembly corresponds to the network of the orchestration platform service, then the network corresponding to the configured container orchestration platform service is determined to be valid.

[0038] In some embodiments, the management module is configured to perform at least one of the following:

[0039] Based on the first daemon process corresponding to the first node, a resource object of the container composition associated with the container orchestration platform service is created;

[0040] Based on the first daemon process corresponding to the first node, delete the resource object of the container combination associated with the container orchestration platform service;

[0041] Based on the first daemon process corresponding to the first node, modify the resource object of the container composition associated with the container orchestration platform service;

[0042] Based on the first daemon process corresponding to the first node, query

[0043] In some embodiments, the resource management module includes a first daemon process, which receives a first event processing request;

[0044] Parse the first event handling request and construct the configuration file;

[0045] Based on the configuration file, resource objects for the container composition associated with the container orchestration platform service are created.

[0046] In some embodiments, the resource management module includes a first daemon process, which receives a third event processing request;

[0047] Parse the third event handling request and delete the resource object of the container composition associated with the container orchestration platform service;

[0048] Rebuild the configuration file based on the third event handling request;

[0049] Resource objects for the container composition associated with the container orchestration platform service are created based on the rebuilt configuration file.

[0050] In some embodiments, the resource management module includes a first daemon process, which receives a fourth event processing request;

[0051] Parse the fourth event handling request to obtain the namespace and name of the resource object of the container composition associated with the container orchestration platform service;

[0052] Build a query command based on the namespace and the name;

[0053] Based on the query command, query the resource objects of the container combination associated with the container orchestration platform service to obtain the query results.

[0054] Thirdly, embodiments of this application provide an electronic device, including:

[0055] Memory, used to store executable instructions;

[0056] The processor, when executing executable instructions stored in the memory, implements the resource object management method provided in the embodiments of this application.

[0057] This application provides a computer-readable storage medium storing executable instructions, which, when executed by a processor, implement the resource object management method provided in this application.

[0058] The resource object management method provided in this application establishes a daemon process for each node of the container orchestration platform; configures the network of the container orchestration platform service; and, in response to the network configuration of the container orchestration platform service being effective, manages the resource objects of the container combination associated with the container orchestration platform service based on the first daemon process corresponding to the first node. Thus, by supporting the configuration of the network of the container orchestration platform service and controlling the separation of the business plane and management plane through the daemon processes corresponding to each node on the container orchestration platform, the management of endpoints is achieved. Attached Figure Description

[0059] Figure 1 This is a flowchart illustrating the process of creating a service using related technologies;

[0060] Figure 2 This is a schematic diagram of an optional processing flow of the resource object management method provided in the embodiments of this application;

[0061] Figure 3 This is a schematic diagram of an optional processing flow provided in this application embodiment, which creates a resource object of a container composition associated with a container orchestration platform service based on the first daemon process corresponding to the first node.

[0062] Figure 4 This is a schematic diagram of an optional processing flow provided in this application embodiment, based on the first daemon process corresponding to the first node, to delete the resource object of the container combination associated with the container orchestration platform service;

[0063] Figure 5 This is a schematic diagram of an optional processing flow provided in this application embodiment, which modifies the resource object of the container combination associated with the container orchestration platform service based on the first daemon process corresponding to the first node;

[0064] Figure 6 This is a schematic diagram of an optional processing flow provided in this application embodiment, which queries the resource objects of the container composition associated with the container orchestration platform service based on the first daemon process corresponding to the first node.

[0065] Figure 7 This is a schematic diagram of an optional detailed processing flow of the resource object management method provided in the embodiments of this application;

[0066] Figure 8 This is a schematic diagram of an optional processing flow for determining whether the network of a Kubernetes service is valid, provided in an embodiment of this application.

[0067] Figure 9 This is a schematic diagram of the actual framework for the daemon process to poll and process received request events, provided in an embodiment of this application.

[0068] Figure 10This is a schematic diagram of the framework of the container orchestration platform service provided in the embodiments of this application;

[0069] Figure 11 This is a schematic diagram of an optional component structure of the resource object management device provided in an embodiment of this application;

[0070] Figure 12 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0071] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0072] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0073] In the following description, the terms "first," "second," and "third" are used merely to distinguish similar objects and do not represent a specific ordering of the objects. It is understood that "first," "second," and "third" may be interchanged in a specific order or sequence where permissible, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein. In the following description, the term "multiple" refers to at least two.

[0074] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0075] Before providing a more detailed description of the embodiments of this application, the process of creating a Kubernetes service in the prior art will be explained.

[0076] In multi-port pod scenarios, to separate the management plane from the business plane, a Calico network is typically used as the default management network for the pod, while other networks such as MacVlan or Sriov are used as the business network. Services provide services externally in nodePort mode, and associated backend resource objects (endpoints) are automatically created after the service is created. Related technologies provide a flowchart of the service creation process, such as... Figure 1 As shown, the Kubernetes system receives a service creation request and creates the service accordingly. It then checks for the existence of a running pod using a selector or other application methods. If no running pod is found, the service is not created, and the process ends. If a running pod is found, the service is created, and endpoints are created using the Calico network's Internet Protocol (IP) address as the endpoint's network address. These endpoints include the IP address and network port of the pod associated with the service. However, if the backend IP address of the endpoints uses the pod's default Calico network IP address, separation of the management plane and the business plane may not be achieved.

[0077] This application provides a resource object management method and apparatus that can separate the management surface from the roof, thereby enabling the management of endpoints.

[0078] A schematic diagram of an optional processing flow of the resource object management method provided in this application embodiment is shown below. Figure 2 As shown, it includes at least the following steps:

[0079] Step S101: Establish a daemon process for each node of the container orchestration platform.

[0080] In some alternative embodiments, the container orchestration platform can be a Kubernetes system. An ep-agent daemon can be established on each node of the container orchestration platform.

[0081] Step S102: Configure the network of the container orchestration platform service.

[0082] In some alternative embodiments, the network of the container orchestration platform service can be configured via a configuration file. Specifically, the network of the container orchestration platform service can be configured in the metadata.annotations section of the configuration file.

[0083] In practice, the service's network can be configured in the service's YAML file. Taking Kubernetes as an example, the command line corresponding to the service's YAML file can be as follows:

[0084]

[0085]

[0086] The line “annotations:k8s.v1.cni.cncf.io / networks:macvlan-conf-2” is used to configure the backend network of the service.

[0087] Step S103: In response to the network being valid for the configured container orchestration platform service, the resource objects of the container combination associated with the container orchestration platform service are managed based on the first daemon process corresponding to the first node.

[0088] In some embodiments, the first node can be any node in the container orchestration platform.

[0089] In some embodiments, the management of resource objects of container combinations associated with the container orchestration platform service based on the first daemon process corresponding to the first node includes at least one of the following (1) to (4):

[0090] (1) Based on the first daemon process corresponding to the first node, create a resource object of the container combination associated with the container orchestration platform service.

[0091] (2) Based on the first daemon process corresponding to the first node, delete the resource object of the container combination associated with the container orchestration platform service.

[0092] (3) Based on the first daemon process corresponding to the first node, modify the resource object of the container combination associated with the container orchestration platform service.

[0093] (4) Based on the first daemon process corresponding to the first node, query the resource objects of the container combination associated with the container orchestration platform service.

[0094] In some embodiments, managing the resource objects of the container portfolio associated with the container orchestration platform service can also be referred to as maintaining the lifecycle of the resource objects of the container portfolio associated with the container orchestration platform service.

[0095] In some embodiments, for (1), an optional processing flow is to create resource objects of container combinations associated with the container orchestration platform service based on the first daemon process corresponding to the first node, such as... Figure 3As shown, it includes at least the following steps:

[0096] Step 103a: The first daemon process receives the first event handling request.

[0097] In some optional embodiments, the first daemon process is ap-agent, which can receive the first event handling request sent by the client. The client can send the first event handling request via the ep-ctl command-line tool using Unix sockets. Compared to ordinary network sockets, sending the first event handling request via Unix sockets eliminates the need for complex data packaging and unpacking, verification and calculation, and avoids traversing the network protocol stack, thus ensuring security and reliability.

[0098] Step 103b: The first daemon process parses the first event handling request and builds a configuration file.

[0099] In some embodiments, the first daemon process can parse the "content" field in the Dispatcher to construct a configuration file. This configuration file can be a YAML file.

[0100] In some embodiments, the YAML file for creating container endpoints can be as follows:

[0101]

[0102] The yaml file can be stored in the / etc / ep-agent / directory. The command to create endpoints using the yaml file is: kubectl apply -f yaml-file.

[0103] In some embodiments, the command to create endpoints can be:

[0104] ep-ctl endpoints add--content

[0105] ' <endpoints name=”endpoints-name”type=”endpoints”namespace=”namespace”networks=”namespace / networks”protocol=”protocol”port=”port”>

[0106] <pod name=”pod-name1”type=“pod”namespace=”namespace” / >

[0107] <pod name=”pod-name2”type=“pod”namespace=”namespace” / >

[0108] <pod name=”pod-name3”type=“pod”namespace=”namespace” / >

[0109] ...

[0110] '.

[0111] Step 103c: The first daemon process creates a resource object of the container combination associated with the container orchestration platform service based on the configuration file.

[0112] In some embodiments, the first daemon process determines the command to create endpoints based on the configuration file, executes the command to create endpoints, and thus creates the endpoints.

[0113] In some embodiments, for (2), an optional processing flow for deleting the resource objects of the container composition associated with the container orchestration platform service based on the first daemon process corresponding to the first node is as follows: Figure 4 As shown, it includes at least the following steps:

[0114] Step 103d: The first daemon process receives the second event handling request.

[0115] In some optional embodiments, the first daemon process is ap-agent, which can receive second event handling requests sent by the client. The client can send the second event handling request via the ep-ctl command-line tool using Unix sockets. Compared to ordinary network sockets, sending the second event handling request via Unix sockets eliminates the need for complex data packaging and unpacking, verification and calculation, and avoids traversing the network protocol stack, thus ensuring security and reliability.

[0116] Step 103e: The first daemon parses the second event handling request and obtains the namespace and name of the resource object of the container composition associated with the container orchestration platform service.

[0117] In some embodiments, the first daemon can parse the “content” field in the Dispatcher to obtain the “namespace” and “name” of the endpoints.

[0118] Step 103f: The first daemon process constructs a deletion command based on the namespace and the name.

[0119] In some alternative embodiments, after obtaining the "namespace" and "name" of the endpoints, the first daemon deletes the endpoints by executing the kubectl command.

[0120] As an example, the format of the kubectl command can be: kubectl deleteendpoints -n namespaceendpoints-name.

[0121] The command to delete endpoints is: ep-ctl endpoints delete-content

[0122] '<endpoints name=”endpoints-name”type=”endpoints”namespace=”namespace”> '.

[0123] Step 103g: The first daemon executes a deletion command to delete the resource objects of the container composition associated with the container orchestration platform service.

[0124] In some embodiments, for (3), an optional processing flow is to modify the resource object of the container composition associated with the container orchestration platform service based on the first daemon process corresponding to the first node, such as... Figure 5 As shown, it includes at least the following steps:

[0125] In step 103h, the first daemon process receives the third event handling request.

[0126] In some optional embodiments, the first daemon process is ap-agent, which can receive third-party event handling requests sent by the client. The client can send the third-party event handling request via the ep-ctl command-line tool using Unix sockets. Compared to ordinary network sockets, sending third-party event handling requests via Unix sockets eliminates the need for complex data packaging and unpacking, verification and calculation, and avoids traversing the network protocol stack, thus ensuring security and reliability.

[0127] Step 103i: The first daemon parses the third event handling request and deletes the resource object of the container composition associated with the container orchestration platform service.

[0128] In some embodiments, the first daemon process can parse the "content" field in the Dispatcher to obtain the "namespace" and "name" of the endpoints. After obtaining the "namespace" and "name" of the endpoints, the first daemon process deletes the endpoints by executing the kubectl command.

[0129] As an example, the kubectl command can be: kubectl deleteendpoints -n namespaceendpoints-name.

[0130] Step 103j: The first daemon rebuilds the configuration file based on the third event handling request.

[0131] In some embodiments, the first daemon constructs a configuration file after parsing the "content" field in the thread scheduler (Dispatcher). This configuration file can be a YAML file.

[0132] In some embodiments, the YAML file for creating container endpoints can be as follows:

[0133]

[0134] The yaml file can be stored in the / etc / ep-agent / directory. The command to create endpoints using the yaml file is: kubectl apply -f yaml-file.

[0135] In step 103k, the first daemon creates resource objects for the container composition associated with the container orchestration platform service based on the rebuilt configuration file.

[0136] In some embodiments, the first daemon process determines the command to create endpoints based on the configuration file, executes the command to create endpoints, and thus creates the endpoints.

[0137] In some embodiments, for (4), an optional processing flow is to query the resource objects of the container composition associated with the container orchestration platform service based on the first daemon process corresponding to the first node, such as... Figure 6 As shown, it includes at least the following steps:

[0138] Step 1031: The first daemon process receives the fourth event handling request.

[0139] In some optional embodiments, the first daemon process is ap-agent, which can receive fourth event handling requests sent by the client. The client can send the fourth event handling request via the ep-ctl command-line tool using Unix sockets. Compared to ordinary network sockets, sending the fourth event handling request via Unix sockets eliminates the need for complex data packaging and unpacking, verification and calculation, and avoids traversing the network protocol stack, thus ensuring security and reliability.

[0140] Step 103m: The first daemon parses the fourth event handling request and obtains the namespace and name of the resource object of the container composition associated with the container orchestration platform service.

[0141] In some embodiments, the first daemon can parse the “content” field in the Dispatcher to obtain the “namespace” and “name” of the endpoints.

[0142] Step 103n: The first daemon process constructs a query command based on the namespace and the name.

[0143] In some embodiments, after obtaining the "namespace" and "name" of the endpoints, the first daemon constructs a query command. Specifically, the first daemon can query the endpoints by executing the kubectl command.

[0144] In some embodiments, the format of the kubectl command for querying endpoints can be:

[0145] kubectl getendpoints-n namespaceendpoints-name-ojson.

[0146] In some embodiments, the command to query endpoints can be:

[0147] ep-ctl endpoints delete–content

[0148] '<endpoints name=”endpoints-name”type=”endpoints”namespace=”namespace”> '.

[0149] Step 103o: The first daemon process queries the resource objects of the container composition associated with the container orchestration platform service based on the query command, and obtains the query results.

[0150] In some embodiments, after obtaining the query results, the first daemon parses the query results and reassembles the endpoints based on the parsed query results.

[0151] A schematic diagram illustrating an optional detailed processing flow of the resource object management method provided in this application embodiment is shown below. Figure 7 As shown, it may include at least the following steps:

[0152] Step S201: Create a daemon process for each node of the k8s system.

[0153] In some alternative implementations, an ep-agent daemon can be established on each node of the Kubernetes system.

[0154] Step S202: Configure the network of the Kubernetes system.

[0155] In some alternative implementations, the network for the Kubernetes service can be configured via a configuration file.

[0156] In practice, the backend service network of the service can be configured in the service's YAML file.

[0157] In some embodiments, the process of configuring the network of the Kubernetes system is the same as step S102, and will not be described again here.

[0158] Step S203: Receive a request to create a Kubernetes service.

[0159] In some embodiments, ap-agent can receive a first event handling request sent by a client. The client can send the first event handling request via the ep-ctl command-line tool using unixsocker.

[0160] Step S204: Create the Kubernetes service.

[0161] Step S205: Determine if a running pod exists.

[0162] In some embodiments, a running pod can be checked using a tag selector; if a running pod exists, step S206 is executed. If no running pod exists, endpoints are not created, and the process ends.

[0163] Step S206: Determine if the network of the k8s service is valid.

[0164] In some embodiments, if the network of the k8s service is determined to be valid, step S207 is executed; if the network of the k8s service is determined to be invalid, a resource management object is created using the default calico network.

[0165] In some embodiments, an optional process for determining whether the network of a Kubernetes service is valid is as follows: Figure 8 As shown, it includes at least the following steps:

[0166] Step S301: Determine whether the pod's network corresponds to the network of the Kubernetes service.

[0167] In some embodiments, the network IP of the Kubernetes service can be read through the "metadata.annotations.k8s.v1.cni.cncf.io / networks" field in the Kubernetes service's YAML file. A selector can be used to check if the pod contains the Kubernetes service's network IP. If the pod does, it confirms that the pod's network corresponds to the Kubernetes service's network.

[0168] Step S302: If the pod's network corresponds to the network of the Kubernetes service, then the network of the Kubernetes service is determined to be valid.

[0169] In step S207, the daemon process creates a resource management object using the configured network of the Kubernetes system.

[0170] Step S208: The daemon process polls and processes the received request events.

[0171] In some alternative embodiments, the request event can be any one or more of creating endpoints, deleting endpoints, modifying endpoints, and querying endpoints.

[0172] In practical implementation, the processing flow for request events such as creating endpoints, deleting endpoints, modifying endpoints, and querying endpoints is as follows: Figures 3 to 6 The processing flow shown is the same, so it will not be repeated here.

[0173] In some embodiments, a schematic diagram of the daemon polling and processing received request events is shown, such as... Figure 9As shown: The controller (ep-ctl) sends request events via Unix sockets; the event poller within the ep-agent receives the request events and sends them to the event dispatcher. The event dispatcher distributes the request events to the corresponding endpoints: if the request event is a creation event, it is sent to the create endpoints; if the request event is a delete event, it is sent to the delete endpoints; if the request event is a modification event, it is sent to the update endpoints; and if the request event is a query event, it is sent to the get endpoints.

[0174] based on Figures 2 to 9 The resource object management method shown is a schematic diagram of the framework of the container orchestration platform service provided in this application embodiment. Figure 10 As shown: The client initiates a request event through the switch; the host, server 1, and server 2 each establish their corresponding ep-agent. The ep-agent controls the transmission of business-plane request events through port eth1 and management-plane request events through port eth0.

[0175] The resource object management method provided in this application, in multi-network interface scenarios, supports configuring the network of the container orchestration platform service and separates the business plane and management plane through the daemon process corresponding to each node on the container orchestration platform, thereby achieving endpoint management. Specifically, the network of the container orchestration platform service can be configured by calling the ep-ctl interface, requiring minimal changes to the source code of the container orchestration platform service, thus reducing the maintenance cost of the container orchestration platform.

[0176] This application also provides a resource object management device, and a schematic diagram of an optional component structure of the resource object management device is shown below. Figure 11 Shown, including:

[0177] Module 401 is established to create a daemon process for each node of the container orchestration platform.

[0178] Configuration module 402 is used to configure the network of the container orchestration platform service;

[0179] The management module 403 is used to manage the resource objects of the container combination associated with the container orchestration platform service in response to the network validity of the configured container orchestration platform service, based on the first daemon process corresponding to the first node.

[0180] In some embodiments, the resource object management apparatus further includes:

[0181] Processing module ( Figure 11 (not shown in the image), used to determine whether the network of the container combination corresponds to the network of the orchestration platform service;

[0182] If the network of the container assembly corresponds to the network of the orchestration platform service, then the network corresponding to the configured container orchestration platform service is determined to be valid.

[0183] In some embodiments, the management module 403 is configured to perform at least one of the following:

[0184] Based on the first daemon process corresponding to the first node, a resource object of the container composition associated with the container orchestration platform service is created;

[0185] Based on the first daemon process corresponding to the first node, delete the resource object of the container combination associated with the container orchestration platform service;

[0186] Based on the first daemon process corresponding to the first node, modify the resource object of the container composition associated with the container orchestration platform service;

[0187] Based on the first daemon process corresponding to the first node, query

[0188] In some embodiments, the resource management module 403 includes a first daemon process, which receives a first event processing request;

[0189] Parse the first event handling request and construct the configuration file;

[0190] Based on the configuration file, resource objects for the container composition associated with the container orchestration platform service are created.

[0191] In some embodiments, the resource management module 403 includes a first daemon process, which receives a third event processing request;

[0192] Parse the third event handling request and delete the resource object of the container composition associated with the container orchestration platform service;

[0193] Rebuild the configuration file based on the third event handling request;

[0194] Resource objects for the container composition associated with the container orchestration platform service are created based on the rebuilt configuration file.

[0195] In some embodiments, the resource management module 403 includes a first daemon process, which receives a fourth event processing request;

[0196] Parse the fourth event handling request to obtain the namespace and name of the resource object of the container composition associated with the container orchestration platform service;

[0197] Build a query command based on the namespace and the name;

[0198] Based on the query command, query the resource objects of the container combination associated with the container orchestration platform service to obtain the query results.

[0199] This application provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the resource object management method described above in this application.

[0200] As an example, executable instructions can be deployed to execute on a single computing device, or on multiple computing devices located in one location, or on multiple computing devices distributed across multiple locations and interconnected via a communication network.

[0201] Figure 12 A schematic block diagram of an example electronic device 800 that can be used to implement embodiments of the present disclosure is shown. In some alternative embodiments, the electronic device 800 may be a terminal device or a server. In some alternative embodiments, the electronic device 800 may implement the resource object management method provided in the embodiments of this application by running a computer program. For example, the computer program may be a native program or software module in an operating system; it may be a native application (APP), i.e., a program that needs to be installed in the operating system to run; it may be an applet, i.e., a program that only needs to be downloaded to a browser environment to run; or it may be an applet that can be embedded in any APP. In summary, the above-mentioned computer program may be any form of application, module, or plugin.

[0202] In practical applications, electronic device 800 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. Cloud technology refers to a hosting technology that unifies hardware, software, and network resources within a wide area network (WAN) or local area network (LAN) to achieve data computation, storage, processing, and sharing. Electronic device 800 can be a smartphone, tablet, laptop, desktop computer, smart speaker, smart TV, smartwatch, etc., but is not limited to these.

[0203] Electronic devices are intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, in-vehicle terminals, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0204] like Figure 12 As shown, the electronic device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. The RAM 803 may also store various programs and data required for the operation of the electronic device 800. The computing unit 801, ROM 802, and RAM 803 are interconnected via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0205] Multiple components in electronic device 800 are connected to I / O interface 805, including: input unit 806, such as keyboard, mouse, etc.; output unit 807, such as various types of displays, speakers, etc.; storage unit 808, such as disk, optical disk, etc.; and communication unit 809, such as network card, modem, wireless transceiver, etc. Communication unit 809 allows electronic device 800 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0206] The computing unit 801 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs the various methods and processes described above, such as resource object management methods. For example, in some alternative embodiments, the resource object management method can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 808. In some alternative embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by the computing unit 801, one or more steps of the resource object management method described above can be performed. Alternatively, in other embodiments, the computing unit 801 can be configured as a resource object management method by any other suitable means (e.g., by means of firmware).

[0207] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0208] The program code used to implement the resource object management method of this disclosure can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0209] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0210] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0211] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0212] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.

[0213] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0214] The above are merely embodiments of this application and are not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.

Claims

1. A method for managing resource objects, the method comprising: A separate daemon process is created for each node of the container orchestration platform; Configure the network for the container orchestration platform service; Determine whether the network of the orchestration platform service corresponds to the network of the container combination associated with the container orchestration platform service; wherein, the correspondence between the network of the orchestration platform service and the network of the container combination associated with the container orchestration platform service is: the container combination has the network IP of the orchestration platform service; If the network of the container assembly corresponds to the network of the orchestration platform service, then the network configured for the container orchestration platform service is determined to be valid. In response to the network availability of the configured container orchestration platform service, the resource objects of the container combination are managed based on the first daemon process corresponding to the first node.

2. The method according to claim 1, wherein managing the resource objects of the container composition associated with the container orchestration platform service based on the first daemon process corresponding to the first node includes at least one of the following: Based on the first daemon process corresponding to the first node, a resource object of the container composition associated with the container orchestration platform service is created; Based on the first daemon process corresponding to the first node, delete the resource object of the container combination associated with the container orchestration platform service; Based on the first daemon process corresponding to the first node, modify the resource object of the container composition associated with the container orchestration platform service; Based on the first daemon process corresponding to the first node, query the resource objects of the container combination associated with the container orchestration platform service.

3. The method according to claim 2, wherein creating a resource object for the container composition associated with the container orchestration platform service based on the first daemon process corresponding to the first node includes: The first daemon process receives the first event handling request; Parse the first event handling request and construct the configuration file; Based on the configuration file, resource objects for the container composition associated with the container orchestration platform service are created.

4. The method according to claim 2, wherein deleting the resource object of the container composition associated with the container orchestration platform service based on the first daemon process corresponding to the first node includes: The first daemon process receives the second event handling request; Parse the second event handling request to obtain the namespace and name of the resource object of the container composition associated with the container orchestration platform service; The first daemon process constructs a deletion command based on the namespace and the name; The first daemon executes the deletion command to delete the resource object of the container composition associated with the container orchestration platform service.

5. The method according to claim 2, wherein modifying the resource object of the container composition associated with the container orchestration platform service based on the first daemon process corresponding to the first node includes: The first daemon process receives a third event handling request; Parse the third event handling request and delete the resource object of the container composition associated with the container orchestration platform service; Rebuild the configuration file based on the third event handling request; Resource objects for the container composition associated with the container orchestration platform service are created based on the rebuilt configuration file.

6. The method according to claim 2, wherein querying the resource object of the container composition associated with the container orchestration platform service based on the first daemon process corresponding to the first node includes: The first daemon process receives the fourth event handling request; Parse the fourth event handling request to obtain the namespace and name of the resource object of the container composition associated with the container orchestration platform service; Query commands are constructed based on the namespace and the name; Based on the query command, query the resource objects of the container combination associated with the container orchestration platform service to obtain the query results.

7. A resource object management device, the device comprising: A module is created to establish a daemon process for each node of the container orchestration platform. The configuration module is used to configure the network of the container orchestration platform service; The processing module is used to determine whether the network of the container combination corresponds to the network of the orchestration platform service; wherein, the correspondence between the network of the orchestration platform service and the network of the container combination associated with the container orchestration platform service is: the container combination has the network IP of the orchestration platform service; If the network of the container assembly corresponds to the network of the orchestration platform service, then the network corresponding to the configured container orchestration platform service is determined to be valid. The management module is used to manage the resource objects of the container combination associated with the container orchestration platform service in response to the network availability of the configured container orchestration platform service, based on the first daemon process corresponding to the first node.

8. The resource object management apparatus according to claim 7, wherein the management module is configured to perform at least one of the following: Based on the first daemon process corresponding to the first node, a resource object of the container composition associated with the container orchestration platform service is created; Based on the first daemon process corresponding to the first node, delete the resource object of the container combination associated with the container orchestration platform service; Based on the first daemon process corresponding to the first node, modify the resource object of the container composition associated with the container orchestration platform service; Based on the first daemon process corresponding to the first node, query the resource objects of the container combination associated with the container orchestration platform service.

Citation Information

Patent Citations

  • Container cluster resource monitoring method, device and system

    CN112162821A

  • Container orchestration engine resource management method and device, readable medium and electronic equipment

    CN112417051A