CN110752947B - K8s cluster deployment method and device, and deployment platform - Google Patents

K8s cluster deployment method and device, and deployment platform Download PDF

Info

Publication number
CN110752947B
CN110752947B CN201910995231.3A CN201910995231A CN110752947B CN 110752947 B CN110752947 B CN 110752947B CN 201910995231 A CN201910995231 A CN 201910995231A CN 110752947 B CN110752947 B CN 110752947B
Authority
CN
China
Prior art keywords
cluster
iaas
deployment
virtual machine
mirror image
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.)
Active
Application number
CN201910995231.3A
Other languages
Chinese (zh)
Other versions
CN110752947A (en
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.)
Beijing Inspur Data Technology Co Ltd
Original Assignee
Beijing Inspur Data Technology 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 Beijing Inspur Data Technology Co Ltd filed Critical Beijing Inspur Data Technology Co Ltd
Priority to CN201910995231.3A priority Critical patent/CN110752947B/en
Publication of CN110752947A publication Critical patent/CN110752947A/en
Application granted granted Critical
Publication of CN110752947B publication Critical patent/CN110752947B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing

Abstract

The application discloses a k8s cluster deployment method, a device, equipment and a readable storage medium, and a deployment platform. The method disclosed by the application comprises the following steps: obtaining IaaS cluster information; acquiring a mirror image component for deploying a k8s cluster from a preset container mirror image library; and if the communication connection with the IaaS cluster is established according to the network information of the IaaS cluster, deploying the mirror image component to a virtual machine in the IaaS cluster, and starting the mirror image component in the virtual machine. The mirror image component is deployed and operated in the virtual machine in a container mirror image mode, the type of an operating system on the virtual machine does not need to be concerned, so that the flexibility and the universality of k8s cluster deployment are improved, and the decoupling of the k8s cluster deployment and a cloud platform development framework is realized. Accordingly, the k8s cluster deployment device, the apparatus, the readable storage medium and the deployment platform disclosed in the present application also have the above technical effects.

Description

