Method, device and equipment for automatically controlling K8s cluster node to enter and exit from pool

By automating the control of K8s cluster node entry and exit from the pool, and employing pre- and post-checking rules to ensure that nodes meet the conditions before execution, the problem of low efficiency and high risk in node entry and exit from the pool in Kubernetes clusters is solved, and efficient and secure node management is achieved.

CN121125501APending Publication Date: 2025-12-12FENGLING CHUANGJING (BEIJING) TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511219658.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-28
Publication Date
2025-12-12

AI Technical Summary

Technical Problem

In Kubernetes clusters, node addition and removal from the pool rely on manual or semi-automatic methods, which are inefficient and risky. The lack of effective automated processing and node verification leads to a high risk of abnormal nodes being added to the pool.

Method used

By using automated control methods, the system employs pre-processing detection rules to verify whether the nodes to be processed meet the basic operating conditions of the K8s cluster, performs corresponding component installation or uninstallation operations, and ensures the reliability of the node status through post-processing detection rules, thereby achieving automated processing of nodes entering and leaving the pool.

Benefits of technology

It improves the efficiency of node entry and exit from the pool, reduces the risk of manual operation, enhances the stability and security of the K8s cluster, ensures node configuration consistency, and eliminates the problem of nodes being falsely ready.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121125501A_ABST
    Figure CN121125501A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to the technical field of cluster capacity expansion and contraction, and discloses a method, device and equipment for automatically controlling K8s cluster nodes to enter and exit from a pool, and the method comprises the steps: obtaining to-be-processed nodes comprising node information and pool entering and exiting operation information; determining the to-be-processed node as a node meeting the basic operation condition of the K8s cluster node based on a pre-detection rule; obtaining a to-be-processed component and a processing mode based on the pool access operation information; processing the to-be-processed component on the to-be-processed node based on the processing mode to obtain an updated to-be-processed node; and determining the to-be-processed node as a node meeting an execution condition required for executing the operation corresponding to the pool entry and exit operation information based on a post-detection rule, and executing the operation corresponding to the pool entry and exit operation information. Ensuring that only compliant nodes to be processed can be used as nodes of the K8s cluster through pre-detection; and the problem of false readiness of the nodes is avoided by utilizing post-detection. And after multiple verification is passed, the node out-of-pool or in-pool operation is automatically executed, and low-risk and high-efficiency node out-of-pool or in-pool operation is realized.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The embodiment of the application relates to the technical field of cluster expansion and contraction, in particular to a method, device and equipment for automatically controlling K8s cluster node in and out of a pool. BACKGROUND

[0002] With the rapid development of cloud computing and containerization technology, Kubernetes has become the core platform of modern resource management and is widely used in unified scheduling and automatic operation and maintenance of various infrastructures. Especially in the management scene of bare metal servers, by pooling physical servers into a unified computing resource pool and realizing centralized scheduling and dispatching by Kubernetes, the resource utilization and operation and maintenance efficiency are significantly improved. However, in the prior art, the node in-pool and node out-pool of the Kubernetes cluster are completed by relying on manual or semi-automatic script mode, and the node in-pool and node out-pool lack automatic processing mode and manual operation is prone to error operation, so that the efficiency of the node in-pool and node out-pool is low and the risk is high. In addition, the node in-pool and node out-pool of the Kubernetes cluster lack node verification, and abnormal nodes are prone to enter the pool, which may cause high risk of the Kubernetes cluster. Therefore, it is known that the efficiency of the node in-pool and node out-pool of the Kubernetes cluster in the prior art is low and the risk is high. SUMMARY

[0003] The purpose of the application is to at least provide a method, device and equipment for automatically controlling K8s cluster node in and out of a pool, which can at least solve the technical problems of low efficiency and high risk of node in-pool and node out-pool of the Kubernetes cluster, and at least achieve the technical effects of improving the efficiency of node in-pool and node out-pool of the Kubernetes cluster and reducing the risk.

[0004] To solve the above technical problems, at least one embodiment of the application provides a method for automatically controlling K8s cluster node in and out of a pool, comprising: acquiring a to-be-processed node, the to-be-processed node comprising node information and in-pool and out-pool operation information; verifying the to-be-processed node based on a pre-checking rule to determine that the to-be-processed node is a node meeting the basic operation condition of the K8s cluster node; acquiring at least one to-be-processed component and a processing mode based on the in-pool and out-pool operation information; processing at least one to-be-processed component on the to-be-processed node based on the processing mode to obtain an updated to-be-processed node; verifying the to-be-processed node based on a post-checking rule to determine that the to-be-processed node is a node meeting the execution condition required for executing the operation corresponding to the in-pool and out-pool operation information, and executing the operation corresponding to the in-pool and out-pool operation information.

[0005] The scheme ensures that only compliant to-be-processed nodes can be nodes of the K8s cluster through pre-detection, avoids adding to-be-processed nodes that do not meet the requirements of K8s cluster nodes into the K8s cluster, thereby causing cluster failure, avoids risks caused by human judgment errors, and improves the security of the K8s cluster; and the to-be-processed components are automatically executed to automatically install or clean up the to-be-processed components, eliminate manual operation deviations, ensure that the to-be-processed nodes are consistent with the K8s cluster node configuration, and achieve efficient and replicable node management; the post-detection is used to ensure that the node state is real and reliable, and to eliminate the problem of false readiness of the node. Then, after multiple verifications, the to-be-processed node is automatically executed to exit or enter the pool, which greatly improves the stability and security of the K8s cluster, and the pre-detection, post-detection, and node exit / entry pool processing are automatically performed, which reduces the risk of manual operation, improves the efficiency of node exit / entry pool, and realizes low-risk and high-efficiency node exit / entry pool.

