CN113676501A - Application deployment method and device based on Kubernetes cluster and electronic equipment - Google Patents

Application deployment method and device based on Kubernetes cluster and electronic equipment Download PDF

Info

Publication number
CN113676501A
CN113676501A CN202010405399.7A CN202010405399A CN113676501A CN 113676501 A CN113676501 A CN 113676501A CN 202010405399 A CN202010405399 A CN 202010405399A CN 113676501 A CN113676501 A CN 113676501A
Authority
CN
China
Prior art keywords
application
service
container
cluster
creating
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
CN202010405399.7A
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.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network 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 Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202010405399.7A priority Critical patent/CN113676501A/en
Publication of CN113676501A publication Critical patent/CN113676501A/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/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
    • 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
    • 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/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The application provides an application deployment method and device based on a Kubernetes cluster and electronic equipment, relates to the technical field of container service, and solves the technical problem that a user has high difficulty in using the container service. The method comprises the following steps: analyzing the received deployment command of the application to obtain the container configuration parameters of the application; creating a container in the compute node according to the container configuration parameters; analyzing the received deployment command of the application to obtain the service access type of the application; and creating the service of the application in the container by utilizing the cluster management tool according to the service access type.

Description

Application deployment method and device based on Kubernetes cluster and electronic equipment
Technical Field
The application relates to the technical field of container service, in particular to a Kubernetes cluster-based application deployment method and device and electronic equipment.
Background
The Container Service (Container Service) is a Service capable of providing high-performance scalable Container application management, performing application lifecycle management through a Container, providing a variety of application publishing manners and continuous delivery capabilities, and supporting a micro-Service architecture.
In the container service, a container cluster management system kubernets (abbreviated as K8S) is generally used to manage a container cluster, thereby providing a highly scalable and high-performance container management service with a container as a core. K8S is a distributed architecture leading scheme based on container technology, and can provide a series of complete functions such as deployment and operation, resource scheduling, service discovery and dynamic scaling for containerized applications, thereby improving the convenience of large-scale container cluster management.
Currently, in the container service based on the above K8S, a user is required to define a deployment (deployment) resource file and a service (service) resource file, and create a container and a service using a native command, and an update process of an application and a service also needs to be completed by changing the resource files of the deployment and the service. Therefore, in the current application deployment process, a user needs to write complex deployment and service to define files, and the use difficulty of the user is high.
Disclosure of Invention
The invention aims to provide an application deployment method, an application deployment device and electronic equipment based on a K8S cluster, so as to solve the technical problem that a user has high difficulty in using container services.
In a first aspect, an embodiment of the present application provides an application deployment method based on a K8S cluster, where the K8S cluster includes a master node and multiple computing nodes, and the application deployment method includes:
analyzing the received deployment command of the application to obtain the container configuration parameters of the application;
creating a container in the compute node according to the container configuration parameters;
analyzing the received deployment command of the application to obtain the service access type of the application;
and creating the service of the application in the container by utilizing the cluster management tool according to the service access type.
In one possible implementation, the service access type is public network access, Virtual Private Cloud (VPC) intranet access, intra-cluster access, or no service access provided.
In a possible implementation, when the service access type is public network access, the step of creating, by using a cluster management tool, a service of an application in the container according to the service access type includes:
establishing public network load balance by using an open Application Programming Interface (API for short);
creating a service of an application in the container using a Kube-API;
locking the public network load balance on the service;
and returning a service public network Internet Protocol (IP) address.
In a possible implementation, when the service access type is VPC intranet access, the step of creating an application service in the container by using a cluster management tool according to the service access type includes:
establishing VPC intranet load balance by utilizing an open API;
creating a service of an application in the container using a Kube-API;
the VPC intranet load balance is locked on the service;
and returning the IP address of the service intranet.
In one possible implementation, when the service access type is intra-cluster access, the step of creating a service of an application in the container by using a cluster management tool according to the service access type includes:
creating a service of an application in the container using a Kube-API;
the service cluster IP address is returned.
In a possible implementation, before the step of obtaining the container configuration parameters of the application by parsing the received deployment command of the application, the method further includes:
a deployment command for an application is received through a front-end console.
In one possible implementation, the method further includes:
and returning the operation information of the container to the front-end console.
In one possible implementation, the container configuration parameters include at least an image and a service access type.
In a second aspect, an embodiment of the present application provides an application deployment apparatus based on a K8S cluster, where the K8S cluster includes a master node and a plurality of computing nodes, and the application deployment apparatus includes:
the first acquisition module is used for acquiring the container configuration parameters of the application by analyzing the received deployment command of the application;
a first creation module for creating a container in the compute node according to the container configuration parameters;
the second acquisition module is used for acquiring the service access type of the application by analyzing the received deployment command of the application;
and the second creating module is used for creating the service of the application in the container by utilizing the cluster management tool according to the service access type.
In a third aspect, an embodiment of the present application further provides an electronic device, which includes a memory and a processor, where the memory stores a computer program that is executable on the processor, and the processor implements the method of the first aspect when executing the computer program.
In a fourth aspect, this embodiment of the present application further provides a computer-readable storage medium storing machine executable instructions, which, when invoked and executed by a processor, cause the processor to perform the method of the first aspect.
The embodiment of the application brings the following beneficial effects:
the embodiment of the application deployment method and device based on the K8S cluster and the electronic equipment, by analyzing the received deployment command of the application, the container configuration parameters and the service access type of the application can be obtained, then, a container can be created in the computing node of the K8S cluster by using the parsed container configuration parameters, and the service of the application can be created in the created container by using the parsed service access type, so as to create corresponding container and application service according to different configurations of container configuration parameters and service access types in the deployment command, therefore, the user can create the corresponding service only by directly configuring various parameters of application deployment at the front end without writing complex deployment and service resource files, therefore, the complexity of service deployment is simplified, and the use difficulty of the container service by the user is greatly reduced.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the detailed description of the present application or the technical solutions in the prior art, the drawings needed to be used in the detailed description of the present application or the prior art description will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic flowchart of an application deployment method based on a K8S cluster according to an embodiment of the present application;
fig. 2 is a timing diagram of an application deployment method based on a K8S cluster according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an application deployment apparatus based on a K8S cluster according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions of the present application will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all 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 terms "comprising" and "having," and any variations thereof, as referred to in the embodiments of the present application, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements but may alternatively include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In a container cluster managed by Kubernetes (K8S for short), there are managed nodes, each Kubernetes cluster is managed and controlled by a Master, and a command can be sent to each Node through the Master. A plurality of Pod may be operated on the Node, and each Pod may contain a plurality of containers.
The K8S can generally call various processes through the API Server to complete the deployment and control of the Node. The core function of the API Server is the operation of adding and deleting modification and check to the core object, wherein the core object can be the components of K8S such as pod, service, deployment, Kube-API and the like.
Among them, deployment is cluster-oriented management in K8S for managing stateless applications. service is an abstract service object in K8S that defines a set of logical collections of Pod and a policy for accessing them. The Kube-API is a component of K8S for interaction, which controls changes in the core resources of K8S.
At present, in the K8S-based container service, a common application deployment method is to require a user to write a complex deployment vector and service file, and directly use a native kubecect command to create a container and a service (an application container refers to a pod object in K8S), and the update of the application and the service also needs to be completed by changing the deployment vector and the service file.
However, in this method, a user is required to write a complicated default and service definition file, and the difficulty is high for an unfamiliar user. Moreover, after deployment is completed, the resource definition file needs to be updated synchronously for updating deployment of the application, so that the efficiency is low and the maintenance cost is high. Moreover, when the user deploys the application, the user needs to rely on a kubecect client command, and the use convenience degree is low.
Based on this, the embodiment of the application provides an application deployment method and device based on a K8S cluster, and an electronic device. The method can solve the technical problem that the use difficulty of the user for the container service is higher.
Embodiments of the present invention are further described below with reference to the accompanying drawings.
Fig. 1 is a schematic flowchart of an application deployment method based on a K8S cluster according to an embodiment of the present application. Wherein the K8S cluster includes a master node and a plurality of compute nodes. As shown in fig. 1, the method includes:
step S110, obtaining the container configuration parameters of the application by analyzing the received deployment command of the application.
In this step, the back-end server receives the deployment command of the application sent by the front-end console, and then analyzes the deployment command of the application, thereby obtaining the container configuration parameters of the application.
The configuration parameters in the application deployment request may include optional parameters and mandatory parameters. The optional parameters may include storage volume type, container resource limitation, container instance adjustment policy, and the like, and the user may configure local storage or cloud hard disk storage according to requirements, and configure a container resource usage range and a pod flexible policy.
Step S120, creating a container in the computing node according to the container configuration parameters.
In this step, the back-end server creates a container corresponding to the container configuration parameter in the computing node of the K8S cluster according to the container configuration parameter obtained through the analysis in step S110.
Step S130, obtaining the service access type of the application by analyzing the received deployment command of the application.
In practical applications, the deployment command of the application may include configuration parameters and an image, and the configuration parameters may include a storage volume type, a container resource limit, a container instance adjustment policy, a service access type, and the like. The user can configure different storage types, the use range of the container resource, the elastic expansion strategy of the pod and the access mode of the service according to the requirement.
In this step, the back-end server may analyze the received deployment command of the application, so as to obtain the service access type of the application.
And step S140, creating the service of the application in the container by using the cluster management tool according to the service access type.
In this step, the back-end server may create, according to the service access type obtained through the analysis in step S130, an application service corresponding to the service access type in the container created in step S120 by using the cluster management tool.
In the embodiment of the application, by analyzing the received deployment command of the application, the container configuration parameters and the service access types of the application can be obtained, then, a container can be created in the computing node of the K8S cluster by using the analyzed container configuration parameters, and then, the service of the application is created in the created container by using the analyzed service access types, so as to implement different configurations according to the container configuration parameters and the service access types in the deployment command to create corresponding containers and application services, therefore, a user only needs to select and fill various parameters for configuring application deployment through a front end, a back end server can receive an application deployment request sent by the user for deploying the application, and create the container and the service according to different configurations in the request, without depending on a cluster environment, and without defining a deployment vector and a service resource file, so that the user does not need to learn and write complex deployment vector and service files, the corresponding service can be established only by directly configuring various parameters of application deployment at the front end without directly interacting with a bottom-layer command by an operator, so that the complexity of service deployment is simplified, and the learning cost and the use difficulty of a user are greatly reduced.
The above steps are described in detail below.
In some embodiments, the service access type is public network access, VPC intranet access, intra-cluster access, or no service access provided.
In practical applications, the service access type may support multiple access types, for example, service access is not provided, intra-VPC access, intra-cluster access, and public network access, and the server may determine whether to create load balancing and what type of load balancing instance to create according to different access types.
In the embodiment of the application, more service access types are provided, more configurations can be performed, various service configurations can be more flexible and changeable, sufficient optional configurations can be provided, and various application deployment requirements of users can be met.
In some embodiments, when the service access type is public network access, the step S140 may include the following steps:
and step S1400, creating public network load balance by using the open API.
In step S1401, a service of an application is created in a container using a Kube-API.
Step S1402, the load of the public network is locked on the service in a balanced manner.
Step S1403, returns the service public network IP address.
If the service access type is public network access, the back end calls openapi to establish public network load balance, and establishes an elastic public network IP address and executes dynamic mounting and synchronous back end service of the monitor, thereby realizing public network access in various service access types and providing more targeted service.
In some embodiments, when the service access type is VPC intranet access, the step S140 may include the following steps:
and step S1404, establishing VPC intranet load balance by utilizing the open API.
Step S1405, utilizing Kube-API to create the service of the application in the container.
And step S1406, the load balance of the VPC intranet is locked on the service.
Step S1407, returns the IP address of the service intranet.
It should be noted that Kube-API is a component for interaction in K8S, which controls the change of core resource in K8S. The functions of the Kube-API include common application program interfaces, access right control, registration, information storage (etcd), and the like. And the Scheduler is also included below the Node and used for binding the Pod to be scheduled to the Node and writing the binding information into the etcd, wherein the etcd is used for storing the resource information.
If the service access type is VPC internal access, the back end calls openapi to establish internal network load balance and executes dynamic mounting of the monitor and synchronization of back end service, so that VPC internal network access in various service access types is realized, and more targeted service is provided.
In some embodiments, when the service access type is intra-cluster access, the step S140 may include the following steps:
step S1408, the service of the application is created in the container by utilizing the Kube-API.
Step S1409 returns the service cluster IP address.
If the service access type is intra-cluster access, the back end directly creates a cluster service without creating load balance, namely, the service access is directly exposed by using a service mechanism of a K8S cluster, so that VPC intranet access in various service access types is realized, and more targeted service is provided.
In some embodiments, before step S110, the method may further include the steps of:
step S109, receiving a deployment command of the application through the front-end console.
The user can fill in the configuration parameters through the front-end console, and then the back-end server can establish and deploy the application service. For a specific interaction flow between the front-end console and the back-end server, as shown in fig. 2, a user may configure a container and a service on the front-end console and then click to create the container, the front-end console transmits various configured parameters to the back-end server, the back-end server analyzes the configuration of the container first, then calls a kube-api to create a container instance, and after the container is successfully created, analyzes the service configuration, and determines the service access type. If the service access type is intra-cluster access, the back end directly creates a cluster service without creating load balancing. If the service access type is public network access, the back end calls openapi to establish public network load balance; and if the service access type is access in the vpc, calling openapi by the back end to create intranet load balance. And then, calling the kube-api to create a cluster service instance, and binding load balance to the cluster service instance to realize different access types of the service.
The deployment command of the application is received through the front-end console, so that the operations of filling in configuration parameters and the like of a user can be more convenient and faster without influencing the establishment of the deployment application service by the back-end server.
In some embodiments, the method may further comprise the steps of:
step S150, the operation information of the container is returned to the front console.
Wherein the operation information includes an operation state and a service IP.
In the embodiment of the application, after the application and the service are created, the front-end console may display the operation state of the container and the service IP. Therefore, the user can more conveniently check the running state and the service IP and conveniently acquire more information.
By providing the method provided by the embodiment of the application, deployment of the application in the cloud is realized, more configurations can be performed, responses meeting requirements are created through more flexible optional configurations, more service access types are provided to expand a native service access mechanism of a cluster, and more capabilities of the application for providing services to the outside are realized.
In some embodiments, the container configuration parameters include at least an image and a service access type.
In practical applications, the configuration parameters in the application deployment request may include various different requirements and configurations, such as images, service access types, and the like. The images therein may select container images from private and public image repositories. And different service access modes can be configured according to requirements through the service access types.
In some embodiments, the deployment application may also be created by providing an interface through a public cloud, and the user may deploy the container and the service by only configuring necessary parameters through a front-end interface. The method is simple in deployment, operators do not need to directly interact with bottom-layer commands, corresponding services can be created only by configuration on a front-end interface, and complexity of service deployment is simplified.
Fig. 3 provides a schematic structural diagram of an application deployment apparatus based on a K8S cluster. Wherein the K8S cluster includes a master node and a plurality of compute nodes. As shown in fig. 3, the application deployment apparatus 300 based on the K8S cluster includes:
a first obtaining module 301, configured to obtain a container configuration parameter of an application by analyzing a received deployment command of the application;
a first creating module 302, configured to create a container in a computing node according to a container configuration parameter;
a second obtaining module 303, configured to obtain a service access type of the application by analyzing the received deployment command of the application;
a second creating module 304, configured to create the service of the application in the container by using the cluster management tool according to the service access type.
In some embodiments, the service access type is public network access, VPC intranet access, intra-cluster access, or no service access provided.
In some embodiments, the second creation module 304 is specifically configured to:
establishing public network load balance by utilizing an open API;
creating a service of the application in the container using the Kube-API;
the load of the public network is balanced and locked on the service;
and returning the service public network IP address.
In some embodiments, the second creation module 304 is specifically configured to:
establishing VPC intranet load balance by utilizing an open API;
creating a service of the application in the container using the Kube-API;
the load balance of the VPC intranet is locked on the service;
and returning the IP address of the service intranet.
In some embodiments, the second creation module 304 is specifically configured to:
creating a service of the application in the container using the Kube-API;
the service cluster IP address is returned.
In some embodiments, the apparatus further comprises:
and the receiving module is used for receiving the deployment command of the application through the front-end console.
In some embodiments, the apparatus further comprises:
and the return module is used for returning the operation information of the container to the front-end console.
In some embodiments, the container configuration parameters include at least an image and a service access type.
The application deployment device based on the K8S cluster provided by the embodiment of the application has the same technical characteristics as the application deployment method based on the K8S cluster provided by the embodiment, so that the same technical problems can be solved, and the same technical effects can be achieved.
As shown in fig. 4, an electronic device 400 provided in an embodiment of the present application includes a memory 401 and a processor 402, where the memory stores a computer program that can run on the processor, and the processor executes the computer program to implement the steps of the method provided in the foregoing embodiment.
Referring to fig. 4, the electronic device further includes: a bus 403 and a communication interface 404, the processor 402, the communication interface 404 and the memory 401 being connected by the bus 403; the processor 402 is used to execute executable modules, such as computer programs, stored in the memory 401.
The Memory 401 may include a high-speed Random Access Memory (RAM), and may also include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The communication connection between the network element of the system and at least one other network element is realized through at least one communication interface 404 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, and the like can be used.
Bus 403 may be an ISA bus, PCI bus, EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 4, but that does not indicate only one bus or one type of bus.
The memory 401 is used for storing a program, and the processor 402 executes the program after receiving an execution instruction, and the method performed by the apparatus defined by the process disclosed in any of the foregoing embodiments of the present application may be applied to the processor 402, or implemented by the processor 402.
The processor 402 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 402. The Processor 402 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 401, and the processor 402 reads the information in the memory 401 and completes the steps of the method in combination with the hardware.
Corresponding to the application deployment method based on the K8S cluster, an embodiment of the present application further provides a computer readable storage medium storing machine executable instructions, which, when invoked and executed by a processor, cause the processor to execute the steps of the application deployment method based on the K8S cluster.
The application deployment apparatus based on the K8S cluster provided in the embodiment of the present application may be specific hardware on a device, or software or firmware installed on a device, or the like. The device provided by the embodiment of the present application has the same implementation principle and technical effect as the foregoing method embodiments, and for the sake of brief description, reference may be made to the corresponding contents in the foregoing method embodiments where no part of the device embodiments is mentioned. It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the foregoing systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
For another example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional units in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product, where the computer software product is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the application deployment method based on the K8S cluster according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus once an item is defined in one figure, it need not be further defined and explained in subsequent figures, and moreover, the terms "first", "second", "third", etc. are used merely to distinguish one description from another and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present application, and are used for illustrating the technical solutions of the present application, but not limiting the same, and the scope of the present application is not limited thereto, and although the present application is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope disclosed in the present application; such modifications, changes or substitutions do not depart from the scope of the embodiments of the present application. Are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (11)