K8s cluster deployment method and device, and deployment platform
Technical Field
The present application relates to the field of computer technologies, and in particular, to a k8s cluster deployment method, apparatus, device, and readable storage medium, and a deployment platform.
Background
In the prior art, if a k8s cluster needs to be deployed for a cloud platform, the deployment can be realized by using a self-contained management tool of a current cloud platform development framework. For example: if the current cloud platform is developed by using Open Stack, the magnum in the Open Stack can be used to deploy the k8s cluster by using a virtual machine image and components such as keystone and neutron in the Open Stack.
The deployment mode needs to use some components of the development framework, so that the coupling degree of the k8s cluster deployment and the development framework is high. Moreover, the virtual machine image used in the deployment manner depends on the operating system in the virtual machine, and if the operating system in the virtual machine is not compatible with the Open Stack, the virtual machine image cannot be deployed. Therefore, the flexibility and the universality of the existing deployment mode are low.
The Open Stack is an Open-source cloud computing management platform project, and can provide a solution of infrastructure as a service (IaaS) through various complementary services, and each service provides an API for integration. The functions of IaaS layers such as virtual machine creation and storage resource division can be realized based on Open Stack, and a platform with the basic functions of the IaaS layers is called an IaaS cluster.
Kubernetes (k 8s for short) is a Google open source container cluster management system. On the basis of the Docker technology, k8s provides a series of complete functions such as deployment and operation, resource scheduling, service discovery, dynamic scaling and the like for containerized application, and can improve the convenience of large-scale container cluster management.
Therefore, how to decouple the k8s cluster deployment from the cloud platform development framework and improve the flexibility and the universality of the k8s cluster deployment mode is a problem to be solved by the technical personnel in the field.
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 k8s cluster deployment, so as to implement decoupling of k8s cluster deployment and a cloud platform development framework, and improve flexibility and universality of a k8s cluster deployment manner. The specific scheme is as follows:
in a first aspect, the present application provides a k8s cluster deployment method, including:
obtaining IaaS cluster information, wherein the IaaS cluster information at least comprises: network information of the IaaS cluster and an IP address of a virtual machine in the IaaS cluster;
acquiring a mirror image component for deploying a k8s cluster from a preset container mirror image library;
and if the communication connection with the IaaS cluster is established according to the network information, deploying the mirror image component to a virtual machine in the IaaS cluster, and starting the mirror image component in the virtual machine.
Preferably, deploying the mirror component to the virtual machine in the IaaS cluster includes:
and logging in the virtual machine, and deploying the mirror image component to the virtual machine through a docker run command.
Preferably, logging into the virtual machine comprises:
and logging in the virtual machine through ssh password-free.
Preferably, after the mirror image component in the virtual machine is started, the method further includes:
and if a k8s cluster deleting command is received, deleting the mirror image component from the virtual machine.
In a second aspect, the present application provides a k8s cluster deployment apparatus, including:
the first obtaining module is configured to obtain IaaS cluster information, where the IaaS cluster information at least includes: network information of the IaaS cluster and an IP address of a virtual machine in the IaaS cluster;
the second acquisition module is used for acquiring a mirror image component for deploying the k8s cluster from a preset container mirror image library;
and the deployment module is used for deploying the mirror image component to a virtual machine in the IaaS cluster and starting the mirror image component in the virtual machine if the communication connection with the IaaS cluster is established according to the network information.
In a third aspect, the present application provides a deployment platform comprising:
the IaaS cluster deployment terminal is used for creating an IaaS cluster and generating IaaS cluster information; the IaaS cluster information at least comprises: network information of the IaaS cluster and an IP address of a virtual machine in the IaaS cluster;
the k8s cluster deployment terminal is used for acquiring IaaS cluster information and acquiring a mirror image component for deploying the k8s cluster from a preset container mirror image library; if communication connection with the IaaS cluster is established according to the network information, deploying the mirror image component to a virtual machine in the IaaS cluster, and starting the mirror image component in the virtual machine;
and the scheduling end is used for realizing data interaction between the IaaS cluster deployment end and the k8s cluster deployment end.
Preferably, the scheduling end is further configured to:
acquiring a k8s cluster deployment command input by a user, and sending the k8s cluster deployment command to an IaaS cluster deployment terminal; and when the IaaS cluster information is acquired from the IaaS cluster deployment terminal, the IaaS cluster information is sent to the k8s cluster deployment terminal.
Preferably, the scheduling end is further configured to:
acquiring a k8s cluster deleting command input by a user; sending the k8s cluster deleting command to an IaaS cluster deploying end so that the IaaS cluster deploying end deletes the IaaS cluster according to the k8s cluster deleting command; and sending the k8s cluster deleting command to a k8s cluster deploying terminal, so that the k8s cluster deploying terminal deletes the mirror image component from the virtual machine according to the k8s cluster deleting command.
In a fourth aspect, the present application provides a k8s cluster deployment device, including:
a memory for storing a computer program;
a processor for executing a computer program to implement the k8s cluster deployment method disclosed in the foregoing.
In a fifth aspect, the present application provides a readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the k8s cluster deployment method disclosed in the foregoing.
According to the above scheme, the present application provides a k8s cluster deployment method, including: obtaining IaaS cluster information, wherein the IaaS cluster information at least comprises: network information of the IaaS cluster and an IP address of a virtual machine in the IaaS cluster; acquiring a mirror image component for deploying a k8s cluster from a preset container mirror image library; and if the communication connection with the IaaS cluster is established according to the network information, deploying the mirror image component to a virtual machine in the IaaS cluster, and starting the mirror image component in the virtual machine.
Therefore, after the IaaS cluster information is acquired and the mirror image component of the k8s cluster is deployed, the mirror image component can be deployed in the virtual machine of the IaaS cluster in a containerization mode, so that the mirror image component in the virtual machine is started, and the deployment of the k8s cluster is completed. In the method, mirror components for deploying the k8s cluster are stored in a container mirror library in advance, so that the components are deployed and run in a virtual machine in a container mirror mode, and therefore the mirror components can be installed and run on the virtual machine as long as the container environment can be deployed on the virtual machine. This approach does not need to be concerned with the type of operating system installed on the virtual machine, and thus flexibility and versatility are high. Meanwhile, the magnum and other components in the Open Stack are not used, so that decoupling of the IaaS cluster and the k8s cluster is realized, namely decoupling of deployment of the k8s cluster and a cloud platform development framework is realized.
Accordingly, the k8s cluster deployment device, the apparatus, the readable storage medium and the deployment platform provided by the present application also have the technical effects described above.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a k8s cluster deployment method disclosed in the present application;
fig. 2 is a schematic diagram of a k8s cluster deployment apparatus disclosed in the present application;
FIG. 3 is a schematic illustration of a deployment platform according to the present disclosure;
FIG. 4 is a schematic illustration of another deployment platform disclosed herein;
fig. 5 is a schematic diagram of a k8s cluster deployment device disclosed in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, and not all embodiments. 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.
At present, the existing k8s cluster deployment mode has high coupling degree with a development framework, depends on an operating system in a virtual machine, and has low flexibility and universality. Therefore, the k8s cluster deployment scheme is provided, decoupling of k8s cluster deployment and a cloud platform development framework can be achieved, and flexibility and universality of a k8s cluster deployment mode are improved.
Referring to fig. 1, an embodiment of the present application discloses a k8s cluster deployment method, including:
s101, obtaining IaaS cluster information, wherein the IaaS cluster information at least comprises: network information of the IaaS cluster and an IP address of a virtual machine in the IaaS cluster;
s102, acquiring a mirror image assembly for deploying a k8S cluster from a preset container mirror image library;
s103, if communication connection with the IaaS cluster is established according to the network information, deploying the mirror image component to a virtual machine in the IaaS cluster, and starting the mirror image component in the virtual machine.
In a specific embodiment, deploying an image component to a virtual machine in an IaaS cluster includes: and logging in the virtual machine, and deploying the mirror image component to the virtual machine through a docker run command.
Wherein, logging in virtual machine includes: and logging in the virtual machine through ssh password-free. Of course, the virtual machine may also be logged in using a username and password.
In one embodiment, after the image component in the virtual machine is started, the method further includes: and if a k8s cluster deleting command is received, deleting the mirror image component from the virtual machine.
As can be seen, in this embodiment, after the obtained IaaS cluster information and the mirror image component of the k8s cluster are deployed, the mirror image component may be deployed in the virtual machine in the IaaS cluster in a containerization manner, so as to start the mirror image component in the virtual machine and complete the deployment of the k8s cluster. In the method, mirror components for deploying the k8s cluster are stored in a container mirror library in advance, so that the components are deployed and run in a virtual machine in a container mirror mode, and therefore the mirror components can be installed and run on the virtual machine as long as the container environment can be deployed on the virtual machine. This approach does not need to be concerned with the type of operating system installed on the virtual machine, and thus flexibility and versatility are high. Meanwhile, the magnum and other components in the Open Stack are not used, so that decoupling of the IaaS cluster and the k8s cluster is realized, namely decoupling of deployment of the k8s cluster and a cloud platform development framework is realized.
A k8s cluster deployment device provided in the embodiment of the present application is introduced below, and a k8s cluster deployment device described below and a k8s cluster deployment method described above may refer to each other.
Referring to fig. 2, an embodiment of the present application discloses a k8s cluster deployment device, including:
a first obtaining module 201, configured to obtain IaaS cluster information, where the IaaS cluster information at least includes: network information of the IaaS cluster and an IP address of a virtual machine in the IaaS cluster;
a second obtaining module 202, configured to obtain a mirror image component of a deployment k8s cluster from a preset container mirror image library;
the deployment module 203 is configured to deploy the mirror image component to a virtual machine in the IaaS cluster and start the mirror image component in the virtual machine if the communication connection with the IaaS cluster is established according to the network information.
In a specific embodiment, the deployment module is specifically configured to:
and logging in the virtual machine, and deploying the mirror image component to the virtual machine through a docker run command.
In a specific embodiment, the deployment module is specifically configured to:
and logging in the virtual machine through ssh password-free.
In a specific embodiment, the method further comprises the following steps:
and the deleting module is used for deleting the mirror image component from the virtual machine if a k8s cluster deleting command is received.
For more specific working processes of each module and unit in this embodiment, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not described here again.
Therefore, the embodiment provides a k8s cluster deployment device, which can decouple k8s cluster deployment and a cloud platform development framework, and improve flexibility and universality of a k8s cluster deployment mode.
In the following, a deployment platform provided in the embodiments of the present application is introduced, and a deployment platform described below and a k8s cluster deployment method and apparatus described above may be referred to each other.
Referring to fig. 3, an embodiment of the present application discloses a deployment platform, including:
the IaaS cluster deployment end 301 is configured to create an IaaS cluster and generate IaaS cluster information; the IaaS cluster information at least comprises: network information of the IaaS cluster and an IP address of a virtual machine in the IaaS cluster;
the k8s cluster deployment terminal 302 is used for acquiring IaaS cluster information and acquiring a mirror image component for deploying the k8s cluster from a preset container mirror image library; if communication connection with the IaaS cluster is established according to the network information, deploying the mirror image component to a virtual machine in the IaaS cluster, and starting the mirror image component in the virtual machine;
and the scheduling end 303 is used for realizing data interaction between the IaaS cluster deployment end and the k8s cluster deployment end.
In a specific embodiment, the scheduling end is further configured to:
acquiring a k8s cluster deployment command input by a user, and sending the k8s cluster deployment command to an IaaS cluster deployment terminal; and when the IaaS cluster information is obtained from the IaaS cluster deployment terminal, sending the IaaS cluster information to the k8s cluster deployment terminal.
In a specific embodiment, the scheduling end is further configured to:
acquiring a k8s cluster deleting command input by a user; sending the k8s cluster deleting command to an IaaS cluster deploying end so that the IaaS cluster deploying end deletes the IaaS cluster according to the k8s cluster deleting command; and sending the k8s cluster deletion command to a k8s cluster deployment end, so that the k8s cluster deployment end deletes the mirror image component from the virtual machine according to the k8s cluster deletion command.
Therefore, the embodiment provides a deployment platform, and the device can realize decoupling of k8s cluster deployment and a cloud platform development framework, and improve flexibility and universality of a k8s cluster deployment mode.
Referring to fig. 4, an embodiment of the present application discloses another deployment platform, including: the system comprises an IaaS cluster deployment end, a k8s cluster deployment end and a scheduling end.
The scheduling end uniformly calls the IaaS cluster deployment end and the k8s cluster deployment end, wherein a user interface is provided and used for realizing an interactive function with a user. The deployment end of the k8s cluster is provided with a container mirror image library, wherein containerized k8s components are stored in the container mirror image library, and the IaaS cluster and the k8s cluster are decoupled through the containerized k8s components. The IaaS cluster deployment end only needs to meet the generation of computing storage network resources needed by the k8s cluster. The k8s cluster deployment end only needs to pay attention to role division and authority configuration of the k8s component, so that independent upgrading and independent extension of the k8s cluster deployment end and the k8s component are achieved, multi-cloud deployment and mixed cloud deployment can be achieved through the extension plug-in, and the k8s cluster deployment end has high practical value.
The IaaS cluster deployment end is mainly responsible for deployment and maintenance of IaaS layer resources, and realizes docking of the IaaS platform in a plug-in mode. And providing a unified interface for external connection to different IaaS platforms, and realizing platform extension through an extension plug-in (AWS plug-in). The IaaS cluster deployment terminal acquires the related specification parameters of the Iaas layer from the scheduling terminal (the parameters are input or specified by a user at the scheduling terminal), searches the corresponding IaaS platform plug-in, and calls an IaaS service interface to realize arrangement. Taking the Open Stack as an example, the Open Stack mainly uses Heat templates to realize the layout and deployment. Therefore, when an Open Stack environment is docked, an IaaS cluster deployment end realizes a set of heat resource templates, the templates define the incidence relation among resources such as a cloud host image, a network, a route, a security group, a data volume and the like required by a k8s cluster and the resources, meanwhile, a set of heat docking interfaces are realized, and the arrangement function of Open Stack resources can be realized by calling the heat interfaces.
Heat is a component of the automatic orchestration functionality provided by Open Stack, which orchestrates composite cloud applications based on descriptive templates. Heat provides developers and system administrators with a simple way to create and manage a batch of related Open Stack resources, and to configure and update them in an orderly and predictable manner. The user can use the example template of Heat or create a template itself to describe the Open Stack resources and any relevant dependencies or runtime parameters needed for the runtime of the application.
The k8s cluster deployment end is mainly responsible for deployment and management of a k8s cluster, the k8s cluster deployment end adopts containerization design, and decoupling of k8s and an IaaS environment is achieved by operating containerized k8s components on IaaS resources. And maintaining each version image of k8s and a corresponding installation deployment script in the deployment end of the k8s cluster, and realizing a local warehouse of a docker image, wherein components required for deploying the k8s cluster are stored. The k8s cluster deployment end acquires information such as role division, parameter configuration and the like related to the k8s cluster from the scheduling end (the information is input or specified by a user at the scheduling end); and the related specification parameters of the Iaas layer deployed by the IaaS cluster deployment end are further connected with the cloud host of the Iaas layer, and a docker run command is executed in the virtual machine so as to download the k8s mirror image from the local warehouse and start the mirror image in the virtual machine, thereby realizing the arranging function of the k8s cluster.
The scheduling end is responsible for receiving an instruction for creating the k8s cluster from a user, and distributing the instruction to the IaaS cluster deployment end and the k8s cluster deployment end after analysis; monitoring the state of IaaS resource creation of an IaaS cluster deployment end, acquiring related information of an IaaS layer, and transmitting the information to a k8s cluster deployment end; monitoring the creation state of a k8s cluster deployment end to a k8s cluster, and feeding back the creation progress to a user; a Metadata database is also maintained, and the corresponding relationship between the k8s cluster node and the cloud host node is recorded in the database, i.e., the corresponding relationship between the k8s cluster node and the virtual machine is calculated. For example: a group of components is installed on a plurality of virtual machines, so that the plurality of virtual machines can be regarded as a set, the set corresponds to the group of components, the group of components can be regarded as a k8s cluster node, and the cloud host node can be regarded as a virtual machine.
The process of deploying the k8s cluster includes:
a user fills in specification requirements of an IaaS cluster at a dispatching end, such as information of the number of master nodes, the specification of the master nodes, the number of slave nodes, the specification of the slave nodes, a network, a sub-network and the like; and the user fills in the parameter setting related to the k8s cluster at the dispatching end, such as information of a k8s version, a k8s network plug-in, a k8s intranet segment and the like.
And the scheduling end analyzes the specification requirement of the IaaS cluster and transmits the specification requirement to the IaaS cluster deployment end. The IaaS cluster deployment terminal creates the IaaS cluster according to the information, and after the creation of the IaaS cluster is completed, the IaaS cluster deployment terminal returns cluster information (including information such as the number of main nodes, the specification of the main nodes, the number of slave nodes, the specification of the slave nodes, a network and a sub-network) to the scheduling terminal.
And the dispatching end transmits the cluster information to the k8s cluster deployment end. The k8s cluster deployment end is connected with the IaaS cluster according to the cluster information, and pulls a k8s mirror image component in the local container mirror image warehouse; after the mirror image component is pulled, the k8s cluster deployment terminal logs in the virtual machine by ssh password-free login, installs the k8s mirror image component to the virtual machine according to the information of the k8s version, the k8s network plug-in, the k8s intranet segment and the like and a docker run command, and starts the k8s mirror image component in the virtual machine. And after starting, returning the deployment state to the scheduling end. The scheduling end feeds the state back to the user.
The k8s cluster deletion process includes:
and the user selects a k8s cluster to be deleted at the scheduling end, the scheduling end sends the relevant information of the k8s cluster to the k8s cluster deployment end, and the k8s cluster deployment end is connected with the cloud host to execute the deletion operation of the relevant components. And if necessary, the dispatching end sends the relevant information of the k8s cluster to the IaaS cluster deployment end, and the IaaS cluster deployment end deletes the relevant IaaS cluster. Whether the deletion is completed or not, the k8s cluster deployment end and the IaaS cluster deployment end return corresponding states to the scheduling end, so that the scheduling end feeds the deployment states back to the user.
Therefore, the deployment platform provided by the embodiment can realize decoupling of k8s cluster deployment and a cloud platform development framework, and improves flexibility and universality of a k8s cluster deployment mode.
In the following, a k8s cluster deployment device provided in an embodiment of the present application is introduced, and a k8s cluster deployment device described below and a k8s cluster deployment method and apparatus described above may be referred to each other.
Referring to fig. 5, an embodiment of the present application discloses a k8s cluster deployment device, including:
a memory 501 for storing a computer program;
a processor 502 for executing the computer program to implement the method disclosed in any of the embodiments above.
In the following, a readable storage medium provided in an embodiment of the present application is introduced, and a readable storage medium described below and a k8s cluster deployment method, apparatus, and device described above may be referred to each other.
A readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the k8s cluster deployment method disclosed in the foregoing embodiments. For the specific steps of the method, reference may be made to the corresponding contents disclosed in the foregoing embodiments, which are not described herein again.
References in this application to "first," "second," "third," "fourth," etc., if any, are intended to distinguish between similar elements and not necessarily to describe a particular order or sequence. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be implemented in other sequences than those illustrated or described herein. Furthermore, the terms "comprises" and "comprising," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, or apparatus.
It should be noted that the descriptions in this application referring to "first", "second", etc. are for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present application.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other.
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 readable storage medium known in the art.
The principle and the implementation of the present application are explained herein by applying specific examples, and the above description of the embodiments is only used to help understand the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A k8s cluster deployment method, comprising:
obtaining IaaS cluster information, wherein the IaaS cluster information at least comprises: network information of an IaaS cluster and an IP address of a virtual machine in the IaaS cluster;
acquiring a mirror image component for deploying a k8s cluster from a preset container mirror image library; the preset container mirror image library stores containerized k8s components;
if communication connection with the IaaS cluster is established according to the network information, the mirror image component is deployed to a virtual machine in the IaaS cluster, and the mirror image component in the virtual machine is started.
2. The k8s cluster deployment method of claim 1, wherein the deploying the mirror component to the virtual machine in the IaaS cluster comprises:
and logging in the virtual machine, and deploying the mirror image component to the virtual machine through a docker run command.
3. The k8s cluster deployment method of claim 2, wherein the logging in the virtual machine comprises:
and logging in the virtual machine through ssh password-free.
4. The k8s cluster deployment method according to any one of claims 1 to 3, further comprising, after the starting the mirror component in the virtual machine:
and if a k8s cluster deleting command is received, deleting the mirror image component from the virtual machine.
5. A k8s cluster deployment apparatus, comprising:
a first obtaining module, configured to obtain IaaS cluster information, where the IaaS cluster information at least includes: network information of an IaaS cluster and an IP address of a virtual machine in the IaaS cluster;
the second acquisition module is used for acquiring a mirror image component of a deployment k8s cluster from a preset container mirror image library; the preset container mirror image library stores containerized k8s components;
and the deployment module is used for deploying the mirror image component to a virtual machine in the IaaS cluster and starting the mirror image component in the virtual machine if communication connection with the IaaS cluster is established according to the network information.
6. A deployment platform, comprising:
the IaaS cluster deployment terminal is used for creating an IaaS cluster and generating IaaS cluster information; the IaaS cluster information at least includes: network information of an IaaS cluster and an IP address of a virtual machine in the IaaS cluster;
the k8s cluster deployment end is used for acquiring the IaaS cluster information and acquiring a mirror image component for deploying the k8s cluster from a preset container mirror image library; if communication connection with the IaaS cluster is established according to the network information, deploying the mirror image component to a virtual machine in the IaaS cluster, and starting the mirror image component in the virtual machine; the preset container mirror image library stores containerized k8s components;
and the scheduling end is used for realizing data interaction between the IaaS cluster deployment end and the k8s cluster deployment end.
7. The deployment platform of claim 6, wherein the dispatch node is further configured to:
acquiring a k8s cluster deployment command input by a user, and sending the k8s cluster deployment command to the IaaS cluster deployment terminal; and when the IaaS cluster information is acquired from the IaaS cluster deployment terminal, sending the IaaS cluster information to the k8s cluster deployment terminal.
8. The deployment platform of claim 6, wherein the dispatch node is further configured to:
acquiring a k8s cluster deleting command input by a user; sending the k8s cluster deleting command to the IaaS cluster deploying terminal so that the IaaS cluster deploying terminal deletes the IaaS cluster according to the k8s cluster deleting command; and sending the k8s cluster deletion command to the k8s cluster deployment end, so that the k8s cluster deployment end deletes the mirror image component from the virtual machine according to the k8s cluster deletion command.
9. A k8s cluster deployment device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the k8s cluster deployment method of any of claims 1 to 4.
10. A readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the k8s cluster deployment method of any of claims 1 to 4.
CN201910995231.3A 2019-10-18 2019-10-18 K8s cluster deployment method and device, and deployment platform Active CN110752947B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910995231.3A CN110752947B (en) 2019-10-18 2019-10-18 K8s cluster deployment method and device, and deployment platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910995231.3A CN110752947B (en) 2019-10-18 2019-10-18 K8s cluster deployment method and device, and deployment platform