[0006] In some examples, if the exit / entry pool operation information corresponds to an entry pool operation, the to-be-processed node is verified based on pre-detection rules to determine that the to-be-processed node is a node that meets the basic operation conditions of the K8s cluster node, including: performing mounting detection on the to-be-processed node, if the to-be-processed node has been correctly mounted, it is considered to pass the mounting detection; performing hostname detection on the to-be-processed node, if the hostname of the to-be-processed node meets the preset naming specification, it is considered to pass the hostname detection; performing network card configuration detection on the to-be-processed node to determine that the network card configuration of the to-be-processed node is the preset network card configuration, it is considered to pass the network card configuration detection; performing directory permission detection on the to-be-processed node to determine that the directory permission of the to-be-processed node meets the preset permission specification, it is considered to pass the directory permission detection; performing kernel parameter detection on the to-be-processed node to determine that the kernel parameter of the to-be-processed node meets the operation requirements of the K8s cluster node, it is considered to pass the kernel parameter detection; and the to-be-processed node that passes the mounting detection, the hostname detection, the network card configuration detection, the directory permission detection, and the kernel parameter detection is considered to be a node that meets the basic operation conditions of the K8s cluster node.

[0007] In some examples, if the in-out pool operation information corresponds to an out-pool operation, the to-be-processed node is checked based on a pre-detection rule to determine that the to-be-processed node is a node that meets the basic operation condition of the K8s cluster node, including: performing scheduling state detection on the to-be-processed node, if the scheduling state of the to-be-processed node is an unschedulable state, it is considered to pass the scheduling state detection; performing business class Pod detection on the to-be-processed node, if the to-be-processed node does not exist business Pod, it is considered to pass the business class Pod detection; performing non-business class Pod detection on the to-be-processed node, if the to-be-processed node exists non-business Pod, it is considered that the to-be-processed node is in the normal service period and belongs to the out-pool node, and it is considered to pass the non-business class Pod detection; the to-be-processed node that passes the state detection, the business class Pod detection and the non-business class Pod detection is considered to meet the basic operation condition of the K8s cluster node.

[0008] In some examples, if the in-out pool operation information corresponds to an in-pool operation, the at least one to-be-processed component is a necessary component of the K8s cluster node, and the processing mode is installation, then on the to-be-processed node, at least one to-be-processed component is processed based on the processing mode to obtain an updated to-be-processed node, including: installing at least one to-be-processed component on the to-be-processed node to obtain an updated to-be-processed node, wherein the updated to-be-processed node contains a necessary component of the K8s cluster node.

[0009] In some examples, if the in-out pool operation information corresponds to an out-pool operation, the at least one to-be-processed component is a necessary component of the K8s cluster node and a service running on the to-be-processed node, and the processing mode is uninstallation, then on the to-be-processed node, at least one to-be-processed component is processed based on the processing mode to obtain an updated to-be-processed node, including: uninstalling or stopping at least one to-be-processed component on the to-be-processed node to obtain an updated to-be-processed node, wherein the updated to-be-processed node has completed the uninstallation of the necessary component, and no service is in a running state.

[0010] In some examples, if the in-out pool operation information corresponds to an in-pool operation, the to-be-processed node is checked based on a post-detection rule to determine whether the to-be-processed node meets an execution condition required for performing an operation corresponding to the in-out pool operation information, including: performing node state detection on the to-be-processed node, and if the to-be-processed node is in a preparation state, the node state detection is passed; performing basic Daemonset installation detection on the to-be-processed node, and if the to-be-processed node has installed the basic Daemonset, the basic Daemonset installation detection is passed; and the to-be-processed node that passes the node state detection and the basic Daemonset installation detection is regarded as a node that meets the execution condition required for performing the operation corresponding to the in-out pool operation information.

[0011] In some examples, if the in-out pool operation information corresponds to an out-pool operation, the to-be-processed node is checked based on a post-detection rule to determine whether the to-be-processed node meets an execution condition required for performing an operation corresponding to the in-out pool operation information, including: performing node resource detection on the to-be-processed node, and if the to-be-processed node does not have node resources, the to-be-processed node is regarded as a node that meets the execution condition required for performing the operation corresponding to the in-out pool operation information.

[0012] At least one embodiment of the present application also provides a device for automatically controlling K8s cluster node in-out pool, including: an obtaining unit configured to obtain a to-be-processed node, the to-be-processed node including node information and in-out pool operation information; a determining unit configured to check the to-be-processed node based on a pre-detection rule to determine whether the to-be-processed node meets a basic running condition of a K8s cluster node; the obtaining unit is further configured to obtain at least one to-be-processed component and a processing mode based on the in-out pool operation information; the determining unit is further configured to process at least one to-be-processed component based on the processing mode on the to-be-processed node to obtain an updated to-be-processed node; and the determining unit is further configured to check the to-be-processed node based on a post-detection rule to determine whether the to-be-processed node meets an execution condition required for performing an operation corresponding to the in-out pool operation information, and perform the operation corresponding to the in-out pool operation information.

[0013] At least one embodiment of the present application also provides an electronic device, including: at least one processor; and a memory communicatively connected with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the above-mentioned method for automatically controlling K8s cluster node in-out pool.

[0014] At least one embodiment of the present application also provides a computer readable storage medium storing a computer program, the computer program being executed by a processor to implement the above-mentioned method for automatically controlling K8s cluster node to enter or exit a pool. BRIEF DESCRIPTION OF DRAWINGS

[0015] One or more embodiments are illustrated by way of example in the drawings in which are shown in schematic illustrations of specific embodiments. These embodiments are presented by way of example only, and are not intended to limit the scope of the embodiments.

[0016] Figure 1 is a flowchart of a method for automatically controlling K8s cluster node to enter or exit a pool according to an embodiment of the present application;

[0017] Figure 2 is a schematic diagram of automatically controlling K8s cluster node to enter a pool according to an embodiment of the present application;

[0018] Figure 3 is a schematic diagram of automatically controlling K8s cluster node to exit a pool according to another embodiment of the present application;

[0019] Figure 4 is a schematic diagram of recording automatically controlling K8s cluster node to enter or exit a pool according to another embodiment of the present application;

[0020] Figure 5 is a schematic diagram of a device for automatically controlling K8s cluster node to enter or exit a pool according to another embodiment of the present application;

[0021] Figure 6 is a structural schematic diagram of an electronic device according to another embodiment of the present application. DETAILED DESCRIPTION

[0022] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the embodiments of the present application will be described in detail below with reference to the drawings. However, those skilled in the art can understand that, in the embodiments of the present application, many technical details are presented in order to make the readers better understand the present application. However, the technical solutions claimed by the present application can be implemented even without these technical details and based on various changes and modifications of the following embodiments. The following embodiments are classified for the convenience of description, and should not constitute any limitation on the specific implementation of the present application, and the embodiments can be combined and referenced with each other without contradiction.

