CN114500523A - Fixed IP application release method based on container cloud platform - Google Patents

Fixed IP application release method based on container cloud platform Download PDF

Info

Publication number
CN114500523A
CN114500523A CN202111427570.5A CN202111427570A CN114500523A CN 114500523 A CN114500523 A CN 114500523A CN 202111427570 A CN202111427570 A CN 202111427570A CN 114500523 A CN114500523 A CN 114500523A
Authority
CN
China
Prior art keywords
fixed
application
container
resource pool
resource
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.)
Granted
Application number
CN202111427570.5A
Other languages
Chinese (zh)
Other versions
CN114500523B (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.)
Shanghai Pudong Development Bank Co Ltd
Original Assignee
Shanghai Pudong Development Bank 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 Shanghai Pudong Development Bank Co Ltd filed Critical Shanghai Pudong Development Bank Co Ltd
Priority to CN202111427570.5A priority Critical patent/CN114500523B/en
Priority claimed from CN202111427570.5A external-priority patent/CN114500523B/en
Publication of CN114500523A publication Critical patent/CN114500523A/en
Application granted granted Critical
Publication of CN114500523B publication Critical patent/CN114500523B/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/54Organization of routing tables
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/58Association of routers
    • H04L45/586Association of routers of virtual routers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/02Network architectures or network communication protocols for network security for separating internal from external traffic, e.g. firewalls
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45595Network integration; Enabling network access in virtual machine instances

Abstract

The invention relates to a fixed IP application issuing method based on a container cloud platform, which comprises the following steps: deploying Calico as a Kubernet cluster network plug-in, allocating a dynamic IP resource pool and a fixed IP resource pool for each Kubernet service cluster, and deploying a custom object about fixed IP management custom resource; before the window changing period, a user logs in a multi-data center container cloud management platform to build an application template, the built application template is set to be in a release state, and release operation is performed by selecting the application template in the release state and combining a dynamic IP resource pool, a fixed IP resource pool and customization of fixed IP management customized resources. Compared with the prior art, the method has the advantages of no need of binding a specific host and mapping a specific port of the host, high IP allocation and recovery efficiency, effective improvement of usability and the like.

Description