1. An application deployment method based on a Kubernetes cluster, wherein the cluster comprises a main node and a plurality of computing nodes, and the application deployment method comprises the following steps:
analyzing the received deployment command of the application to obtain the container configuration parameters of the application;
creating a container in the compute node according to the container configuration parameters;
analyzing the received deployment command of the application to obtain the service access type of the application;
and creating the service of the application in the container by utilizing the cluster management tool according to the service access type.
2. The method of claim 1, wherein the service access type is public network access, VPC intranet access, intra-cluster access, or no service access.
3. The method of claim 2, wherein when the service access type is public network access, the step of creating the service of the application in the container by using the cluster management tool according to the service access type comprises:
establishing public network load balance by utilizing an open API;
creating a service of an application in the container using a Kube-API;
locking the public network load balance on the service;
and returning the service public network IP address.
4. The method according to claim 2, wherein when the service access type is VPC intranet access, the step of creating the service of the application in the container by using the cluster management tool according to the service access type comprises:
establishing VPC intranet load balance by utilizing an open API;
creating a service of an application in the container using a Kube-API;
the VPC intranet load balance is locked on the service;
and returning the IP address of the service intranet.
5. The method of claim 2, wherein when the service access type is intra-cluster access, the step of creating a service of an application in the container using a cluster management tool according to the service access type comprises:
creating a service of an application in the container using a Kube-API;
the service cluster IP address is returned.
6. The method according to claim 1, wherein before the step of obtaining the container configuration parameters of the application by parsing the received deployment command of the application, the method further comprises:
a deployment command for an application is received through a front-end console.
7. The method of claim 6, further comprising:
and returning the operation information of the container to the front-end console.
8. The method of claim 1, wherein the container configuration parameters comprise at least an image and a service access type.
9. An application deployment apparatus based on a Kubernetes cluster, the cluster including a master node and a plurality of computing nodes, the application deployment apparatus comprising:
the first acquisition module is used for acquiring the container configuration parameters of the application by analyzing the received deployment command of the application;
a first creation module for creating a container in the compute node according to the container configuration parameters;
the second acquisition module is used for acquiring the service access type of the application by analyzing the received deployment command of the application;
and the second creating module is used for creating the service of the application in the container by utilizing the cluster management tool according to the service access type.
10. An electronic device comprising a memory and a processor, wherein the memory stores a computer program operable on the processor, and wherein the processor implements the steps of the method of any of claims 1 to 8 when executing the computer program.
11. A computer readable storage medium having stored thereon machine executable instructions which, when invoked and executed by a processor, cause the processor to execute the method of any of claims 1 to 8.
CN202010405399.7A 2020-05-13 2020-05-13 Application deployment method and device based on Kubernetes cluster and electronic equipment Pending CN113676501A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010405399.7A CN113676501A (en) 2020-05-13 2020-05-13 Application deployment method and device based on Kubernetes cluster and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010405399.7A CN113676501A (en) 2020-05-13 2020-05-13 Application deployment method and device based on Kubernetes cluster and electronic equipment