[0023] It should be noted that the obtaining or use of data in the embodiments of the present application needs to be agreed by the user, and the relevant data can be obtained only after the user's authorization and permission, and the obtaining or use of data complies with the relevant legal regulations.

[0024] For the convenience of understanding the embodiments of the present application, the related content about the method for automatically controlling the entry and exit of K8s cluster nodes into the pool is introduced first.

[0025] With the rapid development of cloud computing and containerization technology, Kubernetes has become the core platform of modern resource management and is widely used in unified scheduling and automated operation of various infrastructures. Especially in the management of bare metal servers, by pooling physical servers into a unified computing resource pool and implementing centralized orchestration and scheduling by Kubernetes, the resource utilization and operation efficiency are significantly improved. However, in the prior art, the entry and exit of nodes into the pool in the Kubernetes cluster is completed by relying on manual or semi-automated scripts, and the entry and exit of nodes into the pool lacks automated processing methods and manual operations are prone to errors, so the efficiency of the entry and exit of nodes into the pool is low and the risk is high. In addition, the entry and exit of nodes into the pool in the Kubernetes cluster lacks node verification, which is prone to abnormal node entry into the pool and is prone to high risk of the Kubernetes cluster. Therefore, it can be known that the efficiency of the entry and exit of nodes into the pool in the Kubernetes cluster in the prior art is low and the risk is high.

[0026] In order to solve the technical problems of low efficiency and high risk of the entry and exit of nodes into the pool in the Kubernetes cluster, the present application proposes a method for automatically controlling the entry and exit of K8s cluster nodes into the pool. The implementation details of the method for automatically controlling the entry and exit of K8s cluster nodes into the pool in the present embodiment will be specifically described below. The following content is only provided for the implementation details for the convenience of understanding and is not necessary for implementing the present solution.

[0027] Embodiment one:

[0028] The method for automatically controlling the entry and exit of K8s cluster nodes into the pool in the present embodiment can be applied to electronic devices with communication, computing and data storage capabilities. The specific process can be as shown in Figure 1 , which includes:

[0029] Step 110, acquiring a to-be-processed node, the to-be-processed node including node information and entry and exit pool operation information.

[0030] The to-be-processed node refers to a node that needs to perform an entry operation or an exit operation. The entry operation refers to adding the to-be-processed node to the K8s cluster, and the exit operation refers to removing the to-be-processed node from the K8s cluster. The node information includes the name of the to-be-processed node (i.e. the unique identifier of the to-be-processed node), the hardware information of the node (such as the model of the node), the hardware resource information, the IP address of the node, the cluster information corresponding to the node, etc. The information required for joining the K8s cluster. The entry and exit pool operation information is used to indicate whether the to-be-processed node is to be added to the K8s cluster or removed from the K8s cluster.

[0031] Step 120, checking the to-be-processed node based on the pre-check rule to determine whether the to-be-processed node is a node that meets the basic running condition of the K8s cluster node.

[0032] The pre-check rule is used to determine whether the to-be-processed node is a node that meets the basic running condition of the K8s cluster node. For a to-be-processed node that does not meet the condition, no subsequent operation is performed, and the to-be-processed node is marked as a node that does not meet the K8s cluster. For example, if the to-be-processed node is a node that joins the K8s cluster, the result of the check based on the pre-check rule is that the check fails, and the to-be-processed node is marked as a node that cannot join the K8s cluster, and the to-be-processed node is rejected to join the K8s cluster. If the to-be-processed node is a node removed from the K8s cluster, the result of the check based on the pre-check rule is that the check fails, and the to-be-processed node is marked as a node that cannot be removed from the K8s cluster, and the to-be-processed node is rejected to be removed from the K8s cluster.

[0033] Step 130, obtaining at least one to-be-processed component and a processing method based on the in-out pool operation information.

[0034] The to-be-processed component refers to the basic software that needs to be installed on the to-be-processed node to join the K8s cluster as a K8s cluster node. For example, the to-be-processed component includes runc, containerd, kubelet, cni, and other essential components. Runc is a container runtime underlying engine responsible for creating and running containers, containerd is a container runtime management service for managing images and container life cycles (communicating with kubelet through CRI interface), kubelet is a K8s node agent responsible for communicating with the api server, managing Pods and containers, and cni is a plug-in for implementing a Pod network model to provide cross-node communication capabilities. The to-be-processed component can also include services running on the node. The to-be-processed method includes installation and uninstallation.

[0035] Step 140, processing at least one to-be-processed component on the to-be-processed node based on the processing method to obtain an updated to-be-processed node.

[0036] Step 150, checking the to-be-processed node based on the post-check rule to determine whether the to-be-processed node is a node that meets the execution condition required to execute the operation corresponding to the in-out pool operation information, and executing the operation corresponding to the in-out pool operation information.

[0037] The post-check rule is used to determine whether the to-be-processed node has done the correct work of out-pooling or in-pooling, and whether it can perform the out-pooling or in-pooling operation.

[0038] Therefore, the scheme significantly reduces the operation risk and improves the operation and maintenance efficiency through the standardized and automated node in-out pool management process. The pre-detection ensures that only the compliant to-be-processed node can be used as a node of the K8s cluster, avoiding the addition of the to-be-processed node that does not meet the K8s cluster node to the K8s cluster, thereby causing cluster failure, avoiding the risk caused by human judgment errors, and improving the security of the K8s cluster. The automatic execution of the to-be-processed component realizes automatic installation or cleaning of the to-be-processed component, eliminates manual operation deviation, ensures the consistency of the to-be-processed node and the K8s cluster node configuration, and realizes efficient and replicable node management. The post-detection ensures the authenticity and reliability of the node state and eliminates the node false readiness problem. Then, after multiple verifications, the to-be-processed node is executed for the in-out pool operation, greatly improving the stability and security of the K8s cluster. The pre-detection, post-detection, and node in-out pool processing are automatically performed, reducing the risk of manual operation, improving the efficiency of the node in-out pool, and realizing low-risk and high-efficiency node in-out pool.

[0039] The detailed content of the K8s cluster node in-pool can be referred to optional embodiment one, and the detailed content of the K8s cluster node out-pool can be referred to optional embodiment two.