Fixed IP application release method based on container cloud platform
Technical Field
The invention relates to the technical field of cloud containers, in particular to a fixed IP application issuing method based on a container cloud platform.
Background
With the basic maturity of container cloud platform technology, kubernets has become a de facto standard in the field of container management with its powerful editing and expansion capabilities. More and more business systems are beginning to migrate or have migrated from traditional physical machines, virtual machines, to container cloud platforms based on kubernets technology. The flat network model proposed by Kubernetes that all containers (Pod) in the cluster can be interconnected requires a container-IP (IP-Per-Pod), and a Kubernetes container cluster network plug-in implemented based on this mechanism generally configures a cluster virtual container IP resource pool, so the container address has two typical characteristics:
1. the container address is a virtual address and cannot be directly reached from the external route of the cluster, namely, users outside the cluster cannot directly access the container inside the cluster through the container IP;
2. the container address changes with the life cycle of the container (creation, reconstruction, destruction, etc.), i.e., the container address is a dynamic IP, not a fixed (static) IP.
However, for historical reasons, in the process of migrating a service system from a traditional server to a container, many applications including state services, access policy control, service discovery, peer-to-peer file transfer and the like are uniquely identified by using IP as an example, and how to meet the requirement of performing smooth migration of the applications without reconstruction or modification requires that the IP of a container (Pod) example is fixed and can be accessed directly from outside of a kubernets cluster, that is, a container cloud platform needs an application publishing method supporting the fixed container IP.
The existing technical schemes generally have three types:
firstly, a hostPort publishing mode is adopted, the port of the container is directly mapped with the port on the scheduled node, and a user can access the container in the cluster through the IP of a host outside the cluster and the port.
And secondly, after the application is released, a NodePort type routing service (service) is created and bound for the application, a port number (30000-32767) within a specified range is appointed for the routing service, and a user can access a corresponding container through the IP of any host in the cluster and the appointed NodePort port outside the cluster.
Third, adopt the particular Kubernetes trunking CNI network plug-in unit, realize the two layers or three layers of the container network and traditional physical network are pulled through certain configuration, the container address uses the real physical IP, thus make the container IP route and reach outside the trunking. Based on this, the user performs an application publishing operation of the fixed IP through the declaration container IP or IP segment displayed in the resource configuration file (YAML) by annotation (annotation) when performing application publishing.
However, the above three solutions have the following problems:
the first scheme is as follows: HostPort + issuing mode of designated computing node
1. The application can be dispatched to different computing nodes when being issued and updated every time, so that when the container is accessed from outside the cluster through the IP of the host machine, the access address can be changed, and a user has to maintain the corresponding relation between the container and the host machine;
2. the external access needs to use the host port of the computing node, and a user needs to maintain the mapping port applied to the host, so that the use conflict of the host port is avoided;
3. the container is bound with the computing node, the self-migration range of the container is limited in a fault scene, and the scheduling capability of Kubernetes and the self-healing capability of the container are objectively limited.
Scheme II: conventional publish + bind NodePort services
1. The creation of the NodePort routing service needs to follow a specific port range, cannot meet the common port required by the application, and cannot meet the use requirement aiming at the application system which must use a special port;
2. the NodePort routing service realizes the flow forwarding of a rear-end application container by relying on Kubeproxy and IPVS, is a 4-layer load balancing mode based on TCP, and cannot effectively support 7-layer access control based on HTTP, particularly application access scenes with routing rule control requirements;
3. the user must maintain the correspondence between the nodoport routing service port and the application.
And a third scheme is as follows: CNI network plug-in + IP publishing using YAML fixed containers
1. Operations such as allocation, updating and recovery of the fixed IP need to be manually carried out, a platform administrator is mainly relied on to record and maintain in a table form, and the probability of errors such as repeated allocation is high;
2. YAML is used as a configuration file for creating Kubernetes resource objects, the definition attributes of various resources are numerous and complex, and the use threshold and the maintenance cost of users are high.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provide a fixed IP application issuing method based on a container cloud platform.
The purpose of the invention can be realized by the following technical scheme:
a fixed IP application issuing method based on a container cloud platform is realized by combining Calico and Kubernets, and comprises the following steps:
deploying Calico as a Kubernet cluster network plug-in, allocating a dynamic IP resource pool and a fixed IP resource pool for each Kubernet service cluster, and deploying a custom object about fixed IP management custom resource;
before the window changing period, a user logs in a multi-data center container cloud management platform to build an application template, the built application template is set to be in a release state, and release operation is performed by selecting the application template in the release state and combining a dynamic IP resource pool, a fixed IP resource pool and customization of fixed IP management customized resources.
In the method, the fixed IP resource pool is provided with an independent fixed IP controller, and the fixed IP controller is used for monitoring the API request of the Kubernetes cluster, allocating the fixed IP and updating the IP use state recorded in the fixed IP resource definition. The custom object related to the fixed IP management custom resource comprises a fixed IP resource definition of the fixed IP controller, wherein the fixed IP resource definition is used for recording the use state of the distributed fixed IP and storing the use state to an ETCD database of the cluster.
The dynamic IP resource pool is used for providing the IP automatically distributed to the containers by the Calico IPAM in the non-fixed IP publishing mode, and the fixed IP resource pool is used for providing the IP automatically distributed to the pre-publishing containers by the fixed IP controller in the fixed IP publishing mode.
Furthermore, the dynamic IP resource pool and the fixed IP resource pool are both real IP network segments, and the dynamic IP resource pool and the fixed IP resource pool exchange routing information with a physical network through a BGP protocol.
Further, before the window changing period, the specific contents of the application template construction performed by the user logging in the multi-data center container cloud management platform are as follows:
a1) a user logs in a container cloud platform to enter a template management page, selects a newly-built application template, fills an application name in a form interface, selects a service cluster planned to be published, selects a publishing mode of a fixed IP and fills the number of instances planned to be published.
a2) And the container cloud platform sends a fixed IP acquisition request to the API Server corresponding to the Kubernet service cluster according to the service cluster selected by the user, and changes the request into an asynchronous request at the front end.
a3) And when the fixed IP controller monitors a fixed IP acquisition request, inquiring whether a corresponding StaticIP CR record exists according to the application name, and if not, creating a new CR record which is a data record distributed by the fixed IP.
a4) And the fixed IP controller compares the fixed IP resource pool with the IP entries in the StaticIP CR data records through a data comparison algorithm, randomly obtains a corresponding number of IPs which are not recorded in the StaticIP CR records from the fixed IP resource pool according to the number of examples planned and released by the user, and returns the IPs to the front end.
Preferably, a random allocation algorithm is adopted to randomly acquire a corresponding number of IPs which are not recorded in the StaticIP CR record from the fixed IP resource pool and return the IPs to the front end.
a5) And the front end automatically fills the obtained IP distributed by the fixed IP controller into the modeling form, and meanwhile, the fixed IP controller updates the newly distributed IP into the corresponding StaticIP CR record and updates the state of the IP in the StaticIP CR record into the distributed state.
The specific contents of putting the constructed application template on shelf are as follows:
and the user applies for opening a corresponding firewall strategy in advance according to the acquired IP, sets the template to be in a release state after finishing configuration filling according to the creation guidance of the application template, and waits for the window period to be changed for application release operation.
Further, the specific steps of selecting an application template in a distributable state, and performing distribution operation by combining the dynamic IP resource pool, the fixed IP resource pool and the customization of the fixed IP management customized resource comprise:
b1) the container cloud platform automatically converts form information into YAML configuration which can interact with a Kubernetes cluster according to an application template selected by a user, takes IP distributed in the application template in a release state as a part of the configuration, and transmits the IP to an API Server corresponding to the Kubernetes service cluster through a message in an annotation form for application release; and after monitoring the request of application creation, the resource controller of the corresponding Kubernetes service cluster starts to create the application container.
b2) The Calico IPAM performs container-to-IP binding actions according to the number of IPs and instances specified in the YAML configuration.
b3) The fixed IP controller listens for changes in the kubernets resource and the corresponding container instance and takes corresponding actions.
Further, in step b3), the corresponding actions are taken including:
b31) if the container instance is not zero, updating the state of the corresponding IP in the StaticIP CR record to be a used state, and associating the namespace, the application system, the application container and the computing node where the container is located corresponding to the container instance so as to enable a cluster administrator to monitor the IP use state at any time;
b32) if the container instance is zero and the corresponding replicase or stateful set resource object exists, the state of the corresponding IP in the stateIP CR record is updated to the allocated state again, and the corresponding application container in the CR record and the computing node where the container is located are eliminated;
b33) and if the container instance is zero and the corresponding replicase or StateUset resource object does not exist, clearing the corresponding StaticIP CR record.
Compared with the prior art, the fixed IP application release method based on the container cloud platform at least has the following beneficial effects:
the invention adopts Calico as a Kubernetes cluster network plug-in, breaks through a container network and a physical network, meets the requirement of one container and one IP under different release modes by planning two dynamic and static subnets, and also ensures that an accessed container under the access mode of fixed IP does not need to bind a specific host and does not need to map a specific port of the host.
And secondly, the definition of the fixed IP controller and the fixed IP resources is automatically realized in a self-defined resource definition mode by expanding Kubernets resource objects, the automatic management of the life cycle of the container IP is realized by matching with the application release function and the cluster subnet management function of the container cloud platform, the manual allocation and recording of the fixed IP are avoided, the IP allocation and recovery efficiency is effectively improved, and the problems of IP missing distribution, IP redistribution and the like which happen in the past are fundamentally solved.
And thirdly, complex resources are configured and packaged into a guided and tabular UI template by stipulating the original resource definition of Kubernetes, a user can complete application modeling through simple operations such as element clicking and field filling on a front-end page, application release is carried out in a one-key mode, manual writing and maintenance of YAML files with various attributes are not needed, the use threshold is lowered, and the usability is improved.
Drawings
Fig. 1 is a schematic flowchart of a fixed IP application publishing method based on a container cloud platform according to an embodiment of the present invention;
fig. 2 is an IP application publishing schematic diagram of the fixed IP application publishing method based on the container cloud platform according to the embodiment of the present invention.
Detailed Description
The invention is described in detail below with reference to the figures and specific embodiments. It is to be understood that the embodiments described are only a few embodiments of the present invention, and not all embodiments. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, shall fall within the scope of protection of the present invention.
Examples
The invention relates to a fixed IP application issuing method based on a container cloud platform, which is realized based on Kubernetes and Calico technologies, as shown in figure 1, the method is divided into two stages, and the specific process comprises the following steps:
firstly, a cluster deployment phase, which comprises the following steps:
s101: calico is deployed as a Kubernetes cluster network plug-in.
Calico is a pure three-layer data center network scheme supporting the use of BGP (Border Gateway protocol) dynamic protocol for route switching. In the BGP mode, Calico uses each computing node of a Kubernetes cluster as a virtual router to maintain a container routing information table on a host, then the container routing information table is spread into the whole Calico network through a BGP protocol to realize the mutual exchange of container routing information in the cluster, and under the condition that a routing Reflector (Route Reflector) is configured and a BGP neighbor is established with a physical network core switch (or a router) which starts the BGP protocol, a container IP can be announced to the whole physical network and is subjected to routing exchange, so that the container in the cluster is exposed to the outside of the cluster, namely the routing of the container in the cluster can be reached.
S102: and allocating IP resource pools including a dynamic IP resource pool and a static IP resource pool, namely two subnet subnets, for each Kubernetes service cluster.
In the present invention, the static IP resource pool is provided with an independent, autonomously designed static (fixed) IP controller (staticipcontroller).
In the invention, one of the IP resource pools is a dynamic IP resource pool (dynamic IPPool), and the dynamic IP resource pool is used as a Calico IPAM for automatically allocating IP for a container in a conventional release (non-fixed IP release) mode. The second is a static (fixed) IP resource pool (StaticIPPool) which is used as a static (fixed) IP controller (staticipcontroller) designed autonomously in the invention in a fixed IP publishing mode to automatically allocate IP for a pre-publishing container. The two subnetworks are real IP network segments planned in advance and can exchange routing information with a physical network through a BGP protocol.
S103: in the invention, a user-defined Resource Definition object (CRD) about fixed IP management is deployed in each Kubernets service cluster, and comprises a Static (fixed) IP controller (StaticIPController) and a Static IP Resource Definition (StaticIPCRD).
As a resource definition expansion autonomously developed according to Kubernets specification, StaticIPCRD is used for recording the use state of the allocated fixed IP and storing the use state into an ETCD database of a cluster, and StaticIPController carries out allocation of the fixed IP by monitoring an API request of Kubernets and updates the IP use state recorded in the StaticIPCRD.
Secondly, an application deployment phase, which comprises the following steps:
s201: before the window changing period, a user performs application modeling on a multi-data center container cloud management platform (hereinafter referred to as a container cloud platform or CMP). As shown in fig. 2, the specific process is as follows:
1.1) a user logs in a container cloud platform to enter a template management page, selects to newly build an application template, fills in an application name, selects a service cluster for planned release, selects a release mode of a fixed IP and fills in the number of instances for planned release in a guided and visual form interface.
1.2) the platform sends a fixed IP acquisition request to an API Server corresponding to the Kubernet service cluster according to the service cluster selected by the user, wherein the request is a front-end asynchronous request and does not influence other operations of application modeling performed by the user.
1.3) the StaticIPController listens the request, and inquires whether a corresponding StaticIP CR data record exists according to the application name, if not, a new CR record is created. In the present invention, cr (custom Resource) corresponds to the above-mentioned customized crd (custom Resource definition), i.e. a data record of static IP allocation.
1.4) the StaticIPController compares the StaticIPPool with the IP entries in the StaticIP CR through a data comparison algorithm, randomly obtains a corresponding amount of IP which is not in the StaticIP CR record from the StaticIPPool by using a random distribution algorithm according to the number of examples planned and released by a user, and returns the IP to the front end.
1.5) the front end automatically fills the obtained IP distributed by the StaticIPController into a modeling form, and meanwhile, the StaticIPController can update the newly distributed IP into a corresponding StaticIP CR record, at the moment, the state of the IP in the StaticIP CR record is assigned, and any name space, an application system and an application container cannot be associated.
1.6) the user can apply for opening a corresponding firewall strategy in advance according to the obtained IP.
1.7) after finishing other configuration filling such as container specification, container mirror image, health check and the like according to the creation guidance of the application template, the user can set the template to be in an on-shelf state (i.e. a distributable state) to wait for the window period to be changed for application distribution operation.
S202, in the window changing period, a user logs in the container cloud platform to enter an application management page, and selects the application template which is already on the shelf in S201 to perform one-key publishing operation. The detailed steps comprise:
2.1) the container cloud platform automatically converts the form information into YAML configuration capable of interacting with the kubernets cluster according to an application template selected by a user, and the IP allocated in S201 is used as a part of the configuration and is transmitted to the API Server corresponding to the kubernets service cluster through a message in the form of annotation (such as cni. project company. org/ipAddrs or cni. project company. org/ipv4pools and the like) to perform application publishing; project c.org/ipAddrs applies to single container fixed IP, project c.org/ipv 4pools applies to multiple container fixed IP, the platform will automatically select the annotation mode according to the number of instances the user plans to create.
2.2) the resource controller of the corresponding Kubernets service cluster monitors the request of application creation and starts to create the application container.
2.3) application container creation phase, the Calico IPAM executes the binding action of the container and the IP according to the IP and the number of the instances specified in the YAML configuration; even if the application container is restarted and migrated, the Calico can execute the rebinding of the IP and the container, and the container is ensured to always use the fixed IP.
2.4) StaticIPController monitors the Kubernets resource and the change of the corresponding container instance, and takes corresponding action. The specific corresponding operations include:
2.4.1) if the container instance is not 0, updating the state of the corresponding IP in the StaticIP CR record to used (used), and associating information such as a namespace, an application system, an application container and a computing node where the container is located, which are corresponding to the container instance, so that a cluster administrator can conveniently monitor the IP use state at any time.
2.4.2) if the container instance is 0, but there exists a corresponding replicase or stateful set resource object, the state of the corresponding IP in the StaticIP CR record is updated to allocated again, and the information of the corresponding application container, the computing node where the container is located, and the like in the CR record is cleared.
2.4.3) if the container instance is 0 and there is no corresponding replicase or stateful set resource object, clearing the corresponding StaticIP CR record.
In summary, the invention adopts Calico as a kubernets cluster network plug-in, opens up a container network and a physical network, meets the requirement of one container-IP in different release modes by planning two dynamic and static subnets, and ensures that the accessed container in the access mode of the fixed IP does not need to bind a specific host and does not need to map a specific port of the host. By expanding Kubernets resource objects, StaticIPController and StaticIPCRD are automatically realized in a self-defined resource definition (CRD) mode, automatic management of the life cycle of the container IP is realized by matching with an application release function and a cluster subnet management function of a container cloud platform, manual allocation and recording of fixed IP are avoided, the efficiency of IP allocation and recovery is effectively improved, and the problems of IP missing and redistribution and the like which happen in the past are fundamentally solved.
In addition, the invention carries out protocol on the original resource definition of Kubernetes, and encapsulates the complex resource configuration into the guided and tabular UI template, so that the user can complete application modeling through simple operations such as element clicking, field filling and the like on the front-end page, and can carry out application release in a key mode, thereby avoiding manually writing and maintaining YAML files with various attributes, lowering the use threshold and improving the usability.
While the invention has been described with reference to specific embodiments, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A fixed IP application release method based on a container cloud platform is characterized by comprising the following steps:
deploying Calico as a Kubernet cluster network plug-in, allocating a dynamic IP resource pool and a fixed IP resource pool for each Kubernet service cluster, and deploying a custom object about fixed IP management custom resource;
before the window changing period, a user logs in a multi-data center container cloud management platform to build an application template, the built application template is set to be in a release state, and release operation is performed by selecting the application template in the release state and combining a dynamic IP resource pool, a fixed IP resource pool and customization of fixed IP management customized resources.
2. The fixed IP application issuing method based on the container cloud platform according to claim 1, wherein the fixed IP resource pool is provided with an independent fixed IP controller, and the fixed IP controller monitors API requests of a Kubernets cluster, allocates fixed IP and updates the IP use state recorded in the fixed IP resource definition.
3. The fixed IP application publishing method based on the container cloud platform according to claim 2, wherein the custom object for managing the custom resource with respect to the fixed IP comprises the fixed IP controller and a fixed IP resource definition for recording the usage status of the allocated fixed IP and storing the usage status to the etc database of the cluster.
4. The fixed IP application issuing method based on the container cloud platform according to claim 3, wherein the dynamic IP resource pool is used for providing an IP automatically allocated to the container by a Calico IPAM in a non-fixed IP issuing mode, and the fixed IP resource pool is used for providing an IP automatically allocated to the pre-issued container by the fixed IP controller in a fixed IP issuing mode.
5. The fixed IP application release method based on the container cloud platform as claimed in claim 1, wherein the dynamic IP resource pool and the fixed IP resource pool are both real IP network segments, and the dynamic IP resource pool and the fixed IP resource pool exchange routing information with a physical network through a BGP protocol.
6. The method for releasing the fixed IP application based on the container cloud platform according to claim 3, wherein before the window change period, specific contents of the user logging in the multi-data center container cloud management platform to construct the application template are as follows:
a1) a user logs in a container cloud platform to enter a template management page, selects a newly-built application template, fills an application name in a form interface, selects a service cluster to be released in a plan, selects a release mode of a fixed IP and fills the number of instances to be released in the plan;
a2) the container cloud platform sends a fixed IP acquisition request to an API Server corresponding to the Kubernet service cluster according to the service cluster selected by the user, and changes the request into an asynchronous request at the front end;
a3) when the fixed IP controller monitors a fixed IP acquisition request, whether a corresponding static IP CR record exists is inquired according to an application name, if not, a new CR record is created, and the static IP CR record is a data record distributed by a fixed IP;
a4) the fixed IP controller compares the fixed IP resource pool with IP entries in the StaticIP CR data records through a data comparison algorithm, randomly obtains a corresponding number of IPs which are not recorded in the StaticIP CR records from the fixed IP resource pool according to the number of examples planned and released by a user, and returns the IPs to the front end;
a5) and the front end automatically fills the obtained IP distributed by the fixed IP controller into the modeling form, and meanwhile, the fixed IP controller updates the newly distributed IP into the corresponding StaticIP CR record and updates the state of the IP in the StaticIP CR record into the distributed state.
7. The fixed IP application release method based on the container cloud platform according to claim 6, wherein the specific contents of the built application template for shelving are as follows:
and the user applies for opening a corresponding firewall strategy in advance according to the acquired IP, sets the template to be in a release state after finishing configuration filling according to the creation guidance of the application template, and waits for the window period to be changed for application release operation.
8. The fixed IP application publishing method based on the container cloud platform according to claim 7, wherein the specific steps of publishing by selecting an application template in a publishable state in combination with the customization of the dynamic IP resource pool, the fixed IP resource pool and the fixed IP management custom resource comprise:
b1) the container cloud platform automatically converts form information into YAML configuration which can interact with a Kubernetes cluster according to an application template selected by a user, takes IP distributed in the application template in a release state as a part of the configuration, and transmits the IP to an API Server corresponding to the Kubernetes service cluster through a message in an annotation form for application release; after monitoring the request of application creation, a resource controller corresponding to a Kubernetes service cluster starts to create an application container;
b2) the Calico IPAM performs container-to-IP binding actions according to the IP and the number of instances specified in the YAML configuration;
b3) the fixed IP controller listens for changes in the kubernets resource and the corresponding container instance and takes corresponding actions.
9. The fixed IP application publishing method based on the container cloud platform according to claim 8, wherein in the step b3), the corresponding action to be taken comprises:
b31) if the container instance is not zero, updating the state of the corresponding IP in the StaticIP CR record to be a used state, and associating the namespace, the application system, the application container and the computing node where the container is located corresponding to the container instance so as to enable a cluster administrator to monitor the IP use state at any time;
b32) if the container instance is zero and a corresponding replicase or StateUSet resource object exists, updating the state of the corresponding IP in the StaticIP CR record to the allocated state again, and clearing the corresponding application container in the CR record and the computing node where the container is located;
b33) and if the container instance is zero and the corresponding replicase or StateUSet resource object does not exist, clearing the corresponding StaticIP CR record.
10. The fixed IP application issuing method based on container cloud platform according to claim 6, characterized in that in step a4), a random allocation algorithm is adopted to randomly obtain a corresponding number of IPs that are not recorded in the StaticIP CR record from the fixed IP resource pool and return the IPs to the front end.
CN202111427570.5A 2021-11-29 Fixed IP application publishing method based on container cloud platform Active CN114500523B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111427570.5A CN114500523B (en) 2021-11-29 Fixed IP application publishing method based on container cloud platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111427570.5A CN114500523B (en) 2021-11-29 Fixed IP application publishing method based on container cloud platform