Publications (2)

Publication Number Publication Date
CN110752947A CN110752947A (en) 2020-02-04
CN110752947B true CN110752947B (en) 2022-11-18

Family

ID=69278941

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910995231.3A Active CN110752947B (en) 2019-10-18 2019-10-18 K8s cluster deployment method and device, and deployment platform

Country Status (1)

Country Link
CN (1) CN110752947B (en)

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111338758A (en) * 2020-02-24 2020-06-26 华云数据(厦门)网络有限公司 Resource management method and device and electronic equipment
CN111367618A (en) * 2020-03-03 2020-07-03 山东汇贸电子口岸有限公司 Code management method, system, terminal and medium based on docker
CN111464603B (en) * 2020-03-24 2022-03-29 聚好看科技股份有限公司 Server capacity expansion method and system
CN111522622B (en) * 2020-04-14 2023-10-31 上海仪电(集团)有限公司中央研究院 K8S quick starting method based on cloud platform
WO2021217871A1 (en) * 2020-04-28 2021-11-04 平安科技(深圳)有限公司 Method and apparatus for deploying micro service cluster, computer device and storage medium
CN111629059B (en) * 2020-05-27 2022-12-16 浪潮电子信息产业股份有限公司 Cluster communication method, system, equipment and computer readable storage medium
CN111901157B (en) * 2020-07-10 2023-01-10 苏州浪潮智能科技有限公司 Service deployment method, device, equipment and medium based on k8s
CN112162819B (en) * 2020-09-18 2023-12-22 北京浪潮数据技术有限公司 Application deployment method crossing virtual machines and Kubernetes clusters
CN112148429A (en) * 2020-09-22 2020-12-29 江苏银承网络科技股份有限公司 Information processing method and device for managing container arrangement engine cluster
CN112433809B (en) * 2020-11-05 2023-12-22 北京浪潮数据技术有限公司 JVM memory management method, device, equipment and readable storage medium
CN113064598B (en) * 2021-03-24 2024-02-06 上海铼锶信息技术有限公司 Container cluster management system deployment method and deployment system
CN113722048B (en) * 2021-08-31 2023-10-27 杭州默安科技有限公司 IAST agent automatic deployment method and system in k8s
CN114297172B (en) * 2022-01-04 2022-07-12 北京乐讯科技有限公司 Cloud-native-based distributed file system
CN115051846B (en) * 2022-06-07 2023-11-10 北京天融信网络安全技术有限公司 K8S cluster deployment method based on super fusion platform and electronic equipment
CN115292026B (en) * 2022-10-10 2023-02-28 济南浪潮数据技术有限公司 Management method, device and equipment of container cluster and computer readable storage medium
CN117573295A (en) * 2024-01-16 2024-02-20 之江实验室 Multi-cluster component management method and device based on k8s and computer equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108809722A (en) * 2018-06-13 2018-11-13 郑州云海信息技术有限公司 A kind of method, apparatus and storage medium of deployment Kubernetes clusters
CN109194732A (en) * 2018-08-28 2019-01-11 郑州云海信息技术有限公司 A kind of the High Availabitity dispositions method and device of OpenStack
CN109743192A (en) * 2018-12-04 2019-05-10 新华三云计算技术有限公司 A kind of container cluster configuration management method and device
CN109756366A (en) * 2018-12-24 2019-05-14 上海欣方智能系统有限公司 System is realized in intelligent network SCP cloud service based on CAAS
CN110297653A (en) * 2019-07-02 2019-10-01 浪潮云信息技术有限公司 A kind of method of container service upgrading

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11044162B2 (en) * 2016-12-06 2021-06-22 Cisco Technology, Inc. Orchestration of cloud and fog interactions

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108809722A (en) * 2018-06-13 2018-11-13 郑州云海信息技术有限公司 A kind of method, apparatus and storage medium of deployment Kubernetes clusters
CN109194732A (en) * 2018-08-28 2019-01-11 郑州云海信息技术有限公司 A kind of the High Availabitity dispositions method and device of OpenStack
CN109743192A (en) * 2018-12-04 2019-05-10 新华三云计算技术有限公司 A kind of container cluster configuration management method and device
CN109756366A (en) * 2018-12-24 2019-05-14 上海欣方智能系统有限公司 System is realized in intelligent network SCP cloud service based on CAAS
CN110297653A (en) * 2019-07-02 2019-10-01 浪潮云信息技术有限公司 A kind of method of container service upgrading