[0040] In optional embodiment one, if the in-out pool operation information corresponds to the in-pool operation, the pre-step 120, the to-be-processed node is verified based on the pre-detection rule to determine that the to-be-processed node is a node that meets the basic operation condition of the K8s cluster node, including: the to-be-processed node is subjected to a mounting detection, if the to-be-processed node has been correctly mounted, it is considered to pass the mounting detection; the to-be-processed node is subjected to a hostname detection, if the hostname of the to-be-processed node meets the preset naming specification, it is considered to pass the hostname detection; the to-be-processed node is subjected to a network card configuration detection, the network card configuration of the to-be-processed node is determined to be the preset network card configuration, and it is considered to pass the network card configuration detection; the to-be-processed node is subjected to a directory permission detection, the directory permission of the to-be-processed node is determined to meet the preset permission specification, and it is considered to pass the directory permission detection; the to-be-processed node is subjected to a kernel parameter detection, the kernel parameter of the to-be-processed node is determined to meet the operation requirement of the K8s cluster node, and it is considered to pass the kernel parameter detection; the to-be-processed node that passes the mounting detection, the hostname detection, the network card configuration detection, the directory permission detection, and the kernel parameter detection is considered to be a node that meets the basic operation condition of the K8s cluster node.

[0041] The mounting detection (i.e., machine disk mounting detection) is used to detect whether the key file system of the to-be-processed node is correctly mounted, including whether the key file system is correctly mounted, whether the mounting path exists, whether the file system type is compatible, whether the mounting option is reasonable, whether the disk space meets the minimum requirement, and whether there is repeated or conflicting mounting, which can prevent the to-be-processed node (i.e., machine) from mounting errors. The hostname detection can determine whether the hostname of the to-be-processed node meets the naming specification of the K8s cluster node, which can prevent potential problems caused by the non-standard hostname of the to-be-processed node from being correctly recognized by the K8s cluster. The network card configuration detection can ensure that the configuration of the to-be-processed node is consistent with the K8s cluster, which meets the preset network card configuration in the K8s cluster, and avoids the problem of network packet loss caused by the diff of the to-be-processed node. The directory permission detection is used to check the access permission of the key directory in the to-be-processed node, to ensure that the access permission of the key directory can allow the installation of the basic software (i.e., to-be-processed component). The kernel parameter detection is used to detect the kernel parameter routing forwarding of the to-be-processed node, i.e., to determine whether the to-be-processed node enables the IP forwarding function.

[0042] Specifically, if it is detected that the key file system of the to-be-processed node is correctly mounted (i.e., the mounting path exists, the file system type is compatible, the mounting option is reasonable, the disk space meets the minimum requirement, and there is no repeated or conflicting mounting, which is regarded as that the key file system is correctly mounted), the hostname of the to-be-processed node meets the naming specification of the K8s cluster node, the configuration of the to-be-processed node is consistent with the K8s cluster, the access permission of the key directory in the to-be-processed node can allow the installation of the basic software, and the to-be-processed node enables the IP forwarding function, it is regarded that the to-be-processed node is a node that meets the basic running conditions of the K8s cluster node.

[0043] Specifically, before the to-be-processed node is checked based on the pre-checking rule, the method further includes: approving the to-be-processed node, and if the approval is passed, checking the to-be-processed node based on the pre-checking rule.

[0044] Specifically, if the in-out pool operation information corresponds to an in-pool operation, the at least one to-be-processed component is a necessary component of the K8s cluster node, and the processing mode is installation, the step 140 of processing at least one to-be-processed component on the to-be-processed node based on the processing mode to obtain an updated to-be-processed node includes: installing at least one to-be-processed component on the to-be-processed node to obtain an updated to-be-processed node, wherein the updated to-be-processed node contains a necessary component of the K8s cluster node.

[0045] The to-be-processed component refers to the basic software that needs to be installed on the to-be-processed node for joining the to-be-processed node into the K8s cluster as a K8s cluster node. Exemplarily, the to-be-processed component includes runc, containerd, kubelet, cni and other essential components.

[0046] Specifically, after installing at least one to-be-processed component on the to-be-processed node to obtain an updated to-be-processed node, the method further includes setting the to-be-processed node as an unschedulable node and adding a business tag to the to-be-processed node according to a business requirement. The business tag can be used to identify the attributes, roles, topology information and the like of the to-be-processed node.

[0047] Specifically, if the in-out pool operation information corresponds to an in-pool operation, in the step 150, the to-be-processed node is checked based on the post-detection rule to determine whether the to-be-processed node meets the execution condition required for performing the operation corresponding to the in-out pool operation information, including: performing node state detection on the to-be-processed node, and if the to-be-processed node is in a ready state, it is considered that the node state detection is passed; performing basic Daemonset installation detection on the to-be-processed node, and if the to-be-processed node has installed the basic Daemonset, it is considered that the basic Daemonset installation detection is passed; and the to-be-processed node that passes the node state detection and the basic Daemonset installation detection is considered to meet the execution condition required for performing the operation corresponding to the in-out pool operation information.

[0048] The to-be-processed node in the ready state refers to a to-be-processed node that has not joined the K8s cluster but has made preparations to become a K8s cluster node. The basic Daemonset refers to a type of key system-level DaemonSet deployed in the K8s cluster, which is used to ensure that each node (especially a newly joined node) runs certain essential system components to determine whether the to-be-processed node has the load capacity to actually run work.

[0049] Exemplarily, when it is detected that the to-be-processed node that has not joined the K8s cluster is in the ready state and the to-be-processed node has installed the basic Daemonset, it is considered that the to-be-processed node can join the K8s cluster; and the operation of joining the to-be-processed node into the K8s cluster is performed to make the to-be-processed node become a K8s cluster node.