Publications (2)

Publication Number Publication Date
CN114500523A true CN114500523A (en) 2022-05-13
CN114500523B CN114500523B (en) 2024-04-26

Family

ID=

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115168057A (en) * 2022-09-02 2022-10-11 浙江大华技术股份有限公司 Resource scheduling method and device based on k8s cluster
CN115225612A (en) * 2022-06-29 2022-10-21 济南浪潮数据技术有限公司 Management method, device, equipment and medium for K8S cluster reserved IP
CN115473766A (en) * 2022-08-22 2022-12-13 苏州思萃工业互联网技术研究所有限公司 Method and system for realizing vip based on distributed gateway
CN116170341A (en) * 2022-12-23 2023-05-26 中国联合网络通信集团有限公司 Virtualization platform monitoring method, device, system and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107580083A (en) * 2017-09-20 2018-01-12 北京京东尚科信息技术有限公司 A kind of method and system of container IP address distribution
WO2020212998A1 (en) * 2019-04-17 2020-10-22 Telefonaktiebolaget Lm Ericsson (Publ) Network address allocation in a virtual layer 2 domain spanning across multiple container clusters
CN111857873A (en) * 2020-07-15 2020-10-30 浪潮云信息技术股份公司 Method for realizing cloud native container network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107580083A (en) * 2017-09-20 2018-01-12 北京京东尚科信息技术有限公司 A kind of method and system of container IP address distribution
WO2020212998A1 (en) * 2019-04-17 2020-10-22 Telefonaktiebolaget Lm Ericsson (Publ) Network address allocation in a virtual layer 2 domain spanning across multiple container clusters
CN111857873A (en) * 2020-07-15 2020-10-30 浪潮云信息技术股份公司 Method for realizing cloud native container network

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
SPIKE CURTIS: "spire-demo/20-calico.yaml", pages 1 - 774, Retrieved from the Internet <URL:https://github.com/projectcalico/spire-demo/blob/master/20-calico.yaml> *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115225612A (en) * 2022-06-29 2022-10-21 济南浪潮数据技术有限公司 Management method, device, equipment and medium for K8S cluster reserved IP
CN115225612B (en) * 2022-06-29 2023-11-14 济南浪潮数据技术有限公司 Management method, device, equipment and medium for K8S cluster reserved IP
CN115473766A (en) * 2022-08-22 2022-12-13 苏州思萃工业互联网技术研究所有限公司 Method and system for realizing vip based on distributed gateway
CN115473766B (en) * 2022-08-22 2024-01-26 苏州思萃工业互联网技术研究所有限公司 Vip implementation method and system based on distributed gateway
CN115168057A (en) * 2022-09-02 2022-10-11 浙江大华技术股份有限公司 Resource scheduling method and device based on k8s cluster
CN115168057B (en) * 2022-09-02 2022-12-20 浙江大华技术股份有限公司 Resource scheduling method and device based on k8s cluster
CN116170341A (en) * 2022-12-23 2023-05-26 中国联合网络通信集团有限公司 Virtualization platform monitoring method, device, system and storage medium
CN116170341B (en) * 2022-12-23 2024-04-09 中国联合网络通信集团有限公司 Virtualization platform monitoring method, device, system and storage medium