Also Published As

Publication number Publication date
CN110752947A (en) 2020-02-04

Similar Documents

Publication Publication Date Title
CN110752947B (en) K8s cluster deployment method and device, and deployment platform
CN108809722B (en) Method, device and storage medium for deploying Kubernetes cluster
JP7421511B2 (en) Methods and apparatus, electronic devices, readable storage media and computer programs for deploying applications
CN112214330A (en) Method and device for deploying master nodes in cluster and computer-readable storage medium
CN108369532B (en) System and method for packaging tools for first and third party component deployment
CN111741134B (en) System and method for quickly constructing virtual machine in large-scale scene of network shooting range
CN104967664A (en) Automatic cloud deploying system and method
CN113296792B (en) Storage method, device, equipment, storage medium and system
CN107741852B (en) Service deployment method based on cluster software
CN110138577B (en) Cluster creation method, first server and readable storage medium
CN105553741A (en) Automatic deployment method for application system based on cloud computing
CN113742031B (en) Node state information acquisition method and device, electronic equipment and readable storage medium
CN106790092B (en) Remote procedure call server control system and method
CN112269640B (en) Method for realizing life cycle management of container cloud component
CN113645071B (en) Cluster deployment method, system, medium and electronic terminal
CN110890987A (en) Method, device, equipment and system for automatically creating cluster
EP1607861A2 (en) Method and apparatus for deploying software applications using a zone architecture
EP3230865B1 (en) Recovery execution system using programatic generation of actionable workflows
CN113778486A (en) Containerization processing method, device, medium and equipment for code pipeline
CN113419818B (en) Basic component deployment method, device, server and storage medium
CN113296795A (en) Application deployment method, device, equipment, storage medium and program product
US20140181176A1 (en) Graphical user interface for hadoop system administration
CN110782040A (en) Method, device, equipment and medium for training tasks of pitorch
CN116107694A (en) Deployment method and device of k8s sub-cluster and storage medium
CN115113975A (en) Cluster management method and device, electronic equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant