CN109067828B - Kubernetes and OpenStack container-based cloud platform multi-cluster construction method, medium and equipment - Google Patents

Kubernetes and OpenStack container-based cloud platform multi-cluster construction method, medium and equipment Download PDF

Info

Publication number
CN109067828B
CN109067828B CN201810654438.XA CN201810654438A CN109067828B CN 109067828 B CN109067828 B CN 109067828B CN 201810654438 A CN201810654438 A CN 201810654438A CN 109067828 B CN109067828 B CN 109067828B
Authority
CN
China
Prior art keywords
cluster
tenant
container
cloud platform
user
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
CN201810654438.XA
Other languages
Chinese (zh)
Other versions
CN109067828A (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 Volcano Engine Technology Co Ltd
Original Assignee
Hangzhou Caicloud 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 Hangzhou Caicloud Technology Co ltd filed Critical Hangzhou Caicloud Technology Co ltd
Priority to CN201810654438.XA priority Critical patent/CN109067828B/en
Publication of CN109067828A publication Critical patent/CN109067828A/en
Application granted granted Critical
Publication of CN109067828B publication Critical patent/CN109067828B/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
    • 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/0893Assignment of logical groups to network elements

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The multi-cluster construction method based on the Kubernetes and the OpenStack container cloud platform comprises the steps of establishing a control cluster in the container cloud platform, defining a cluster API through a control cluster CRD, and establishing a cluster controller and a node resource pool in a controller cluster; the control cluster receives a cluster operation request sent by a user and modifies a cluster CR record, a cluster controller checks the cluster CR record and resource change through a list-watch mechanism, user cluster deletion and addition, node deletion and addition operations are carried out according to the resource change, and the cluster controller updates the cluster state; the control cluster receives a cross-cluster operation request sent by a user, the cluster controller judges whether the cross-cluster operation request corresponds to a cluster API, if so, the cross-cluster operation request is forwarded to the corresponding cluster for processing, and otherwise, the cross-cluster operation request is processed. The invention also relates to a storage medium and an electronic device. The invention realizes the construction of multiple clusters and multiple tenants of the container cloud platform, the multiple clusters are managed uniformly, and the tenants can share the same cluster.

Description

Kubernetes and OpenStack container-based cloud platform multi-cluster construction method, medium and equipment
Technical Field
The invention relates to the technical field of cloud computing, in particular to a Kubernetes and OpenStack container based cloud platform multi-cluster construction method, medium and equipment.
Background
Kubernets is a container cluster management system with Google open source, provides functions of application deployment, maintenance, extension mechanism and the like, can conveniently manage cross-machine operation containerized application by utilizing the kubernets, and has main functions of packaging, instantiating and operating an application program by using Docker; running and managing containers across machines in a cluster mode; the problem of communication between cross-machine containers of Docker is solved; the self-healing mechanism of Kubernetes allows a container cluster to always run in a state desired by the user. The native kubernets all work in a single cluster, and unified management of a plurality of clusters cannot be realized, such as cluster level creation and deletion, cluster node addition and deletion, cross-cluster request forwarding and the like.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention aims to provide a Kubernetes and OpenStack container cloud platform-based multi-cluster construction method for realizing unified management of a plurality of clusters.
The invention provides a Kubernetes and OpenStack container based cloud platform multi-cluster construction method, which comprises the following steps:
defining a cluster API, establishing a control cluster in a container cloud platform, defining the cluster API through the CRD, establishing a cluster controller and a node resource pool in the controller cluster, and establishing the container cloud platform by adopting Kubernets;
cluster management, wherein the control cluster receives a cluster operation request sent by a user and modifies a cluster CR record, the cluster controller checks the cluster CR record and resource change through a list-watch mechanism, and performs user cluster deletion, user cluster addition, node deletion and node addition operations according to the resource change, and the cluster controller updates the cluster state;
and forwarding the cross-cluster request, wherein the control cluster receives the cross-cluster operation request sent by the user, the cluster controller judges whether the cross-cluster operation request corresponds to the cluster API, if so, the cross-cluster operation request is forwarded to the corresponding cluster for processing, and otherwise, the cross-cluster operation request is processed.
Further, in cluster management, the cluster controller receives a node creation instruction, creates a node CR record, the node creation instruction includes a node IP and authentication information, the cluster controller checks the node CR record state through a list-watch mechanism, creates a long task to add nodes, logs in a new node through the authentication information, acquires machine resources, and updates the new node state.
Further, in cluster management, the cluster controller receives a cluster creating instruction, where the cluster creating instruction includes cluster information and cluster node information, the cluster controller checks whether a node corresponding to the cluster node information is bindable, and if so, creates a cluster CR record, the cluster controller checks a state of the cluster CR record through a list-watch mechanism and updates an operation log of a corresponding node, and the cluster controller creates a long task to create a cluster, binds a newly created cluster with a corresponding node, and updates a newly created cluster state and a node state.
Further, the method also comprises the step of creating the multi-tenant, wherein the step of creating the multi-tenant comprises the following steps:
responding to a tenant creating request, wherein the container cloud platform responds to the tenant creating request sent by a user through an API gateway, acquires a tenant list of OpenStack, and returns the tenant list to the user;
creating a container tenant, wherein the container cloud platform acquires an associated tenant selected by a user in the tenant list, creates a container tenant associated with the associated tenant, and allocates the user cluster resource selected by the user to the container tenant;
responding to a partition creating request, wherein the container cloud platform responds to the partition creating request sent by a user under the container tenant and a user cluster corresponding to the container tenant, acquires a tenant router list of OpenStack, and returns the tenant router list to the user;
creating a tenant partition, wherein the container cloud platform acquires an associated router selected by a user in the tenant router list and Service CIDR and Pod CIDR specified according to the ID range of the associated router, sends a request for OpenStack to create a network belonging to the associated router and create Service subnet and Pod subnet belonging to the network to OpenStack, the Service CIDR corresponds to the Service subnet, the Pod CIDR corresponds to the Pod subnet, the container cloud platform creates a tenant partition, and associates the tenant partition with the container tenant, the associated router, the network, the Pod subnet and the Service subnet.
Further, in the container tenant creation process, the container cloud platform is provided with a system administrator, the system administrator creates a container tenant associated with the associated tenant, adds the tenant administrator of the container tenant, allocates resources under the corresponding cluster to the container tenant, stores the resources and the state of the container tenant into an etcd database, and the tenant administrator allocates permissions and resources to members in the container tenant.
Further, the method also comprises the following steps: updating tenant resources, acquiring the resource state of the container tenant from the etcd database through the apiserver by the container cloud platform, and modifying the resources of the container tenant according to the resource state; further comprising the steps of: and deleting the tenant, wherein the container cloud platform responds to a tenant deleting request sent by a user through the API gateway, and deletes the container tenant and the corresponding binding relationship.
Further, in the tenant partition creation, the container cloud platform acquires a router created by a user, and Service CIDRs and Pod CIDRs specified according to the created router ID range, and sends a request for OpenStack to create a network belonging to the router created by the user and create Service subnet and Pod subnet belonging to the network to OpenStack.
Further, the method also comprises the following steps: deleting the partition, wherein the container cloud platform responds to a partition deleting request sent by a user through an API gateway, deletes the Service subnet, the Pod subnet and the network, and deletes the tenant partition and the corresponding binding relationship when the router is a router created by the user and the router created by the user is not bound with other tenant partitions; further comprising the steps of: creating a tenant service, sending a request for creating the tenant service to an apiserver by the system administrator, creating a container tenant service, and storing the resource and the state of the container tenant service to an etcd database; further comprising the steps of: creating Loadbalancers, enabling the container cloud platform to obtain the resource state of the container tenant service from the etcd database through an apiserver, creating corresponding Neutron LBaaS according to the resource state, updating the container tenant service IP according to the virtual IP of the Loadbalancers, and creating corresponding Listener, Member Pool and Members in the Neutron according to the Protocol, Port and Endpoints of the container tenant service.
An electronic device, comprising: a processor; a memory; and a program, wherein the program is stored in the memory and configured to be executed by the processor, the program comprising instructions for performing a kubernets and OpenStack container cloud platform based multi-cluster building method.
A computer-readable storage medium having stored thereon a computer program for execution by a processor of a kubernets and OpenStack container based cloud platform multi-cluster construction method.
Compared with the prior art, the invention has the beneficial effects that:
1. the method realizes the unified management of a plurality of clusters, such as cluster level creation and deletion, cluster node addition and deletion, and cross-cluster request forwarding;
2. the same cluster can be shared among multiple tenants;
3. the container cloud platform tenant can use the corresponding Openstack tenant resource;
4. tenants can own virtual machine resources and container (Pod) resources simultaneously;
5. virtual machines and containers belonging to the same tenant can realize mutual access in the tenant;
6. the resource isolation among different tenants can be ensured, and mutual access cannot be realized;
7. the reallocation of computing resources under tenants is solved.
The foregoing description is only an overview of the technical solutions of the present invention, and in order to make the technical solutions of the present invention more clearly understood and to implement them in accordance with the contents of the description, the following detailed description is given with reference to the preferred embodiments of the present invention and the accompanying drawings. The detailed description of the present invention is given in detail by the following examples and the accompanying drawings.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a schematic flow chart of a Kubernetes and OpenStack container cloud platform-based multi-cluster construction method of the present invention;
FIG. 2 is a flowchart of cluster management steps in a Kubernetes and OpenStack container cloud platform-based multi-cluster construction method of the present invention;
FIG. 3 is a flow chart of cross-cluster request forwarding steps in a Kubernetes and OpenStack container cloud platform based multi-cluster construction method of the present invention;
FIG. 4 is a flowchart of a step of responding to a tenant creation request and a step of creating a container tenant in the Kubernets and OpenStack container cloud platform-based multi-cluster construction method of the present invention;
FIG. 5 is a flow chart of a tenant deletion step in a Kubernetes and OpenStack container cloud platform-based multi-cluster construction method of the present invention;
FIG. 6 is a flowchart of a step of responding to a partition creation request and a step of creating a tenant partition in the Kubernets and OpenStack container cloud platform-based multi-cluster construction method of the present invention;
FIG. 7 is a flowchart of a partition deletion step in the Kubernetes and OpenStack container-based cloud platform multi-cluster construction method of the present invention;
fig. 8 is a schematic structural diagram of a container cloud platform multi-cluster structure based on Kubernetes and OpenStack according to an embodiment of the present invention;
FIG. 9 is a diagram of a Kubernetes and OpenStack-based container cloud platform multi-cluster architecture according to an embodiment of the present invention;
fig. 10 is a flowchart of a tenant resource updating step in a Kubernetes and OpenStack container cloud platform-based multi-cluster construction method according to an embodiment of the present invention;
fig. 11 is a flowchart of a system administrator initializing tenants according to an embodiment of the present invention.
Detailed Description
The present invention will be further described with reference to the accompanying drawings and the detailed description, and it should be noted that any combination of the embodiments or technical features described below can be used to form a new embodiment without conflict.
A Kubernetes and OpenStack container cloud platform-based multi-cluster construction method is shown in figure 1 and comprises the following steps:
defining a cluster API, establishing a control cluster in a container cloud platform, defining the cluster API through a control cluster CRD, establishing a cluster controller and a node resource pool in a controller cluster, and establishing the container cloud platform by adopting Kubernets; the cluster controller of the container cloud platform is controlled to run by the cluster, the node resource pool records all machine resources in the container cloud platform, and the node state transition diagram describes the transition process of the node state in the node resource pool.
Cluster management, as shown in fig. 2, the cluster controller controls the cluster to receive a cluster operation request sent by a user and modify a cluster CR record, checks the cluster CR record and a resource change through a list-watch mechanism, performs operations of user cluster deletion, user cluster addition, node deletion, and node addition according to the resource change, and updates a cluster state; and the user cluster sends a heartbeat packet to the control cluster at regular time to carry out health check on the user cluster. And storing the nodes which are offline in the cluster in a node resource pool for convenient reuse. Preferably, in the cluster management, the cluster controller receives a node creation instruction, creates a node CR record, the node creation instruction includes a node IP and authentication information, the authentication information includes a username-password manner or a ssh public key authentication manner, the successful creation of the node CR record is successful, that is, the response is successful, the node CR records that the initial state is "in creation", the cluster controller checks the node CR record state through a list-watch mechanism, the node CR records that the initial state is "in creation", the cluster controller creates a long task to add the node, logs in a new node through the authentication information, specifically, logs in through the ssh manner, if the logging is unsuccessful, the node is considered to be unavailable, and acquires a machine resource, such as cpu/mem/disk/gpu information, and updates the new node state to be allocated "or" failed ". Preferably, in the cluster management, the cluster controller receives a cluster creating instruction, the cluster creating instruction includes cluster information and cluster node information, the cluster controller checks whether a node corresponding to the cluster node information is bindable, if so, a cluster CR record is created, if the cluster CR record is successful, the cluster CR record returns to success, the initial state is "creating", an operation log of a corresponding node is updated, the cluster controller checks the cluster CR record state through a list-watch mechanism, if it is detected that the cluster CR record initial state is "creating", the cluster controller creates a long task to perform cluster creation, binds the newly created cluster with the corresponding node, in this embodiment, the control nodes must all be successfully bound, the binding result of the common node is not constrained, the node states are all marked as "binding", if the control nodes all are marked successfully, updating the newly-built cluster state and the node state, in the event obtained from the watch, if the state is 'in Kubernets installation', performing cluster installation, calling the script for installation, transmitting information of the cluster and the available nodes when calling the script, updating the node state, namely 'in installation component' or 'failure', if the script is called and returned to failure, considering that the installation is failed, and if the installation is successful, updating the node state, namely 'in operation'.
Forwarding the cross-cluster request, as shown in fig. 3, controlling the cluster to receive the cross-cluster operation request sent by the user, determining whether the cross-cluster operation request corresponds to the cluster API, if so, forwarding the cross-cluster operation request to the corresponding cluster for processing, and determining whether the state of the corresponding cluster is normal, if normal, processing the request by the corresponding cluster, if not, returning an error, otherwise, processing the cross-cluster operation request.
In an embodiment, preferably, the method further includes the step of creating the multi-tenant, and the step of creating the multi-tenant includes the following steps:
in response to the create tenant request, as shown in fig. 4, in this embodiment, the user browser sends the create tenant request to the container cloud platform through api-gateway through a Web-Console application, which is a Web-based application that allows the shell command to be executed on the server directly from the browser. The container cloud platform responds to a tenant creating request sent by a user, requests OpenStack to obtain a tenant list, OpenStack-admin sends the request to keystone, the keystone carries out authentication and authorization, after the authentication is passed, OpenStack resources can be accessed, the tenant list of OpenStack is obtained, each project of the OpenStack is a tenant, the tenant list is filtered, the filtered tenant list is returned to the user, and the container cloud platform is constructed by Kubernets.
In this embodiment, as shown in fig. 9, the relationship between a user cluster and a tenant is a many-to-many relationship, one tenant can apply for resources in multiple user clusters, if a developer has write permission in developing a cluster, there is read permission in a test cluster, information of the tenant is stored in a moncluster to ensure high availability, and meanwhile, information such as configuration, application configuration and the like in the cluster is related to the tenant, so long as there are resources in the tenant, all clusters can be directly used, and cross-cluster resource sharing is realized.
Responding to the partition creating request, as shown in fig. 6, sending a partition creating request under a cluster corresponding to a container tenant and a container tenant by a user, responding to the partition creating request under the cluster corresponding to the container tenant and the container tenant sent by the user by the container cloud platform, requesting OpenStack to acquire a tenant router list, sending the request to a keystone by OpenStack-admin, authenticating and authenticating by the keystone, accessing OpenStack resources after authentication is passed, acquiring the tenant router list of OpenStack, and returning the tenant router list to the user.
And creating a tenant partition, selecting the associated router from the tenant router list by the user, and designating Service CIDR and Pod CIDR according to the ID range of the associated router, wherein the user is preferably supported to create the router. The user creates a router, and appoints a Service CIDR and a Pod CIDR according to the created router ID range, and the container cloud platform obtains the router created by the user and the Service CIDR and the Pod CIDR appointed according to the created router ID range. The method comprises the steps that a container cloud platform obtains an associated router selected by a user in a Tenant router list and Service CIDR and Pod CIDR specified according to an ID range of the associated router, requests for OpenStack to create a network belonging to the associated router and to create Service subnet and Pod subnet belonging to the network are sent to OpenStack, OpenStack creates the network belonging to the associated router and to create the Service subnet and Pod subnet belonging to the network, Service CIDR corresponds to the Service subnet, Pod CIDR corresponds to the Pod subnet, container cloud platform creates a Tenant partition, the Tenant partition is associated with container tenants, the associated router, the container cloud platform, the Service subnet and the Pod subnet, partition creation information is successfully returned to the user, as shown in figure 8, Tenant-1, Tenant Team-2, Tenant Team-3, Tenaam-4 and Tenaam-4 can apply for multiple Tenant resources such as 1-Tenant Team, Tenaam-2, Tenaam-3 and Tenaam-4, and each Tenant can apply for multiple resources such as a Tenant-3-Tenant cluster, The Tenant Team-4 respectively has resources of a Development cluster, a Test cluster, a Staging cluster and a Production cluster, defines Tenant resources as partitions, designates the partitions as namespaces, and is abbreviated as NS in the figure, so that the tenants can have partitions across the clusters, and different tenants can share the same cluster.
In an embodiment, preferably, in creating a container tenant, the container cloud platform sets a system administrator, the system administrator creates a container tenant associated with an associated tenant, adds a tenant administrator of the container tenant, allocates resources under a corresponding cluster to the container tenant, stores resources and states of the container tenant in an etcd database, and the tenant administrator allocates permissions and resources to members in the container tenant, as shown in fig. 11, the system administrator uses all clusters as a resource pool, creates the tenant and allocates resources to the tenant, then adds the tenant administrator, the tenant administrator has all permissions of the tenant, allocates permissions to groups through rbac rules, and the members in the groups have corresponding resources and permissions. In this embodiment, as shown in fig. 10, the cauth component is responsible for tenant management, group management, and user management, and adds a member to a tenant after the tenant is created, where the member has a default permission under the tenant, for example, to view group information of the current tenant of the member. The tenant administrator may assign a permission to the group, which is owned by all members of the group. Each tenant also has a default group, all members in the default group default tenant are in the group, authority is allocated to the default group, namely, authority is allocated to all members in the tenant, a tenant-admin component is responsible for resource allocation in the cluster tenant, a system administrator allocates part of resources in a certain cluster to the tenant, a CRD with the same name as the tenant is created in the cluster, and the CRD comprises the size of the resources allocated by the system administrator, which indicates how many resources in the cluster the tenant has. For example, 10core and 10Gi resources of a development cluster are allocated to a development A tenant, and then a person in charge of the development group A is set as a tenant administrator, and all the tenant resources are allocated by the tenant administrator.
In one embodiment, it is preferable that the method further includes the steps of: updating tenant resources, acquiring resource states of container tenants from an etcd database through apiserver by the container cloud platform, and modifying the resources of the container tenants according to the resource states, as shown in fig. 10, using a kubernets list-watch mechanism by a span-controller, modifying the resource size of the current tenants through the resource change of the list-watch span, and performing resource cleaning. If all resources are released after the tenant is deleted, the state of the tenant needs to be modified after the resource quota of the tenant is modified. And after the namespace or pod in the tenant is deleted, updating the resource use condition of the current tenant in real time.
As shown in fig. 5, it is preferable that the method further comprises the steps of: and deleting the tenant, wherein the user sends a tenant deleting request, the container cloud platform responds to the tenant deleting request sent by the user through the API gateway, deletes the container tenant and the corresponding binding relationship, and returns tenant deleting success information to the user.
As shown in fig. 7, it is preferable that the method further comprises the steps of: and deleting the partition, wherein the user sends a partition deleting request, the container cloud platform responds to the partition deleting request sent by the user through the API gateway, deletes Service subnet, Pod subnet and network, deletes the tenant partition and the corresponding binding relationship when the router is the router created by the user and the router created by the user is not bound with other tenant partitions, and returns partition deleting success information to the user.
In one embodiment, it is preferable that the method further includes the steps of: and creating the tenant service, sending a request for creating the tenant service to the apiserver by a system administrator, creating the container tenant service, and storing the resource and the state of the container tenant service to the etcd database. Preferably, the method further comprises the following steps: creating a Loadbalancer, acquiring the resource state of a container tenant Service from an etcd database by a container cloud platform through an apiserver, creating a corresponding Neutron lbaaS (Loadbalancer as a Service) according to the resource state, updating a container tenant Service IP according to a virtual IP of the Loadbalancer, and creating a corresponding Lister, Member Pool and Members in the Neutron according to a Protocol, a Port and an Endpoints of the container tenant Service.
It should be appreciated that an electronic device includes: a processor; a memory; and a program, wherein the program is stored in the memory and configured to be executed by the processor, the program comprising instructions for performing a kubernets and OpenStack container based cloud platform multi-cluster building method also falling within the protection of the present invention; a computer-readable storage medium, on which a computer program is stored, the computer program being executed by a processor based on a kubernets and OpenStack container cloud platform multi-cluster construction method, also belongs to the protection of the present invention.
The foregoing is merely a preferred embodiment of the invention and is not intended to limit the invention in any manner; those skilled in the art can readily practice the invention as shown and described in the drawings and detailed description herein; however, those skilled in the art should appreciate that they can readily use the disclosed conception and specific embodiments as a basis for designing or modifying other structures for carrying out the same purposes of the present invention without departing from the scope of the invention as defined by the appended claims; meanwhile, any changes, modifications, and evolutions of the equivalent changes of the above embodiments according to the actual techniques of the present invention are still within the protection scope of the technical solution of the present invention.

Claims (9)

1. The Kubernetes and OpenStack container cloud platform-based multi-cluster construction method is characterized by comprising the following steps of:
defining a cluster API, establishing a control cluster in a container cloud platform, defining the cluster API through the CRD, establishing a cluster controller and a node resource pool in the control cluster, and constructing the container cloud platform by adopting Kubernets;
cluster management, wherein the control cluster receives a cluster operation request sent by a user and modifies a cluster CR record, the cluster controller checks the cluster CR record and resource change through a list-watch mechanism, and performs user cluster deletion, user cluster addition, node deletion and node addition operations according to the resource change, and the cluster controller updates the cluster state;
forwarding a cross-cluster request, wherein the control cluster receives a cross-cluster operation request sent by a user, the cluster controller judges whether the cross-cluster operation request corresponds to the cluster API, if so, the cross-cluster operation request is forwarded to a corresponding cluster for processing, otherwise, the cross-cluster operation request is processed;
in cluster management, a cluster controller receives a node creation instruction, creates a node CR record, the node creation instruction comprises a node IP and authentication information, the cluster controller checks the node CR record state through a list-watch mechanism, the cluster controller creates a long task to increase nodes, logs in a new node through the authentication information, acquires machine resources and updates the new node state.
2. The Kubernetes and OpenStack container cloud platform-based multi-cluster construction method of claim 1, wherein: in the cluster management, the cluster controller receives a cluster creating instruction, the cluster creating instruction comprises cluster information and cluster node information, the cluster controller checks whether nodes corresponding to the cluster node information can be bound, if so, a cluster CR record is created, the cluster controller checks the state of the cluster CR record through a list-watch mechanism and updates an operation log of the corresponding node, the cluster controller creates a long task to create a cluster, binds the newly-created cluster with the corresponding node, and updates the newly-created cluster state and the node state.
3. The Kubernetes and OpenStack container cloud platform based multi-cluster building method of claim 2, further comprising the step of creating multi-tenants, the step of creating multi-tenants comprising:
responding to a tenant creating request, wherein the container cloud platform responds to the tenant creating request sent by a user through an API gateway, acquires a tenant list of OpenStack, and returns the tenant list to the user;
creating a container tenant, wherein the container cloud platform acquires an associated tenant selected by a user in the tenant list, creates a container tenant associated with the associated tenant, and allocates the user cluster resource selected by the user to the container tenant;
responding to a partition creating request, wherein the container cloud platform responds to the partition creating request sent by a user under the container tenant and a user cluster corresponding to the container tenant, acquires a tenant router list of OpenStack, and returns the tenant router list to the user;
creating a tenant partition, wherein the container cloud platform acquires an associated router selected by a user in the tenant router list and Service CIDR and Pod CIDR specified according to the ID range of the associated router, sends a request for OpenStack to create a network belonging to the associated router and create Service subnet and Pod subnet belonging to the network to OpenStack, the Service CIDR corresponds to the Service subnet, the Pod CIDR corresponds to the Pod subnet, the container cloud platform creates a tenant partition, and associates the tenant partition with the container tenant, the associated router, the network, the Pod subnet and the Service subnet.
4. The Kubernetes and OpenStack container cloud platform-based multi-cluster construction method of claim 3, wherein: in the container tenant creating process, the container cloud platform is provided with a system administrator, the system administrator creates a container tenant associated with the associated tenant, adds the tenant administrator of the container tenant, allocates resources under a corresponding cluster for the container tenant, stores the resources and the state of the container tenant to an etcd database, and the tenant administrator allocates permissions and resources for members in the container tenant.
5. The Kubernetes and OpenStack container cloud platform-based multi-cluster construction method of claim 4, further comprising the steps of: updating tenant resources, acquiring the resource state of the container tenant from the etcd database through the apiserver by the container cloud platform, and modifying the resources of the container tenant according to the resource state; further comprising the steps of: and deleting the tenant, wherein the container cloud platform responds to a tenant deleting request sent by a user through the API gateway, and deletes the container tenant and the corresponding binding relationship.
6. The Kubernets and OpenStack container cloud platform-based multi-cluster construction method according to claim 3, wherein in the process of creating a tenant partition, the container cloud platform acquires a router created by a user and Service CIDR and Pod CIDR specified according to an ID range of the created router, and sends a request for OpenStack to create a network belonging to the router created by the user and create Service subnet and Pod subnet belonging to the network to OpenStack.
7. The Kubernetes and OpenStack container cloud platform-based multi-cluster construction method of claim 4, further comprising the steps of: deleting the partition, wherein the container cloud platform responds to a partition deleting request sent by a user through an API gateway, deletes the Service subnet, the Pod subnet and the network, and deletes the tenant partition and the corresponding binding relationship when the router is a router created by the user and the router created by the user is not bound with other tenant partitions; further comprising the steps of: creating a tenant service, sending a request for creating the tenant service to an apiserver by the system administrator, creating a container tenant service, and storing the resource and the state of the container tenant service to an etcd database; further comprising the steps of: creating Loadbalancers, enabling the container cloud platform to obtain the resource state of the container tenant service from the etcd database through an apiserver, creating corresponding Neutron LBaaS according to the resource state, updating the container tenant service IP according to the virtual IP of the Loadbalancers, and creating corresponding Listener, Member Pool and Members in the Neutron according to the Protocol, Port and Endpoints of the container tenant service.
8. An electronic device, characterized by comprising: a processor; a memory; and a program, wherein the program is stored in the memory and configured to be executed by the processor, the program comprising instructions for carrying out the method of claims 1-7.
9. A computer-readable storage medium having stored thereon a computer program, characterized in that: the computer program is executed by a processor for performing the method according to claims 1-7.
CN201810654438.XA 2018-06-22 2018-06-22 Kubernetes and OpenStack container-based cloud platform multi-cluster construction method, medium and equipment Active CN109067828B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810654438.XA CN109067828B (en) 2018-06-22 2018-06-22 Kubernetes and OpenStack container-based cloud platform multi-cluster construction method, medium and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810654438.XA CN109067828B (en) 2018-06-22 2018-06-22 Kubernetes and OpenStack container-based cloud platform multi-cluster construction method, medium and equipment

Publications (2)

Publication Number Publication Date
CN109067828A CN109067828A (en) 2018-12-21
CN109067828B true CN109067828B (en) 2022-01-04

Family

ID=64820922

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810654438.XA Active CN109067828B (en) 2018-06-22 2018-06-22 Kubernetes and OpenStack container-based cloud platform multi-cluster construction method, medium and equipment

Country Status (1)

Country Link
CN (1) CN109067828B (en)

Families Citing this family (37)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109871384B (en) * 2019-02-22 2021-04-30 携程旅游信息技术(上海)有限公司 Method, system, equipment and storage medium for container migration based on PaaS platform
CN109947537A (en) * 2019-03-28 2019-06-28 山东浪潮云信息技术有限公司 Create the system and method for cloud container service
CN112087312B (en) * 2019-06-15 2023-02-03 华为云计算技术有限公司 Method, device and equipment for providing edge service
CN110278133B (en) * 2019-07-31 2021-08-13 中国工商银行股份有限公司 Checking method, device, computing equipment and medium executed by server
CN110519361B (en) * 2019-08-22 2022-07-29 北京宝兰德软件股份有限公司 Container cloud platform multi-tenant construction method and device based on kubernets
CN110580198B (en) * 2019-08-29 2023-08-01 上海仪电(集团)有限公司中央研究院 Method and device for adaptively switching OpenStack computing node into control node
CN110750335A (en) * 2019-10-25 2020-02-04 北京金山云网络技术有限公司 Resource creating method and device and server
CN110808857B (en) * 2019-10-31 2022-06-07 深圳前海环融联易信息科技服务有限公司 Network intercommunication method, device, equipment and storage medium for realizing Kubernetes cluster
CN110888736A (en) * 2019-11-15 2020-03-17 北京浪潮数据技术有限公司 Application management method and system based on container cloud platform and related components
CN110995871A (en) * 2019-12-24 2020-04-10 浪潮云信息技术有限公司 Method for realizing high availability of KV storage service
CN111324417B (en) * 2020-01-19 2024-03-08 北京百度网讯科技有限公司 Component control method and device of Kubernetes cluster, electronic equipment and medium
CN111352737A (en) * 2020-02-28 2020-06-30 网思科技股份有限公司 Container cloud computing service platform based on resource pool
CN111309448B (en) * 2020-03-16 2022-07-29 优刻得科技股份有限公司 Container instance creating method and device based on multi-tenant management cluster
CN111427625B (en) * 2020-03-23 2023-03-24 中国—东盟信息港股份有限公司 Method for constructing Kubernetes container cloud external load balancer based on dynamic routing
CN111339118A (en) * 2020-03-27 2020-06-26 中国建设银行股份有限公司 Kubernetes-based resource change history recording method and device
CN111475303B (en) 2020-04-08 2022-11-25 苏州浪潮智能科技有限公司 GPU (graphics processing Unit) shared scheduling and single-machine multi-card method, system and device
CN111753326B (en) * 2020-05-22 2024-02-13 湖南麒麟信安科技股份有限公司 Container cloud platform cloud storage resource encryption method, system and medium
CN113839974A (en) * 2020-06-23 2021-12-24 海尔数字科技(上海)有限公司 Container platform charging method and system
CN111782766B (en) * 2020-06-30 2023-02-24 福建健康之路信息技术有限公司 Method and system for retrieving all resources in Kubernetes cluster through keywords
CN111782370B (en) * 2020-06-30 2022-12-06 平安科技(深圳)有限公司 Kubernetes multi-cluster management system, method, terminal and storage medium
CN112100584B (en) * 2020-08-13 2021-04-06 上海微亿智造科技有限公司 Multi-tenant authority management method and system of machine learning application service cluster
CN112162816A (en) * 2020-08-28 2021-01-01 新浪网技术(中国)有限公司 Method and device for checking container cluster resource object and storage medium
CN112104486A (en) * 2020-08-31 2020-12-18 中国—东盟信息港股份有限公司 Kubernetes container-based network endpoint slicing method and system
CN112346816A (en) * 2020-09-01 2021-02-09 北京京东尚科信息技术有限公司 Cloud platform updating method and device
CN112104723B (en) * 2020-09-07 2024-03-15 腾讯科技(深圳)有限公司 Multi-cluster data processing system and method
CN112506477B (en) * 2020-11-09 2023-08-08 麒麟软件有限公司 Method for adding computing nodes in Kubernetes cluster by using RESTful API
CN112732532A (en) * 2021-01-15 2021-04-30 上海浪潮云计算服务有限公司 Method for managing cluster assembly and centralized managing container service control assembly
CN112685458B (en) * 2021-01-18 2023-01-20 浪潮云信息技术股份公司 Method and system for realizing cloud native application controller
CN113037881B (en) * 2021-02-05 2023-03-14 中国—东盟信息港股份有限公司 Cloud native service uninterrupted IP (Internet protocol) replacement method based on Kubernetes
CN113220416B (en) * 2021-04-28 2022-06-17 烽火通信科技股份有限公司 Cluster node expansion system based on cloud platform, implementation method and operation method
CN114374692A (en) * 2021-12-02 2022-04-19 浪潮云信息技术股份公司 Method and system for realizing multi-container cluster management
CN114938375B (en) * 2022-05-16 2023-06-02 聚好看科技股份有限公司 Container group updating equipment and container group updating method
CN115001990A (en) * 2022-05-25 2022-09-02 济南浪潮数据技术有限公司 Cross-region openstack cluster management method and system based on declarative API
CN115037757B (en) * 2022-06-29 2023-08-04 苏州浪潮智能科技有限公司 Multi-cluster service management system
CN115473766B (en) * 2022-08-22 2024-01-26 苏州思萃工业互联网技术研究所有限公司 Vip implementation method and system based on distributed gateway
CN115145695B (en) * 2022-08-30 2022-12-06 浙江大华技术股份有限公司 Resource scheduling method and device, computer equipment and storage medium
CN116016036A (en) * 2022-11-17 2023-04-25 天翼云科技有限公司 Multi-user cluster construction method, system and device based on managed container

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105812488A (en) * 2016-05-06 2016-07-27 深圳前海大数点科技有限公司 Cloud computing distributed service cluster system and method of using the system
CN107689953A (en) * 2017-08-18 2018-02-13 中国科学院信息工程研究所 A kind of vessel safety monitoring method and system towards multi-tenant cloud computing
CN107870845A (en) * 2017-10-19 2018-04-03 北京工业大数据创新中心有限公司 Towards the management method and system of micro services framework applications
CN109478146A (en) * 2016-07-07 2019-03-15 思科技术公司 System and method for application container of stretching in cloud environment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105812488A (en) * 2016-05-06 2016-07-27 深圳前海大数点科技有限公司 Cloud computing distributed service cluster system and method of using the system
CN109478146A (en) * 2016-07-07 2019-03-15 思科技术公司 System and method for application container of stretching in cloud environment
CN107689953A (en) * 2017-08-18 2018-02-13 中国科学院信息工程研究所 A kind of vessel safety monitoring method and system towards multi-tenant cloud computing
CN107870845A (en) * 2017-10-19 2018-04-03 北京工业大数据创新中心有限公司 Towards the management method and system of micro services framework applications

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"Kubernetes(k8s)代码解读-apiserver之list-watch篇",https://www.kubernetes.org.cn/174.html;社区小编007;《Kubernetes中文社区》;20161011;参见第1-5页 *
"跨集群服务——如何利用Kubernetes 1.3实现跨区高可用",https://blog.csdn.net/weixin_33953384/article/details/89348406;weixin_33953384;《CSDN博客》;20160809;参见第1-4页 *

Also Published As

Publication number Publication date
CN109067828A (en) 2018-12-21

Similar Documents

Publication Publication Date Title
CN109067828B (en) Kubernetes and OpenStack container-based cloud platform multi-cluster construction method, medium and equipment
CN109067827B (en) Kubernetes and OpenStack container cloud platform-based multi-tenant construction method, medium and equipment
US11418512B2 (en) Method for virtual machine to access physical server in cloud computing system, apparatus, and system
CA2990252C (en) Systems and methods for blueprint-based cloud management
CN110519361B (en) Container cloud platform multi-tenant construction method and device based on kubernets
US11218364B2 (en) Network-accessible computing service for micro virtual machines
US8386501B2 (en) Dynamically splitting multi-tenant databases
US8296267B2 (en) Upgrade of highly available farm server groups
US10659523B1 (en) Isolating compute clusters created for a customer
CN114514507B (en) System and method for supporting quota policy language in cloud infrastructure environment
US8751656B2 (en) Machine manager for deploying and managing machines
US20120102506A1 (en) Web service patterns for globally distributed service fabric
CN102571698A (en) Access authority control method, system and device for virtual machine
US10678657B1 (en) Reversion operations for virtual computing environments
CN112256399B (en) Docker-based Jupitter Lab multi-user remote development method and system
CN110855488B (en) Virtual machine access method and device
US11243793B2 (en) Virtual machine management
KR20130131963A (en) System and method for constructing on-demand virtual cluster
JP5734421B2 (en) Management information generation method, management information generation program, and management information generation apparatus
TW202031016A (en) Ict resource management device, ICT resource management method and ict resource management program
US11665167B2 (en) Dynamically deployed limited access interface to computational resources

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20231010

Address after: 100190 1309, 13th floor, building 4, Zijin Digital Park, Haidian District, Beijing

Patentee after: Beijing volcano Engine Technology Co.,Ltd.

Address before: 310000 b3128, 3rd floor, building 1 (North), 368 Liuhe Road, Binjiang District, Hangzhou City, Zhejiang Province

Patentee before: HANGZHOU CAICLOUD TECHNOLOGY Co.,Ltd.