Similar Documents

Publication Publication Date Title
CN112532675B (en) Method, device and medium for establishing network edge computing system
US9999030B2 (en) Resource provisioning method
CN103997414B (en) Generate method and the network control unit of configuration information
CN106464528B (en) For the contactless method allocated, medium and the device in communication network
JP5860320B2 (en) Method and apparatus for providing a cluster system for a virtual machine environment
KR101650832B1 (en) Network resource monitoring
CN104486445B (en) Distributed extendable resource monitoring system based on cloud platform
CN107947961A (en) Kubernetes Network Management System and method based on SDN
CN106126318A (en) The dynamic migration method of virtual machine in a kind of Openstack cloud platform
CN103078965B (en) The IP address management method of virtual machine
CN112532669B (en) Network edge computing method, device and medium
CN109451088A (en) A kind of data access method and device
US9847903B2 (en) Method and apparatus for configuring a communication system
CN104767676A (en) Data message forwarding method and data message forwarding system in software defined network (SDN)
CN108632063B (en) Method, device and system for managing network slice instances
CN110138606A (en) Capacitor network configuration method and system
CN114237812A (en) Container network management system
CN114070822B (en) Kubernetes Overlay IP address management method
CN107590033A (en) A kind of methods, devices and systems of establishment DOCKER containers
CN105704042A (en) Message processing method, BNG and BNG cluster system
CN101827039A (en) Method and equipment for load sharing
CN107276826A (en) A kind of capacitor network collocation method and device
CN108429824A (en) A kind of address distribution method and device
CN110474802A (en) Equipment switching method and device, service system
CN112532758B (en) Method, device and medium for establishing network edge computing system

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