CN112333229A - Method, device, equipment and storage medium for expanding kubernets nodes - Google Patents

Method, device, equipment and storage medium for expanding kubernets nodes Download PDF

Info

Publication number
CN112333229A
CN112333229A CN202010973258.5A CN202010973258A CN112333229A CN 112333229 A CN112333229 A CN 112333229A CN 202010973258 A CN202010973258 A CN 202010973258A CN 112333229 A CN112333229 A CN 112333229A
Authority
CN
China
Prior art keywords
node
cluster
kubernets
file
deployment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010973258.5A
Other languages
Chinese (zh)
Inventor
韩锋
刘鲁岩
殷菲
王传民
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Civic Se Commercial Middleware Co ltd
Original Assignee
Shandong Civic Se Commercial Middleware Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Civic Se Commercial Middleware Co ltd filed Critical Shandong Civic Se Commercial Middleware Co ltd
Priority to CN202010973258.5A priority Critical patent/CN112333229A/en
Publication of CN112333229A publication Critical patent/CN112333229A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Abstract

The application discloses a kubernets node expansion method, wherein adding parameter information in a node adding request is identified through a proxy end of an integrated ansable tool, and the adding parameter information is added into a hosts file and a variable file of a pre-configured automatic deployment script, so that automatic expansion of kubernets cluster nodes is achieved. The one-key deployment can be realized in a real sense by realizing the full-automatic node addition after the request is received, the technical requirements of related personnel for node expansion are reduced, the reliability of platform deployment is improved through a deterministic process, and meanwhile, the production efficiency is improved to the maximum extent. The application also provides a kubernets node expansion device, equipment and a readable storage medium, and the kubernets node expansion device, equipment and the readable storage medium have the beneficial effects.

Description