Publications (1)

Publication Number Publication Date
CN113676501A true CN113676501A (en) 2021-11-19

Family

ID=78537217

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010405399.7A Pending CN113676501A (en) 2020-05-13 2020-05-13 Application deployment method and device based on Kubernetes cluster and electronic equipment

Country Status (1)

Country Link
CN (1) CN113676501A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114189436A (en) * 2021-12-08 2022-03-15 深圳Tcl新技术有限公司 Multi-cluster configuration deployment method and device, electronic equipment and storage medium
CN114338820A (en) * 2021-12-31 2022-04-12 中国电信股份有限公司 Network access method, device, electronic equipment and storage medium
CN115061783A (en) * 2022-07-22 2022-09-16 广东浪潮智慧计算技术有限公司 Service configuration method and device for Kubernetes container cluster
CN115242856A (en) * 2022-06-15 2022-10-25 飞诺门阵(北京)科技有限公司 Cluster reconstruction method and system
CN115695529A (en) * 2023-01-04 2023-02-03 深圳市万睿智能科技有限公司 Intelligent remote operation and maintenance method and device, computer equipment and storage medium
CN117785224A (en) * 2023-12-12 2024-03-29 暗物质(北京)智能科技有限公司 Model deployment method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109032760A (en) * 2018-08-01 2018-12-18 北京百度网讯科技有限公司 Method and apparatus for application deployment
US20190272205A1 (en) * 2016-11-25 2019-09-05 Huawei Technologies Co., Ltd. Container deployment method, communication method between services, and related apparatus
CN110333877A (en) * 2019-07-09 2019-10-15 西安点告网络科技有限公司 Visualized container configuring management method, apparatus and system based on application
CN110413288A (en) * 2019-07-31 2019-11-05 新华三大数据技术有限公司 Using dispositions method, device, server and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190272205A1 (en) * 2016-11-25 2019-09-05 Huawei Technologies Co., Ltd. Container deployment method, communication method between services, and related apparatus
CN109032760A (en) * 2018-08-01 2018-12-18 北京百度网讯科技有限公司 Method and apparatus for application deployment
CN110333877A (en) * 2019-07-09 2019-10-15 西安点告网络科技有限公司 Visualized container configuring management method, apparatus and system based on application
CN110413288A (en) * 2019-07-31 2019-11-05 新华三大数据技术有限公司 Using dispositions method, device, server and storage medium

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114189436A (en) * 2021-12-08 2022-03-15 深圳Tcl新技术有限公司 Multi-cluster configuration deployment method and device, electronic equipment and storage medium
CN114189436B (en) * 2021-12-08 2024-04-30 深圳Tcl新技术有限公司 Multi-cluster configuration deployment method and device, electronic equipment and storage medium
CN114338820A (en) * 2021-12-31 2022-04-12 中国电信股份有限公司 Network access method, device, electronic equipment and storage medium
CN115242856A (en) * 2022-06-15 2022-10-25 飞诺门阵(北京)科技有限公司 Cluster reconstruction method and system
CN115242856B (en) * 2022-06-15 2024-01-23 飞诺门阵(北京)科技有限公司 Cluster reconstruction method and system
CN115061783A (en) * 2022-07-22 2022-09-16 广东浪潮智慧计算技术有限公司 Service configuration method and device for Kubernetes container cluster
CN115695529A (en) * 2023-01-04 2023-02-03 深圳市万睿智能科技有限公司 Intelligent remote operation and maintenance method and device, computer equipment and storage medium
CN117785224A (en) * 2023-12-12 2024-03-29 暗物质(北京)智能科技有限公司 Model deployment method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN113676501A (en) Application deployment method and device based on Kubernetes cluster and electronic equipment
CN108809722B (en) Method, device and storage medium for deploying Kubernetes cluster
CN107689882B (en) Method and device for service deployment in virtual network
CN110413288B (en) Application deployment method, device, server and storage medium
CN106301829B (en) A kind of method and apparatus of network service dilatation
US9229759B2 (en) Virtual machine provisioning using replicated containers
CN107959582B (en) Slice instance management method and device
CN113748685A (en) Network-based media processing control
CN108279882B (en) Framework generation method, device, equipment and computer readable medium
CN114244717B (en) Configuration method and device of virtual network card resources, computer equipment and medium
CN110032451A (en) Distributed multilingual message realization method, device and server
US20240111549A1 (en) Method and apparatus for constructing android running environment
CN114448895B (en) Application access method, device, equipment and medium
CN109104368B (en) Connection request method, device, server and computer readable storage medium
KR102674017B1 (en) Network resource management method, system, network device and readable storage medium
CN113157339A (en) Application service expansion method, system, storage medium and device based on OSB
CN114968406B (en) Plug-in management method and device, electronic equipment and storage medium
CN114661375A (en) Application integration method and device
US10169841B1 (en) Dynamic interface synchronization for virtualized graphics processing
CN108370329B (en) Management method and device for management function object
CN112698930A (en) Method, device, equipment and medium for obtaining server identification
CN112261125A (en) Centralized unit cloud deployment method, device and system
WO2023124657A1 (en) Micro-application running method and apparatus, device, storage medium, and program product
CN111459510A (en) Cross-network operating system installation method and device, electronic equipment and medium
CN114662102A (en) File processing method and device 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20211119

RJ01 Rejection of invention patent application after publication