[0050] Exemplarily, refer to Figure 2If the to-be-processed node is a node that needs to be added to the K8s cluster, the pool-in initiator (the initiator of the to-be-processed node) initiates a node pool-in expansion form (the node pool-in expansion form includes the to-be-processed node, and is used to apply to add the to-be-processed node to the K8s cluster) to the approver. If the node pool-in expansion form is approved, the K8s cluster is expanded based on the node pool-in expansion form. During the expansion, the to-be-processed node in the node pool-in expansion form is pre-verified based on the pre-check rule. Specifically, a pre-check script containing the pre-check rule is executed. When the execution is successful, it indicates that the pre-check rule passes the pre-check, and the to-be-processed node is initialized (that is, at least one to-be-processed component is installed on the to-be-processed node, the to-be-processed node is set as an unschedulable node, and the to-be-processed node is added with a business tag based on business requirements). Specifically, an initialization script is executed to implement the machine initialization of the to-be-processed node. If the execution is successful, it indicates that the to-be-processed node has installed the to-be-processed component, is set as an unschedulable node, and has added the business tag. However, at this time, the to-be-processed node has not been added to the K8s cluster and is not a K8s cluster node. Before the to-be-processed node is added to the K8s cluster, the to-be-processed node needs to be post-verified. Specifically, a post-check script containing the post-check rule is executed. If the post-check passes, the expansion operation can be performed to add the to-be-processed node to the K8s cluster, and information that the to-be-processed node has completed the pool-in is fed back to the pool-in initiator, so as to realize the pool-in of the to-be-processed node. Specifically, the approver can obtain the node pool-in expansion form through the approval process platform, so as to ensure the model of the to-be-processed node that is to be pooled in, and improve the security of the pooled-in node.

[0051] Therefore, the scheme fully realizes the standardization, security and automation of the K8s cluster expansion operation by constructing the node pool-in management and control mechanism of "application-approval-pre-check-post-check", and significantly improves the reliability and operation and maintenance efficiency of cluster management. Specifically, the approval process strengthens the pool-in access control, effectively prevents illegal or non-compliant to-be-processed nodes from being pooled in, and improves the security of the K8s cluster. In addition, the pre-check ensures that the basic environment (such as kernel parameters, network configuration, disk mounting, etc.) of the to-be-processed node meets the unified standard of the K8s cluster, avoids abnormal problems of cni and storage caused by environment differences, guarantees the consistency of node environment, greatly improves the security of the to-be-processed node that is to be pooled in, and reduces the instability risk of the K8s cluster caused by the node pool-in. The post-check mechanism verifies the readiness of key system components (such as basic DaemonSet and PV initialization status), ensures the completeness of node functions, and avoids the influence of "false Ready" state on business scheduling. The security and availability of the pooled-in node are greatly improved, and the risk to the K8s cluster is greatly reduced. The pool-in of the to-be-processed node is completed by automatically executing scripts, which greatly improves the pool-in efficiency.

[0052] Optionally, in the second embodiment, if the in-out pool operation information corresponds to an out-pool operation, the to-be-processed node is checked based on the pre-check rule to determine that the to-be-processed node is a node satisfying the basic operation condition of the K8s cluster node, including: performing scheduling state detection on the to-be-processed node, if the scheduling state of the to-be-processed node is an unschedulable state, it is considered that the scheduling state detection is passed; performing service class Pod detection on the to-be-processed node, if the to-be-processed node does not exist service Pod, it is considered that the service class Pod detection is passed; performing non-service class Pod detection on the to-be-processed node, if the to-be-processed node exists non-service Pod, it is considered that the to-be-processed node is in a normal service period and belongs to a node that can be out-pooled, and it is considered that the non-service class Pod detection is passed; and the to-be-processed node that passes the state detection, the service class Pod detection and the non-service class Pod detection is considered as a node satisfying the basic operation condition of the K8s cluster node.

[0053] The unschedulable state means that the to-be-processed node cannot be scheduled with a new service pod. The service class Pod detection is used to determine that there is no service pod on the to-be-processed node, so as to avoid the situation that the service pod existing on the to-be-processed node is mistakenly deleted due to the out-pool of the to-be-processed node, and avoid the problem that the service is interrupted due to the out-pool of the node. The non-service class Pod detection is used to determine that there is a non-service pod on the to-be-processed node, so as to ensure that the to-be-processed node is a K8s cluster node, and avoid the out-pool of a non-K8s cluster node.

[0054] Specifically, when the to-be-processed node is checked based on the pre-check rule, the pre-cleaning script is executed on the to-be-processed node, so that the to-be-processed node meets the pre-check rule. The pre-cleaning script can include setting the to-be-processed node to an unschedulable state, migrating the service pod on the to-be-processed node, and retaining the non-service pod on the to-be-processed node.

[0055] Specifically, if the in-out pool operation information corresponds to an out-pool operation, the at least one to-be-processed component is a necessary component of the K8s cluster node and a service running on the to-be-processed node, and the processing mode is unloading. In the step 140, at least one to-be-processed component on the to-be-processed node is processed based on the processing mode to obtain an updated to-be-processed node, including: unloading or stopping at least one to-be-processed component on the to-be-processed node to obtain an updated to-be-processed node, wherein the updated to-be-processed node has completed the unloading of the necessary component, and no service is in a running state.

[0056] The to-be-processed component refers to the basic software installed on the to-be-processed node, which is the basic software necessary for the K8s cluster node. For example, the to-be-processed component includes runc, containerd, kubelet, cni, and other necessary components. The to-be-processed component also includes a running service.

[0057] Specifically, when the at least one to-be-processed component is unloaded or stopped on the to-be-processed node, the pre-cleaning script is executed on the to-be-processed node to unload the to-be-processed component on the to-be-processed node.

[0058] Specifically, if the in-out pool operation information corresponds to an out-pool operation, in the step 150, the to-be-processed node is checked based on the pre-detection rule to determine whether the to-be-processed node meets the execution condition required for performing the operation corresponding to the in-out pool operation information. The node resource detection is performed on the to-be-processed node. If the to-be-processed node does not have a node resource, it is considered that the to-be-processed node meets the execution condition required for performing the operation corresponding to the in-out pool operation information.

[0059] The node resource refers to a computing resource on the to-be-processed node that can be managed by the K8s cluster and allocated to a container (Pod) for use.

[0060] For example, when no node resource is detected in the to-be-processed node, it is considered that the to-be-processed node can be deleted from the K8s cluster. The operation of deleting the to-be-processed node from the K8s cluster is performed, so that the to-be-processed node is out-pooled.

[0061] For example, refer to Figure 3 If the to-be-processed node is a node that needs to be deleted from the K8s cluster, the out-pool initiator (the initiator of the to-be-processed node) initiates a node out-pool downsizing form (the node out-pool downsizing form includes the to-be-processed node, and is used to apply for deleting the to-be-processed node from the K8s cluster) to the approver. If the node out-pool downsizing form is approved, the K8s cluster is downsized based on the node out-pool downsizing form. Before the to-be-processed node is deleted from the K8s cluster, the to-be-processed node needs to be pre-verified based on the pre-detection rule. Specifically, the pre-cleaning script containing the pre-detection rule and the at least one to-be-processed component is executed. When the execution is successful, it indicates that the pre-verification of the pre-detection rule is passed. Before the to-be-processed node is deleted from the K8s cluster, the to-be-processed node also needs to be post-verified. Specifically, the node cleaning script (used to delete the node resource in the to-be-processed node, so that the to-be-processed node passes the post-verification of the post-detection rule) is executed. If the post-verification is passed, the downsizing operation can be performed to delete the to-be-processed node from the K8s cluster. The information that the to-be-processed node is out-pooled is fed back to the out-pool initiator, so as to realize the out-pooling of the to-be-processed node.

[0062] Thus, the scheme realizes the security, standardization and automation of the K8s cluster scaling operation by constructing the node out-pool management mechanism of "application-approval-pre-check-post-check". The approval process ensures that the node offline behavior is compliant and controlled, effectively preventing the deletion of core nodes and improving the security of K8s cluster changes. The pre-check can automatically migrate the workloads on the node to ensure business continuity and avoid service interruption. Through the script execution of local resource cleaning and post-check, it ensures that temporary data, configuration files, etc. are completely cleaned up, and the Node resources are completely removed from the cluster, eliminating "zombie nodes" and resource leakage. The full-process automation reduces manual intervention, improves operation consistency and large-scale management efficiency, effectively solves the problems of random operation, incomplete migration and incomplete cleaning in traditional scaling, and significantly improves the stability of the cluster, resource utilization and the level of operation intelligence. It greatly improves the success rate and efficiency of node out-pool, and greatly reduces the risk of node out-pool to K8s cluster.

[0063] In some examples, the in-pool operation and out-pool operation of the to-be-processed node can be backed up in the node execution record to facilitate auditing and tracking.

[0064] Exemplarily, as shown in Figure 4 When there is a to-be-processed node, it is determined through the event center whether the node execution state record file corresponding to the to-be-processed node exists, if not, a node execution state record file corresponding to the to-be-processed node is initialized, if yes, the node execution state record file corresponding to the to-be-processed node is obtained, and the out-pool operation or in-pool operation of the to-be-processed node is executed in turn, and the execution process, execution state and execution event of the to-be-processed node are recorded in the node execution state record file.

[0065] Thus, by recording the in-pool operation and out-pool operation of the to-be-processed node in the node execution record, the whole process of in-out pool nodes is traceable, the operation is auditable, and the state is verifiable, which significantly improves the transparency and security of cluster change management.

[0066] In summary, the present solution obtains a to-be-processed node, the to-be-processed node including node information and in-and-out pool operation information; checks the to-be-processed node based on a pre-check rule to determine that the to-be-processed node is a node that meets the basic operating conditions of a K8s cluster node; obtains at least one to-be-processed component and a processing mode based on the in-and-out pool operation information; processes at least one to-be-processed component on the to-be-processed node based on the processing mode to obtain an updated to-be-processed node; checks the to-be-processed node based on a post-check rule to determine that the to-be-processed node is a node that meets the required execution conditions for performing an operation corresponding to the in-and-out pool operation information, and performs the operation corresponding to the in-and-out pool operation information. Through a standardized and automated node in-and-out pool management process, the operation risk is significantly reduced and the operation and maintenance efficiency is improved. The pre-check ensures that only compliant to-be-processed nodes can be used as K8s cluster nodes, avoiding the addition of to-be-processed nodes that do not meet the K8s cluster node requirements to the K8s cluster, thereby causing cluster failures, avoiding risks caused by human judgment errors, and improving the security of the K8s cluster. The to-be-processed components are automatically executed to automatically install or clean up the to-be-processed components, eliminating manual operation deviations, ensuring the consistency of the to-be-processed node and the K8s cluster node configuration, and achieving efficient and replicable node management. The post-check ensures that the node state is real and reliable, and eliminates the problem of false readiness of the node. After multiple checks, the in-or-out pool operation of the to-be-processed node is automatically performed, greatly improving the stability and security of the K8s cluster. The pre-check, post-check, and node in-or-out pool processing are automatically performed, reducing the risk of manual operation, improving the efficiency of node in-or-out pool, and achieving low-risk and high-efficiency node in-or-out pool.

[0067] Embodiment Two

[0068] Another embodiment of the present application relates to an apparatus for automatically controlling K8s cluster node in-and-out pool. The implementation details of the apparatus for automatically controlling K8s cluster node in-and-out pool in this embodiment are specifically described as follows. The following implementation details are provided for easy understanding and are not essential for implementing the present solution. A schematic diagram of the apparatus 50 for automatically controlling K8s cluster node in-and-out pool in this embodiment can be as shown in FIG. 5, which includes an obtaining unit 501 and a determining unit 502. Figure 5 The obtaining unit 501 is configured to obtain a to-be-processed node, the to-be-processed node including node information and in-and-out pool operation information.

[0069] The obtaining unit 501 is configured to obtain a to-be-processed node, the to-be-processed node including node information and in-and-out pool operation information.

[0070] The determining unit 502 is configured to check the to-be-processed node based on a pre-check rule to determine that the to-be-processed node is a node that meets the basic operating conditions of a K8s cluster node.

[0071] The acquisition unit 501 is further configured to acquire at least one to-be-processed component and a processing manner based on the in-out pool operation information.

[0072] The determination unit 502 is further configured to process at least one to-be-processed component based on the processing manner on the to-be-processed node to obtain an updated to-be-processed node.

[0073] The determination unit 502 is further configured to verify the to-be-processed node based on a post-detection rule, determine that the to-be-processed node is a node that meets an execution condition required for performing an operation corresponding to the in-out pool operation information, and perform the operation corresponding to the in-out pool operation information.

[0074] In some examples, if the in-out pool operation information corresponds to an in-pool operation, the determination unit 502 is configured to, when determining that the to-be-processed node is a node that meets a basic running condition of a K8s cluster node based on a pre-detection rule, specifically configured to: perform mounting detection on the to-be-processed node, and if the to-be-processed node has been correctly mounted, the mounting detection is passed; perform hostname detection on the to-be-processed node, and if the hostname of the to-be-processed node meets a preset naming specification, the hostname detection is passed; perform network card configuration detection on the to-be-processed node, and if the network card configuration of the to-be-processed node is a preset network card configuration, the network card configuration detection is passed; perform directory permission detection on the to-be-processed node, and if the directory permission of the to-be-processed node meets a preset permission specification, the directory permission detection is passed; perform kernel parameter detection on the to-be-processed node, and if the kernel parameter of the to-be-processed node meets a running requirement of a K8s cluster node, the kernel parameter detection is passed; and regard the to-be-processed node that passes the mounting detection, the hostname detection, the network card configuration detection, the directory permission detection, and the kernel parameter detection as a node that meets the basic running condition of the K8s cluster node.

[0075] In some examples, if the in-out pool operation information corresponds to an out-pool operation, the determining unit 502 is configured to check the to-be-processed node based on the pre-detection rule, and determine that the to-be-processed node meets the basic operation condition of the K8s cluster node when the to-be-processed node meets the basic operation condition of the K8s cluster node, specifically: performing scheduling state detection on the to-be-processed node, and regarding the to-be-processed node as passing the scheduling state detection if the scheduling state of the to-be-processed node is an unschedulable state; performing business class Pod detection on the to-be-processed node, and regarding the to-be-processed node as passing the business class Pod detection if the to-be-processed node does not exist a business Pod; performing non-business class Pod detection on the to-be-processed node, and regarding the to-be-processed node as being in a normal service period and belonging to a poolable node if the to-be-processed node exists a non-business Pod, and regarding the to-be-processed node as passing the non-business class Pod detection; and regarding the to-be-processed node as passing the state detection, the business class Pod detection, and the non-business class Pod detection as meeting the basic operation condition of the K8s cluster node.

[0076] In some examples, if the in-out pool operation information corresponds to an in-pool operation, the at least one to-be-processed component is a necessary component of the K8s cluster node, and the processing mode is installation, the determining unit 502 is configured to process at least one to-be-processed component on the to-be-processed node based on the processing mode to obtain an updated to-be-processed node, specifically: installing at least one to-be-processed component on the to-be-processed node to obtain an updated to-be-processed node, wherein the updated to-be-processed node contains a necessary component of the K8s cluster node.

[0077] In some examples, if the in-out pool operation information corresponds to an out-pool operation, the at least one to-be-processed component is a necessary component of the K8s cluster node and a service running on the to-be-processed node, and the processing mode is uninstallation, the determining unit 502 is configured to process at least one to-be-processed component on the to-be-processed node based on the processing mode to obtain an updated to-be-processed node, specifically: uninstalling or stopping at least one to-be-processed component on the to-be-processed node to obtain an updated to-be-processed node, wherein the updated to-be-processed node has completed the uninstallation of the necessary component, and no service is in a running state.

[0078] In some examples, if the pool entry / exit operation information corresponds to a pool entry operation, then when the determining unit 502 verifies the node to be processed based on the post-detection rules and determines that the node to be processed is a node that meets the execution conditions required to execute the operation corresponding to the pool entry / exit operation information, it is specifically used to: perform node status detection on the node to be processed; if the node to be processed is in a ready state, it is considered to have passed the node status detection; perform basic Daemonset installation detection on the node to be processed; if the node to be processed has installed the basic Daemonset, it is considered to have passed the basic Daemonset installation detection; and regard the node to be processed that has passed both the node status detection and the basic Daemonset installation detection as a node that meets the execution conditions required to execute the operation corresponding to the pool entry / exit operation information.

[0079] In some examples, if the pool entry / exit operation information corresponds to a pool exit operation, the determining unit 502 is used to verify the node to be processed based on the post-detection rules to determine that the node to be processed is a node that meets the execution conditions required to execute the operation corresponding to the pool entry / exit operation information: the node to be processed is subjected to node resource detection, and if the node to be processed does not have node resources, it is regarded as a node that meets the execution conditions required to execute the operation corresponding to the pool entry / exit operation information.

[0080] It is worth mentioning that all units involved in this embodiment are logical units. In practical applications, a logical unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. Furthermore, to highlight the innovative aspects of this application, this embodiment does not introduce units that are not closely related to solving the technical problems proposed in this application; however, this does not mean that other units are absent in this embodiment.

[0081] Example 3:

[0082] Another embodiment of this application relates to an electronic device, such as... Figure 6 As shown, it includes: at least one processor 901; and a memory 902 communicatively connected to at least one processor 901; wherein the memory 902 stores instructions executable by at least one processor 901, the instructions being executed by at least one processor 901 to enable at least one processor 901 to perform the automated control method for K8s cluster node entry and exit from the pool in the above embodiments.

[0083] The memory and the processor are connected by a bus. The bus can include any number of interconnecting buses and bridges depending on the specific application of the mobile terminal. The bus connects the various circuits of the memory and the processor together and mediates data communication among different components. The bus can also connect with the various other circuits such as peripheral devices, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described further. A bus interface provides an interface between the bus and a transceiver. The transceiver can be a single device or a plurality of devices such as a plurality of receivers and transmitters that are arranged to transmit and receive data over a transmission medium. Data processed by the processor is transmitted over a wireless medium via an antenna. Further, the antenna also receives data and transmits the data to the processor.

[0084] The processor is responsible for managing the bus and general processing, and can also provide various functions including timing, peripheral interfaces, voltage regulation, power management, and other control functions. The memory can be used for storing data used by the processor when executing operations.

[0085] Embodiment Four

[0086] Another embodiment of the present application relates to a computer readable storage medium storing a computer program. The computer program is executed by a processor to implement the method embodiments.

[0087] That is, those skilled in the art can understand that all or part of the steps of the methods in the above embodiments can be completed by a program instructing related hardware, and the program is stored in a storage medium, including a plurality of instructions for causing an apparatus (which can be a single-chip microcomputer, a chip, or the like) or a processor to execute all or part of the steps of the various embodiments of the method of the present application. The aforementioned storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.

[0088] Those skilled in the art can understand that the above embodiments are specific embodiments for implementing the present application, and in actual applications, various changes can be made in form and details without departing from the spirit and scope of the present application.

Claims

1. A method for automatically controlling the entry and exit of nodes in a Kubernetes cluster pool, characterized in that, include: Obtain the node to be processed, which includes node information and pool entry / exit operation information; The nodes to be processed are verified based on the pre-detection rules to determine whether the nodes to be processed meet the basic operating conditions of the K8s cluster nodes. Based on the inbound / outbound pool operation information, at least one component to be processed and its processing method are obtained; On the node to be processed, at least one of the components to be processed is processed according to the processing method to obtain an updated node to be processed; The node to be processed is verified based on the post-detection rules to determine whether the node to be processed is a node that meets the execution conditions required to execute the operation corresponding to the entry / exit pool operation information, and the operation corresponding to the entry / exit pool operation information is executed.

2. The method for automatically controlling the entry and exit of K8s cluster nodes from the pool according to claim 1, characterized in that, If the pool entry / exit operation information corresponds to a pool entry operation, then the node to be processed is verified based on the pre-detection rules to determine whether the node to be processed is a node that meets the basic operating conditions of a K8s cluster node, including: The node to be processed is subjected to a mounting test. If the node to be processed is correctly mounted, it is considered to have passed the mounting test. The hostname of the node to be processed is checked. If the hostname of the node to be processed conforms to the preset naming standard, it is considered to have passed the hostname check. The network interface card (NIC) configuration of the node to be processed is checked. If the NIC configuration of the node to be processed is determined to be the preset NIC configuration, it is considered to have passed the NIC configuration check. Perform directory permission checks on the node to be processed. If the directory permissions of the node to be processed meet the preset permission specifications, it is considered to have passed the directory permission check. The kernel parameters of the node to be processed are checked. If the kernel parameters of the node to be processed meet the running requirements of the K8s cluster node, it is considered to have passed the kernel parameter check. Nodes that pass the mount detection, hostname detection, network card configuration detection, directory permission detection, and kernel parameter detection are considered to meet the basic operating conditions of a K8s cluster node.

3. The method for automatically controlling the entry and exit of K8s cluster nodes from the pool according to claim 1, characterized in that, If the in / out pool operation information corresponds to an out pool operation, then the node to be processed is verified based on the pre-detection rules to determine whether the node to be processed is a node that meets the basic operating conditions of a K8s cluster node, including: The scheduling status of the node to be processed is checked. If the scheduling status of the node to be processed is unschedulable, it is considered to have passed the scheduling status check. Perform business-type Pod detection on the node to be processed. If the node to be processed does not have a business-type Pod, it is considered to have passed the business-type Pod detection. The node to be processed is subjected to non-business Pod detection. If the node to be processed has non-business Pods, it is considered that the node to be processed is in normal service, belongs to the node that can be removed from the pool, and is considered to have passed the non-business Pod detection. Nodes that pass the state detection, the business-type Pod detection, and the non-business-type Pod detection are considered to meet the basic operating conditions of the Kubernetes cluster.

4. The method for automatically controlling the entry and exit of K8s cluster nodes from the pool according to claim 1, characterized in that, If the pool entry / exit operation information corresponds to a pool entry operation, and the at least one component to be processed is an essential component of the K8s cluster node, and the processing method is installation, then on the node to be processed, at least one of the components to be processed is processed based on the processing method to obtain an updated node to be processed, including: At least one of the components to be processed is installed on the node to be processed to obtain an updated node to be processed, wherein the updated node to be processed contains the necessary components to become a node of the K8s cluster.

5. The method for automatically controlling the entry and exit of K8s cluster nodes from the pool according to claim 1, characterized in that, If the in / out pool operation information corresponds to an out pool operation, and the at least one component to be processed is an essential component of the K8s cluster node and a service running on the node to be processed, and the processing method is unloading, then on the node to be processed, at least one of the components to be processed is processed based on the processing method to obtain an updated node to be processed, including: Unload or stop at least one of the components to be processed on the node to be processed to obtain an updated node to be processed, wherein the updated node to be processed has completed the unloading of the necessary components and no services are running.

6. The method for automatically controlling the entry and exit of K8s cluster nodes from the pool according to claim 1, characterized in that, If the pool entry / exit operation information corresponds to a pool entry operation, then the node to be processed is verified based on the post-detection rules to determine that the node to be processed is a node that meets the execution conditions required to execute the operation corresponding to the pool entry / exit operation information, including: Perform node status detection on the node to be processed. If the node to be processed is in the ready state, it is considered to have passed the node status detection. Perform a basic Daemonset installation check on the node to be processed. If the node to be processed has the basic Daemonset installed, it is considered to have passed the basic Daemonset installation check. The nodes to be processed that pass the node status detection and the basic Daemonset installation detection are considered as nodes that meet the execution conditions required to perform the operation corresponding to the in / out pool operation information.

7. The method for automatically controlling the entry and exit of K8s cluster nodes from the pool according to claim 1, characterized in that, If the pool entry / exit operation information corresponds to a pool exit operation, then the node to be processed is verified based on the post-detection rules to determine whether the node to be processed is a node that meets the execution conditions required to execute the operation corresponding to the pool entry / exit operation information, including: The node to be processed is checked for node resources. If the node to be processed does not have node resources, it is considered as a node that meets the execution conditions required to execute the operation corresponding to the entry and exit pool operation information.

8. A device for automatically controlling the entry and exit of Kubernetes cluster nodes into a pool, characterized in that, include: The acquisition unit is used to acquire nodes to be processed, which include node information and pool entry / exit operation information. The determining unit is used to verify the node to be processed based on the pre-detection rules and determine that the node to be processed is a node that meets the basic operating conditions of the K8s cluster node. The acquisition unit is also used to acquire at least one component to be processed and a processing method based on the inlet / outlet pool operation information; The determining unit is further configured to process at least one of the components to be processed on the node to be processed based on the processing method to obtain an updated node to be processed. The determining unit is further configured to verify the node to be processed based on the post-detection rules, determine that the node to be processed is a node that meets the execution conditions required to execute the operation corresponding to the entry / exit pool operation information, and execute the operation corresponding to the entry / exit pool operation information.

9. An electronic device, characterized in that, include: At least one processor; as well as, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the automated control method for inbound and outbound nodes of a K8s cluster as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the method for automatically controlling the entry and exit of K8s cluster nodes from the pool as described in any one of claims 1 to 7.