Method, device, equipment and storage medium for expanding kubernets nodes
Technical Field
The present application relates to the field of electronic technologies, and in particular, to a method, an apparatus, a device, and a readable storage medium for expanding kubernets node.
Background
Kubernets is a lightweight and extensible open source platform for managing containerized applications and services through which automated deployment and scalability of applications can occur. In Kubernetes, containers forming applications are combined into a logic unit to be easier to manage and discover, Pod is the smallest unit which can be created and deployed in Kubernetes, and is an application instance in a Kubernetes cluster and is always deployed on the same Node. The Pod includes one or more containers and also includes resources shared by the containers such as storage and network.
If the kubernets cluster resource pool is insufficient, the node cannot allocate sufficient resources for the pod, and application deployment failure may be caused. To avoid this situation, the nodes need to be augmented.
The existing expansion node adopts a manual node expansion mode, so that the realization process is complex, the technical requirement on users is higher, the efficiency is low, and the practicability of the platform is influenced.
In view of this, how to improve reliability and implementation efficiency of kubernets node deployment is a major concern for those skilled in the art.
Disclosure of Invention
In view of this, an object of the present application is to provide a method, an apparatus, a device and a readable storage medium for expanding kubernets node, which can improve reliability and implementation efficiency of kubernets node deployment. The specific scheme is as follows:
the application discloses a kubernets node expansion method based on computer equipment, which comprises the following steps:
the method comprises the steps that a proxy end of an integrated ansable tool receives a node adding request for a server end; wherein the node addition request comprises: adding parameter information, wherein the adding parameter information comprises: cluster information and selected nodes to be added;
starting a node adding task, and adding the adding parameter information into a hosts file and a variable file of a pre-configured automatic deployment script;
and calling an ansible tool to send a cluster node expansion instruction to the server according to the hosts file and the variable file so as to add cluster nodes.
Optionally, invoking an ansable tool to send a cluster node expansion instruction to the server according to the hosts file and the variable file to add a cluster node, including:
copying a general certificate in the cluster to a node to be added;
judging whether the node to be added is provided with a docker or not;
if not, installing a docker in the node to be added;
if yes, installing a kubel assembly and a kube-proxy assembly in the node to be added, and generating a kubel and a kube-proxy certificate according to the general certificate file;
and installing the cluster network plug-ins according to the types of the cluster network plug-ins specified in the cluster information stored in the variable file.
Optionally, installing a cluster network plugin according to the type of the cluster network plugin specified in the cluster information stored in the variable file, including:
determining the type of the cluster network plug-in specified in the cluster information stored in the variable file;
if the type is a flannel network, controlling the node to be added to communicate with the cluster after the flannel is installed on the node to be added;
and if the type is the calico network, controlling the node to be added to communicate with the cluster.
Optionally, the kubernets node expansion method further includes:
carrying out node deployment abnormity detection;
if the node deployment abnormity detection finds that a problem occurs in the deployment process, suspending a node deployment process and retrieving a node addition log;
determining the task name with problems according to the node adding log;
and if a continuous deployment request for the problem task initiated by the user is received, continuing the node deployment process.
Optionally, after the initiating node adds a task, the method further includes:
starting a node adding timing task, and acquiring a node adding log at a fixed time to determine the node adding progress;
and returning the node adding progress to a client interface.
Optionally, starting a node adding timing task, and obtaining a node adding log at a timing to determine a node adding progress, including:
starting a node adding timing task, and acquiring a node adding log at regular time;
positioning the current progress according to the task identifier in the node adding log;
outputting and setting the current progress in a progress bar form to generate a node adding progress bar;
correspondingly, returning the node adding progress to the client interface comprises the following steps: and returning the node adding progress bar to the client interface.
Optionally, the agent terminal is a Maven project written by using a SpringBoot framework technology;
correspondingly, calling an ansable tool to send a cluster node expansion instruction to the server according to the hosts file and the variable file so as to add cluster nodes, wherein the steps of:
calling an ansable tool to generate a cluster node expansion instruction according to the hosts file and the variable file;
the cluster node expansion instruction is packed into a jar packet through a maven install command;
and calling the jar packet to send an operation instruction to the server.
The application also provides a kubernets node extension device, is applied to the agent end of integrated ansable instrument, and the device includes:
a request receiving unit, configured to receive a node addition request for a server; wherein the node addition request comprises: adding parameter information, wherein the adding parameter information comprises: cluster information and selected nodes to be added;
the information deployment unit is used for starting a node adding task and adding the adding parameter information into a hosts file and a variable file of a pre-configured automatic deployment script;
and the script control unit is used for calling an ansable tool to send a cluster node expansion instruction to the server according to the hosts file and the variable file so as to add cluster nodes.
The present application further provides a computer device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the kubernets node extension method when executing the computer program.
The present application also provides a readable storage medium having a program stored thereon, which when executed by a processor, performs the steps of the kubernets node expansion method.
Therefore, in the kubernets node expansion method provided by the application, the adding parameter information in the node adding request is identified through the agent end of the integrated ansible tool and is added into the hosts file and the variable file of the pre-configured automatic deployment script, so that the kubernets cluster node is automatically expanded. The one-key deployment can be realized in a real sense by realizing the full-automatic node addition after the request is received, the technical requirements of related personnel for node expansion are reduced, the reliability of platform deployment is improved through a deterministic process, and meanwhile, the production efficiency is improved to the maximum extent.
The application also provides a kubernets node expansion device, equipment and a readable storage medium, which have the beneficial effects and are not described herein again.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
Fig. 1 is a flowchart of an embodiment of a kubernets node expansion method disclosed in the present application;
fig. 2 is a schematic diagram of a user-side implementation process of an automated expansion cluster node disclosed in the present application;
fig. 3 is a block diagram illustrating a structure of a kubernets node expansion apparatus disclosed in the present application;
fig. 4 is a block diagram of a computer device disclosed in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The process of expanding the nodes by the Kubernets container cluster is very strict, and not only certificates need to be configured, including copying original certificates, adding special certificates of the nodes according to the IP of the nodes, installing components such as kubelelet and kube-proxy, but also corresponding network configuration needs to be carried out according to different network plug-ins of the cluster. If a plurality of nodes need to be expanded, although the nodes are operated repeatedly, the manual operation has uncertainty, the problems of node network obstruction and the like are easy to occur, and the technical requirement on operators is high. Therefore, the process of manually expanding the cluster at present is complex in implementation process, high in technical requirement on users, low in efficiency and capable of influencing the practicability of the platform.
In order to avoid the foregoing problem, an embodiment of the present application discloses a kubernets node extension method, which is shown in fig. 1 and mainly includes:
step S110: the method comprises the steps that a proxy end of an integrated ansable tool receives a node adding request for a server end; wherein the node addition request comprises: adding parameter information, wherein the adding parameter information comprises: cluster information and selected nodes to be added;
in this embodiment, a proxy is introduced, and an ansable tool and an automation deployment script are configured and installed on the proxy to implement automatic node addition to a server. The agent end can be arranged in the server end and directly controls the step of adding the nodes in the server end; the method may also be configured in a device outside the server, and the step of adding the node is controlled by sending the instruction to the server.
The method comprises the steps that a user sends a request for adding a node after selecting the node to be added on an interface of a server, a background of the server acquires an address of a proxy end and related information of a current cluster (specifically, the address may include a network plug-in type of the cluster, a used mirror image warehouse, a node where nfs is located, a master node and a node of the cluster, and the like) from a database, the cluster information and the selected node to be added are used as addition parameter information, and the addition parameter information is sent to the proxy end through a node addition request (post request).
It should be noted that, in this embodiment, specific information items of the cluster information and the node information to be added are not limited, and may be set according to the actual node addition needs and implementation steps.
Further, in order to ensure the effectiveness of adding a control instruction to a node of a server by an agent, that is, to ensure that the control instruction sent to the server by the agent is normally executed by the server, the agent may specifically be a Maven project written by using a spring boot framework technology;
correspondingly, in the subsequent step, a cluster node expansion instruction is sent to the server according to the hosts file and the variable file to add the cluster node, which may specifically include the following steps:
(1) calling an ansable tool to generate a cluster node expansion instruction according to hosts files and variable files;
(2) the cluster node expansion instruction is packed into a jar packet through a maven install command;
(3) and calling the jar packet to send a control instruction to the server.
The proxy end is a Maven project written by adopting a SpringBoot framework technology, the SpringBoot technology is used for realizing the request forwarding of the client end, the cluster node expansion instruction is constructed into a jar packet through a 'Maven install' command, the jar packet is called to serve as a proxy server to send an instruction to control the host of the server end, and the rejection of the host of the server end to the operation instruction can be avoided.
Step S120: starting a node adding task, and adding the adding parameter information into a hosts file and a variable file of a pre-configured automatic deployment script;
after receiving a request of adding a node by a server, an agent first executes a linux node adding task command on a current machine according to a written java program to start a node adding task, wherein the node adding task specifically comprises adding parameter adding information into a hosts file and a variable file of a pre-configured automatic deployment script.
The hosts file is a pre-deployed node automatic deployment script and can be used for controlling automatic implementation of each node adding step, the variable file is a pre-deployed file used for storing variable information of node addition, and when the script is executed according to the hosts file, variable parameters in the variable file need to be acquired to achieve automatic node addition. The variable file may include a general variable and a non-general variable (including cluster information, a selected node to be added, and the like) acquired from the server, the general variable may be configured in advance, and the non-general variable may be added to a corresponding item in the variable file according to the information item after receiving the node addition request.
Adding parameters into the variable file, acquiring corresponding information items from the variable file and adding the information items into the hosts file, wherein the hosts file comprises all control instructions in the execution of the node adding task of the nodes requested to be added by the user, and the completed node adding control can be realized.
Step S130: and calling an ansible tool to send a cluster node expansion instruction to the server according to the hosts file and the variable file so as to add the cluster node.
And after the hosts file and the variable file are configured, executing a command of adding the nodes, and starting to add the cluster nodes.
In this embodiment, specific division and step implementation of the instruction for extending the cluster node to the server according to the hosts file and the variable file are not limited, and may be set according to the actual node addition requirement and efficiency implementation, and for deepening understanding, a specific implementation manner is described in this embodiment, and optionally, the step of calling the ansible tool to extend the instruction to the cluster node to the server according to the hosts file and the variable file may specifically include:
(1) copying a general certificate in the cluster to a node to be added;
copying the common certificate added by the nodes such as ca, etcd and the like in the cluster to the node to be added according to the hosts file and the variable file, and preparing for generating the kubel and kube-proxy certificate specific to the node.
(2) Judging whether a node to be added is provided with a docker;
(3) if not, installing a docker in the node to be added;
and judging whether the current node is provided with a docker or not, and if not, automatically installing.
(4) If yes, installing a kubel assembly and a kube-proxy assembly in the node to be added, and generating a kubel and a kube-proxy certificate according to the general certificate file;
and installing the kubel component and the kube-proxy component, and calling the kubel component and the kube-proxy component according to the copied general certificate file to generate a kubel and a kube-proxy certificate.
(5) And installing the cluster network plug-ins according to the types of the cluster network plug-ins specified in the cluster information stored in the variable file.
And determining the cluster network plug-in type according to the network plug-in type in the variable file, and installing a corresponding network plug-in to automatically adapt to the original network of the cluster so as to ensure the network adaptation of the added nodes.
Optionally, the process of installing the cluster network plugin according to the type of the cluster network plugin specified in the cluster information stored in the variable file may specifically include the following three steps:
(1) determining the type of the cluster network plug-in appointed in the cluster information stored in the variable file;
(2) if the type is a flannel network, controlling the node to be added to communicate with the cluster after the flannel is installed on the node to be added;
(3) and if the type is the calico network, controlling the node to be added to communicate with the cluster.
The network plug-in at present mainly includes two types, a flannel network and a calico network, and network communication can be realized by the existing components under the calico network at present, in order to improve the network configuration speed and avoid repeated addition of the components, the embodiment proposes that if the flannel network is used, flannel needs to be installed and then the flannel can be communicated with a cluster, and if the calico network is used, the node can automatically communicate with the cluster, so that the current cluster can be expanded with resources.
It should be noted that, in this embodiment, only the implementation steps of the cluster node expansion are described as an example, and other implementations based on other sequences and other steps in the present application can refer to the description of this embodiment and are not described herein again.
Based on the above description, in the kubernets node expansion method provided in this embodiment, the adding parameter information in the node adding request is identified by the proxy side of the integrated ansible tool, and is added to the hosts file and the variable file of the preconfigured automatic deployment script, so as to implement automatic expansion of the kubernets cluster node. The one-key deployment can be realized in a real sense by realizing the full-automatic node addition after the request is received, the technical requirements of related personnel for node expansion are reduced, the reliability of platform deployment is improved through a deterministic process, and meanwhile, the production efficiency is improved to the maximum extent.
Based on the foregoing embodiment, to further ensure that the deployment process is performed smoothly, and at the same time avoid the impact of the deployment process getting into a dead cycle when the deployment is abnormal on the deployment time and the deployment efficiency, optionally, on the basis of the foregoing embodiment, the following steps may be further performed:
(1) carrying out node deployment abnormity detection;
(2) if a problem is found in the deployment process through the abnormal node deployment detection, suspending the node deployment process and retrieving a node addition log;
(3) determining the task name with problems according to the node adding log;
(4) and if a continuous deployment request for the problem task initiated by the user is received, continuing the node deployment process.
If a problem occurs in the deployment process, providing a "continue deployment" button, and continuing to deploy the node only by inputting the name of the task where the problem is located, as shown in fig. 2, a user-side implementation flow diagram of an automated expansion cluster node is shown, a user operation page generates configuration information, and the configuration of the relevant parameters of the automated deployment script is dynamically modified through a proxy server; after the deployment request is sent out, automatically expanding the cluster nodes according to the dynamically generated configuration file; if a problem occurs in the deployment process, the platform provides a button for continuing to deploy, and the node can be continuously deployed only by inputting the name of the task where the problem is located.
The normal propulsion of the overall deployment process after the problem occurs in the deployment can be ensured under the configuration, and the deployment implementation efficiency is improved.
Further, since the implementation process of the node expansion process is complex and includes a large number of steps, in order to grasp the deployment progress in time and improve the practicability, on the basis of the above embodiment, after the node addition task is started, the following steps may be further performed:
(1) starting a node adding timing task, and acquiring a node adding log at a fixed time to determine the node adding progress;
(2) and returning the node adding progress to the client interface.
When a command for adding the node is sent, the agent end starts a timing task, receives a return result of the command at a timing, namely a log for adding the node, returns to the client, and displays the log on an interface of the client, so that the node adding progress can be conveniently and timely known, the abnormity in the node adding process can be timely sensed, and the user experience is improved.
The process of starting the node adding timing task and obtaining the node adding log at a fixed time to determine the node adding progress specifically may include the following steps:
(1) starting a node adding timing task, and acquiring a node adding log at regular time;
(2) positioning the current progress according to the task identifier in the node adding log;
(3) outputting and setting the current progress in a progress bar form to generate a node adding progress bar;
correspondingly, the process of returning the node adding progress to the client interface specifically includes: and returning the node adding progress bar to the client interface.
In the process of expanding the nodes, time steps are complicated, the overall required time is long, the current progress can be positioned according to specific marks in the node adding logs for improving user experience, the progress of the expanding nodes is displayed in the form of a progress bar and is output to a foreground page, a user can conveniently and visually check the progress, and the user experience can be improved.
The following introduces a kubernets node expansion apparatus provided in the embodiment of the present application, which is applied to a proxy end of an integrated infrastructure tool, and the kubernets node expansion apparatus described below and the kubernets node expansion method described above may be referred to in correspondence.
Fig. 3 is a block diagram of a structure of a kubernets node expansion apparatus based on a computer device according to an embodiment of the present application, and referring to fig. 3, the kubernets node expansion apparatus according to the embodiment mainly includes:
the request receiving unit 110 is mainly configured to receive a node addition request for a server; wherein the node addition request comprises: adding parameter information, wherein the adding parameter information comprises: cluster information and selected nodes to be added;
the information deployment unit 120 is mainly used for starting a node addition task and adding the addition parameter information into a hosts file and a variable file of a preconfigured automatic deployment script;
the script control unit 130 is mainly used for calling an ansable tool to send a cluster node expansion instruction to the server according to the hosts file and the variable file, so as to add a cluster node.
Further, an embodiment of the present application further discloses a computer device, where the computer device in this embodiment includes a memory and a processor, where the processor implements the steps of the above method for expanding kubernets node when executing a computer program stored in the memory, refer to the description of the method for expanding kubernets node in the foregoing embodiment, and are not described herein again.
Referring to fig. 4, a schematic structural diagram of a computer device provided in this embodiment is shown, where the computer device may have a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 322 (e.g., one or more processors) and a memory 332, and one or more storage media 330 (e.g., one or more mass storage devices) storing an application 342 or data 344. Memory 332 and storage media 330 may be, among other things, transient storage or persistent storage. The program stored on the storage medium 330 may include one or more modules (not shown), each of which may include a series of instructions operating on a data processing device. Still further, the central processor 322 may be configured to communicate with the storage medium 330 to execute a series of instruction operations in the storage medium 330 on the computer device 301.
The computer device 301 may also include one or more power supplies 326, one or more wired or wireless network interfaces 350, one or more input-output interfaces 358, and/or one or more operating systems 341, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, and so forth.
The steps in the above-described computer device-based kubernets node expansion method may be implemented by the structure of the computer device provided in this embodiment.
Further, an embodiment of the present application further discloses a readable storage medium, which is used for storing a program, where the program, when executed by a processor, implements the steps of the above method for expanding kubernets node, which may refer to the description of the method for expanding kubernets node in the foregoing embodiment, and is not described herein again.
The readable storage medium may be a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and various other readable storage media capable of storing program codes.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The kubernets node expansion method, device, equipment and readable storage medium provided by the present application are described in detail above. The principles and embodiments of the present application are explained herein using specific examples, which are provided only to help understand the method and the core idea of the present application. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.

Claims (10)

1. A method for expanding kubernets nodes is characterized by comprising the following steps:
the method comprises the steps that a proxy end of an integrated ansable tool receives a node adding request for a server end; wherein the node addition request comprises: adding parameter information, wherein the adding parameter information comprises: cluster information and selected nodes to be added;
starting a node adding task, and adding the adding parameter information into a hosts file and a variable file of a pre-configured automatic deployment script;
and calling an ansible tool to send a cluster node expansion instruction to the server according to the hosts file and the variable file so as to add cluster nodes.
2. The kubernets node expansion method of claim 1, wherein calling an ansable tool to send cluster node expansion instructions to the server according to the hosts file and the variable file to add cluster nodes, comprises:
copying a general certificate in the cluster to a node to be added;
judging whether the node to be added is provided with a docker or not;
if not, installing a docker in the node to be added;
if yes, installing a kubel assembly and a kube-proxy assembly in the node to be added, and generating a kubel and a kube-proxy certificate according to the general certificate file;
and installing the cluster network plug-ins according to the types of the cluster network plug-ins specified in the cluster information stored in the variable file.
3. The kubernets node expansion method of claim 2, wherein installing cluster network plugins according to the type of cluster network plugins specified in the cluster information stored in the variable file includes:
determining the type of the cluster network plug-in specified in the cluster information stored in the variable file;
if the type is a flannel network, controlling the node to be added to communicate with the cluster after the flannel is installed on the node to be added;
and if the type is the calico network, controlling the node to be added to communicate with the cluster.
4. The kubernets node expansion method of claim 1, further comprising:
carrying out node deployment abnormity detection;
if the node deployment abnormity detection finds that a problem occurs in the deployment process, suspending a node deployment process and retrieving a node addition log;
determining the task name with problems according to the node adding log;
and if a continuous deployment request for the problem task initiated by the user is received, continuing the node deployment process.
5. The kubernets node expansion method of claim 1, wherein after the initiating node adds a task, further comprising:
starting a node adding timing task, and acquiring a node adding log at a fixed time to determine the node adding progress;
and returning the node adding progress to a client interface.
6. The kubernets node expansion method of claim 5, wherein starting a node adding timing task, and obtaining a node adding log at regular time to determine a node adding progress comprises:
starting a node adding timing task, and acquiring a node adding log at regular time;
positioning the current progress according to the task identifier in the node adding log;
outputting and setting the current progress in a progress bar form to generate a node adding progress bar;
correspondingly, returning the node adding progress to the client interface comprises the following steps: and returning the node adding progress bar to the client interface.
7. The kubernets node expansion method according to any one of claims 1 to 6, wherein the agent side is a Maven project written by using a SpringBoot framework technology;
correspondingly, calling an ansable tool to send a cluster node expansion instruction to the server according to the hosts file and the variable file so as to add cluster nodes, wherein the steps of:
calling an ansable tool to generate a cluster node expansion instruction according to the hosts file and the variable file;
the cluster node expansion instruction is packed into a jar packet through a maven install command;
and calling the jar packet to send an operation instruction to the server.
8. A kubernets node expansion device is applied to a proxy end of an integrated ansable tool, and comprises the following components:
a request receiving unit, configured to receive a node addition request for a server; wherein the node addition request comprises: adding parameter information, wherein the adding parameter information comprises: cluster information and selected nodes to be added;
the information deployment unit is used for starting a node adding task and adding the adding parameter information into a hosts file and a variable file of a pre-configured automatic deployment script;
and the script control unit is used for calling an ansable tool to send a cluster node expansion instruction to the server according to the hosts file and the variable file so as to add cluster nodes.
9. A computer device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the kubernets node extension method of any of claims 1-7 when executing the computer program.
10. A readable storage medium, characterized in that the readable storage medium has stored thereon a program which, when executed by a processor, implements the steps of the kubernets node extension method according to any one of claims 1 to 7.
CN202010973258.5A 2020-09-16 2020-09-16 Method, device, equipment and storage medium for expanding kubernets nodes Pending CN112333229A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010973258.5A CN112333229A (en) 2020-09-16 2020-09-16 Method, device, equipment and storage medium for expanding kubernets nodes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010973258.5A CN112333229A (en) 2020-09-16 2020-09-16 Method, device, equipment and storage medium for expanding kubernets nodes

Publications (1)

Publication Number Publication Date
CN112333229A true CN112333229A (en) 2021-02-05

Family

ID=74303080

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010973258.5A Pending CN112333229A (en) 2020-09-16 2020-09-16 Method, device, equipment and storage medium for expanding kubernets nodes

Country Status (1)

Country Link
CN (1) CN112333229A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113438107A (en) * 2021-06-22 2021-09-24 康键信息技术(深圳)有限公司 Cluster node expansion method, device, equipment and storage medium
WO2023213262A1 (en) * 2022-05-06 2023-11-09 阿里巴巴(中国)有限公司 Mesh sidecar expansion method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106982266A (en) * 2017-05-27 2017-07-25 郑州云海信息技术有限公司 A kind of method and apparatus of automatically dispose cluster
US20190190776A1 (en) * 2017-12-15 2019-06-20 Red Hat Israel, Ltd. Deployment state based configuration generation
CN110166278A (en) * 2019-04-09 2019-08-23 平安科技(深圳)有限公司 Kubernetes cluster building method, apparatus, computer equipment and storage medium
CN110209407A (en) * 2019-06-12 2019-09-06 浪潮软件股份有限公司 A kind of big data cluster automatically dispose system and method
US20190303187A1 (en) * 2018-03-29 2019-10-03 The United States Of America As Represented By The Secretary Of The Navy Methods, devices, and systems for distributing software to and deploying software in a target environment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106982266A (en) * 2017-05-27 2017-07-25 郑州云海信息技术有限公司 A kind of method and apparatus of automatically dispose cluster
US20190190776A1 (en) * 2017-12-15 2019-06-20 Red Hat Israel, Ltd. Deployment state based configuration generation
US20190303187A1 (en) * 2018-03-29 2019-10-03 The United States Of America As Represented By The Secretary Of The Navy Methods, devices, and systems for distributing software to and deploying software in a target environment
CN110166278A (en) * 2019-04-09 2019-08-23 平安科技(深圳)有限公司 Kubernetes cluster building method, apparatus, computer equipment and storage medium
CN110209407A (en) * 2019-06-12 2019-09-06 浪潮软件股份有限公司 A kind of big data cluster automatically dispose system and method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
BUILDRUN技术团队: "从0到1使用Kubernetes系列(三)——使用Ansible安装Kubernetes集群"", 《稀土掘金》 *
关兴民等: "基于Kubernetes的气象私有云自动化部署与优化", 《信息技术》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113438107A (en) * 2021-06-22 2021-09-24 康键信息技术(深圳)有限公司 Cluster node expansion method, device, equipment and storage medium
WO2023213262A1 (en) * 2022-05-06 2023-11-09 阿里巴巴(中国)有限公司 Mesh sidecar expansion method and device

Similar Documents

Publication Publication Date Title
US20230198857A1 (en) Model driven process for automated deployment of domain 2.0 virtualized services and applications on cloud infrastructure
CN110389900B (en) Distributed database cluster testing method and device and storage medium
CN109976774B (en) Block link point deployment method, device, equipment and storage medium
CN110752947B (en) K8s cluster deployment method and device, and deployment platform
CN106878385B (en) Private cloud deployment method and device
US9172657B2 (en) Technique for resource creation in a cloud computing system
CN111741134B (en) System and method for quickly constructing virtual machine in large-scale scene of network shooting range
US11700262B2 (en) System and method to securely execute datacenter management operations remotely
CN112333229A (en) Method, device, equipment and storage medium for expanding kubernets nodes
CN111404628B (en) Time synchronization method and device
CN112860282B (en) Cluster plug-in upgrading method, device and server
CN113992738A (en) Reverse proxy method, device, equipment and storage medium based on micro service gateway
CN113438107A (en) Cluster node expansion method, device, equipment and storage medium
JP2017187883A (en) Information processing device, information processing system, and configuration change verification program
CN113645314B (en) Private cloud deployment method and server
CN113268254A (en) Cluster system installation method and device, electronic equipment and storage medium
CN106301855B (en) Network management system deployment method and device and network management system
CN114338461A (en) Network connection monitoring method and related equipment
CN113986423A (en) Bullet frame display method and system, storage medium and terminal equipment
CN114154526A (en) Two-dimensional code processing method and system, storage medium and electronic equipment
CN114513419A (en) Security policy configuration method and system
JP2012080378A (en) Protocol test device, protocol test method, and protocol test program
KR102637615B1 (en) Management apparatus for edge platform, and control method thereof
CN112035446B (en) Data extraction method, device and storage medium
CN115473799B (en) System and method for automatically deploying micro-service application of virtual machine

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20210205

RJ01 Rejection of invention patent application after publication