CN114500523B - Fixed IP application publishing method based on container cloud platform - Google Patents

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

Info

Publication number
CN114500523B
CN114500523B CN202111427570.5A CN202111427570A CN114500523B CN 114500523 B CN114500523 B CN 114500523B CN 202111427570 A CN202111427570 A CN 202111427570A CN 114500523 B CN114500523 B CN 114500523B
Authority
CN
China
Prior art keywords
fixed
container
application
resource pool
kubernetes
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
CN202111427570.5A
Other languages
Chinese (zh)
Other versions
CN114500523A (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
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

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 release method based on a container cloud platform, which comprises the following steps: deploying Calico as a Kubernetes cluster network plug-in, distributing a dynamic IP resource pool and a fixed IP resource pool for each Kubernetes service cluster, and deploying a custom object about fixed IP management custom resources; before the window period is changed, a user logs in a multi-data center container cloud management platform to construct an application template, the constructed application template is set to be in a publishable state, and publishing operation is carried out by selecting the application template in the publishable state and combining a dynamic IP resource pool, a fixed IP resource pool and customization about fixed IP management custom 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, easy availability, effective improvement and the like.

Description

Fixed IP application publishing 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 publishing method based on a container cloud platform.
Background
With the basic maturity of container cloud platform technology, kubernetes has become a de facto standard in the field of container management with its powerful orchestration and expansion capabilities. More and more business systems start or have migrated from traditional physical machines, virtual machines, to container cloud platforms based on Kubernetes technology. The flattened network model proposed by Kubernetes, in which all containers (Pod) in a cluster can be interconnected, requires a container-IP (IP-Per-Pod), and the 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 directly reach from outside the cluster, namely, a user outside the cluster cannot directly access the container in the cluster through the container IP;
2. The container address may change with changes in the lifecycle of the container (creation, reconstruction, destruction, etc.), i.e. the container address is a dynamic IP, non-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 stateful services, access policy control, service discovery, peer-to-peer file transfer and the like are identified by using IP as an example only, and how to meet the requirement that the applications migrate smoothly without reconstruction or transformation, which requires that the IP of the container (Pod) instance be fixed and accessible from outside the Kubernetes cluster, that is, the container cloud platform needs to support an application publishing method of the fixed container IP.
The existing technical schemes generally have three types:
1. By adopting hostPort publishing mode, the port of the container is directly mapped with the port on the scheduled node, and the user can access the container in the cluster outside the cluster through the IP of the host and the port.
2. 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 assigned for the routing service, and a user can access a corresponding container outside the cluster through the IP of any host in the cluster and the assigned NodePort port.
3. The specific Kubernetes cluster CNI network plug-in is adopted, two-layer or three-layer pull-through of the container network and the traditional physical network is realized through a certain configuration, and the container address uses the real physical IP, so that the container IP can be routed outside the cluster. Based on this, the user performs an application publishing operation of a fixed IP in a declaration container IP or IP section displayed by an annotation (anotation) in a resource profile (YAML) at the time of application publishing.
However, the three schemes have the following problems:
scheme one: hostPort + designated compute node publishing mode
1. The application may be scheduled to different computing nodes when released and updated each time, so when the application accesses the container from outside the cluster through the IP of the host, the access address may change, and the user must maintain the corresponding relation between the container and the host;
2. The external access needs to use a host port of the computing node, and a user needs to maintain a 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 nodes, 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: regular publish + bind NodePort service
1. The creation of NodePort routing services needs to follow a specific port range, cannot meet the common ports wanted by applications, and cannot meet the use requirements for application systems which must use special ports;
2. NodePort routing service performs flow forwarding dependence Kubeproxy and IPVS realization on a back-end application container, is a 4-layer load balancing mode based on TCP, and cannot effectively support an application access scene with a routing rule control requirement for 7-layer access control based on HTTP;
3. The user must maintain NodePort a correspondence of routing service ports to applications.
Scheme III: CNI network plug-in+use YAML fixed container IP publishing
1. The operations of fixed IP allocation, updating, recovery and the like are manually carried out, and mainly depend on the platform manager to record and maintain in a form of a table, so that the probability of errors such as repeated allocation and the like is high;
2. YAML is used as a configuration file for creating the Kubernetes resource object, the definition attributes of various resources are numerous, complex and complex, and the user has higher using threshold and maintenance cost.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provide a fixed IP application release method based on a container cloud platform.
The aim of the invention can be achieved by the following technical scheme:
A fixed IP application release method based on a container cloud platform is realized by combining Calico with Kubernetes, and comprises the following steps:
Deploying Calico as a Kubernetes cluster network plug-in, distributing a dynamic IP resource pool and a fixed IP resource pool for each Kubernetes service cluster, and deploying a custom object about fixed IP management custom resources;
Before the window period is changed, a user logs in a multi-data center container cloud management platform to construct an application template, the constructed application template is set to be in a publishable state, and publishing operation is carried out by selecting the application template in the publishable state and combining a dynamic IP resource pool, a fixed IP resource pool and customization about fixed IP management custom resources.
In the method of the invention, 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, carrying out the distribution of the fixed IP and updating the IP use state recorded in the definition of the fixed IP resource. The custom object related to the fixed IP management custom resource includes the fixed IP controller fixed IP resource definition for recording the usage status of the allocated fixed IP and storing the usage status to the ETCD database of the cluster.
The dynamic IP resource pool is used for providing the IP which is automatically allocated for the container by Calico IPAM in the non-fixed IP release mode, and the fixed IP resource pool is used for providing the IP which is automatically allocated for the pre-release container by the fixed IP controller in the fixed IP release mode.
Further, the dynamic IP resource pool and the fixed IP resource pool are 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 period is changed, the specific content of the user logging in the multi-data center container cloud management platform for constructing the application template is as follows:
a1 The user logs in the container cloud platform to enter a template management page, selects a newly-built application template, fills in an application name in a form interface, selects a service cluster planned to be released, selects a release mode of a fixed IP and fills in the number of instances planned to be released.
A2 The cloud platform sends a fixed IP acquisition request to API SERVER corresponding to the Kubernetes service cluster according to the service cluster selected by the user, and the request is changed into a front-end asynchronous request.
A3 If the fixed IP controller monitors the fixed IP acquisition request, inquiring whether a corresponding STATICIP CR record exists according to the application name, if not, creating a new CR record, wherein the STATICIP CR record is a data record allocated by the fixed IP.
A4 The fixed IP controller compares the IP entries in the fixed IP resource pool and STATICIP CR data records through a data comparison algorithm, randomly acquires a corresponding number of IP which are not recorded in STATICIP CR records from the fixed IP resource pool according to the number of the planned published examples filled by the user, and returns the corresponding number of IP to the front end.
Preferably, a random allocation algorithm is used to randomly obtain a corresponding number of IPs from the fixed IP resource pool that are not recorded in STATICIP CR records, and return them to the front end.
A5 The front end automatically fills the acquired distributed IPs of the fixed IP controller into a modeling form, and the fixed IP controller updates the newly distributed IPs into corresponding STATICIP CR records and updates the state of the IPs in STATICIP CR records into distributed IPs.
The concrete contents of putting the constructed application template on the shelf are as follows:
And the user applies for opening a corresponding firewall policy in advance according to the acquired IP, and after finishing configuration filling according to the creation guide of the application template, sets the template into a publishable state and waits for the change window period to carry out application publishing operation.
Further, by selecting an application template in a publishable state, the specific steps of carrying out a publishing operation in combination with the dynamic IP resource pool, the fixed IP resource pool and the customization of the fixed IP management customization resources include:
b1 The cloud platform of the container automatically converts form information into YAML configuration which can interact with the Kubernetes cluster according to the application template selected by the user, takes the IP distributed in the application template in the publishable state as a part of the configuration, and transmits the IP to API SERVER of the corresponding Kubernetes service cluster in the form of anotation annotation for application publication through messages; after the resource controller of the corresponding Kubernetes service cluster monitors the request of application creation, the application container is started to be created.
B2 Calico IPAM performs the container-to-IP binding action according to the IP and number of instances specified in the YAML configuration.
B3 The fixed IP controller listens for changes in Kubernetes resources and corresponding container instances and acts correspondingly.
Further, in step b 3), the corresponding actions made include:
b31 If the container instance is not zero, updating the state of the corresponding IP in STATICIP CR records into a used state, and associating the namespaces, the application systems, the application containers and the computing nodes where the containers are 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 there is a corresponding ReplicaSet or StatefulSet resource object, then re-updating the state of the corresponding IP in the STATICIP CR record to the allocated state, and clearing the corresponding application container and the computing node where the container is located in the CR record;
b33 If the container instance is zero and there is no corresponding ReplicaSet or StatefulSet resource object, then the corresponding STATICIP CR record is cleared.
Compared with the prior art, the fixed IP application release method based on the container cloud platform at least has the following beneficial effects:
1. According to the invention, calico is adopted as a Kubernetes cluster network plug-in, a container network and a physical network are opened, the requirement of one container-IP in different release modes is met by planning dynamic and static sub-networks, and the accessed container in a fixed IP access mode is ensured not to be bound with a specific host and not to be mapped with a specific port of the host.
2. The method has the advantages that the fixed IP controller and the fixed IP resource are defined autonomously in a self-defined resource definition mode by expanding the Kubernetes resource object, the automatic management of the life cycle of the container IP is realized by matching with the application release function of the container cloud platform and the cluster subnet management function, the manual allocation and recording of the fixed IP are avoided, the efficiency of IP allocation and recovery is effectively improved, and the problems of IP missing, heavy weight and the like in the past are radically solved.
3. By means of the method, the system and the device, the original resource definition of the Kubernetes is regulated, complex resource configuration is packaged into a guided and formalized UI template, a user can finish application modeling through simple operations such as element selection and field filling on a front-end page, application release is performed through one-click, YAML files with various attributes are not required to be written and maintained manually, the use threshold is reduced, and usability is improved.
Drawings
Fig. 1 is a flow diagram of a method for publishing a fixed IP application 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 will now be described in detail with reference to the drawings and specific examples. It will be apparent that the described embodiments are some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
Examples
The invention relates to a fixed IP application release method based on a container cloud platform, which is realized based on Kubernetes and Calico technologies, and as shown in figure 1, the method is divided into two stages, and the specific process comprises the following steps:
1. A cluster deployment phase comprising the steps of:
s101: calico is deployed as a Kubernetes cluster network plug-in.
Calico is a pure three-tier data center network scheme supporting routing switching using BGP (Border Gateway Protocol) dynamic protocol. In BGP mode Calico, each computing node of the Kubernetes cluster is used as a virtual router to maintain a container routing information table on the host, and then the container routing information is transmitted into the whole Calico network through BGP protocol to realize the mutual exchange of the routing information in the cluster, and in the case of configuring a routing Reflector (Route Reflector) and establishing BGP neighbors with a physical network core switch (or router) which opens BGP protocol, the container IP can be announced to the whole physical network and exchanged in a routing way so as to realize the exposure of the container in the cluster to the outside of the cluster, i.e. the routing of the container in the cluster is reachable.
S102: and allocating an IP resource pool for each Kubernetes service cluster, wherein the IP resource pool comprises a dynamic IP resource pool and a static IP resource pool, namely two subnets.
In the present invention, the static IP resource pool is provided with a static (fixed) IP controller (StaticIPcontrller) of independent autonomous design.
In the present invention, one of the IP resource pools is a dynamic IP resource pool (DynamicIPPool) that automatically allocates IP usage for the container as Calico IPAM in a conventional release (non-fixed IP release) manner. The second is a static (fixed) IP resource pool (StaticIPPool) which is used as a static (fixed) IP controller (StaticIPcontrller) which is autonomously designed by the invention in a fixed IP publishing mode to automatically allocate IP usage for the pre-publishing container. Both subnets are real IP network segments planned in advance, and can exchange route information with a physical network through BGP protocol.
S103: custom resource definition objects (CRDs, custom Resource Defination) for fixed IP management in the present invention are deployed in each Kubernetes service cluster, including static (fixed) IP controllers StaticIPController and static IP resource definitions (STATICIPCRD, static Custom Resource Definition).
As an extension of the resource definition developed autonomously according to the Kubernetes specification STATICIPCRD is used to record the usage status of the allocated fixed IP and store it in the ETCD database of the cluster, staticIPController performs the allocation of the fixed IP by listening to the API request of Kubernetes and updates the IP usage status recorded in STATICIPCRD.
2. An application deployment phase comprising the steps of:
S201: before the change window 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 flow is as follows:
1.1 The user logs in the container cloud platform to enter a template management page, selects a newly built application template, fills in an application name in a guided visual form interface, 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.
1.2 The platform sends a fixed IP acquisition request to API SERVER corresponding to the Kubernetes service cluster according to the service cluster selected by the user, wherein the request is an asynchronous request of the front end, and other operations of application modeling by the user are not affected.
1.3 StaticIPController, inquiring whether the corresponding STATICIP CR data record exists according to the application name, if not, creating a new CR record. In the present invention CR (Custom Resource) corresponds to the above-mentioned custom CRD (Custom Resource Definition), i.e. a data record of static IP allocation.
1.4 StaticIPController compares the IP entries in StaticIPPool and STATICIP CR by a data comparison algorithm, and randomly obtains a corresponding number of IP entries from StaticIPPool, which are not recorded in STATICIP CR, by a random distribution algorithm according to the number of instances planned to be issued by the user, and returns the corresponding number of IP entries to the front end.
1.5 The front end automatically populates the modeling forms with acquired StaticIPController assigned IPs, while StaticIPController updates these newly assigned IPs to the corresponding STATICIP CR records, at which point these IPs are assigned (assigned) in STATICIP CR records, without associating any namespaces, application systems, and application containers.
1.6 The user can apply for opening the corresponding firewall policy in advance according to the acquired IP.
1.7 After the user finishes filling other configurations such as container specification, container mirror image, health check and the like according to the creation guide of the application template, the template can be set to an on-shelf state (i.e. a release state) to wait for a change window period for application release operation.
S202, in the window changing period, a user logs in the container cloud platform to enter an application management page, and selects an application template which is put on shelf to perform one-key release operation S201. The detailed steps include:
2.1 The container cloud platform automatically converts the form information into YAML configuration which can interact with the Kubernetes cluster according to the application template selected by the user, and the IP distributed in S201 is used as a part of the configuration and is transmitted to API SERVER of the corresponding Kubernetes service cluster to release the application in the form of anotation notes (such as cni.projectcalico.org/ipAddrs or cni.projectcalico.org/ipv4 pores, etc.) through messages; cni.projectcalc.org/ipAddrs is applicable to single container fixed IP, cni.projectcalc.org/ipv 4pool is applicable to multiple container fixed IP, and the platform will automatically select annotation mode according to the number of instances created by the user's program.
2.2 The resource controller of the corresponding Kubernetes service cluster listens to the request of application creation and starts to create the application container.
2.3 The application container creation phase Calico IPAM will perform the container-to-IP binding actions according to the IP and number of instances specified in the YAML configuration; even if the application container is restarted, migrated, etc., calico will perform the rebinding of the IP with the container, ensuring that the container always uses the fixed IP.
2.4 StaticIPController listens for changes in Kubernetes resources and corresponding container instances and acts correspondingly. Specific corresponding operations include:
2.4.1 If the container instance is not 0, updating the state of the corresponding IP in STATICIP CR records to used, and associating the information of the namespaces, the application systems, the application containers, the computing nodes where the containers are located and the like corresponding to the container instance to facilitate the cluster administrator to monitor the use state of the IP at any time.
2.4.2 If the container instance is 0, but there is a corresponding ReplicaSet or StatefulSet resource object, the state of the corresponding IP in the STATICIP CR record is updated to assigned (allocated), 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 ReplicaSet or StatefulSet resource object, then the corresponding STATICIP CR record is cleared.
In summary, calico is adopted as the Kubernetes cluster network plug-in, the container network and the physical network are opened, the requirement of one container-IP in different release modes is met by planning dynamic and static sub-networks, and the accessed container in the fixed IP access mode is ensured not to be bound with a specific host and not to be mapped with a specific port of the host. By expanding the Kubernetes resource object, staticIPController and STATICIPCRD are autonomously realized in a self-defined resource definition (CRD, customResourceDefination) mode, the automatic management of the life cycle of the container IP is realized by matching with the application release function of the container cloud platform and the cluster subnet management function, the 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, heavy weight and the like in the past are radically solved.
In addition, the invention carries out the protocol on the original resource definition of the Kubernetes, encapsulates the complex resource configuration into the guided and formalized UI template, and the user can finish the application modeling through simple operations such as element selection, field filling and the like on the front-end page, carries out the application release by one-click, does not need to write and maintain YAML files with various attributes manually, reduces the use threshold and improves the usability.
While the invention has been described with reference to certain preferred embodiments, it will be understood by those skilled in the art that various changes and substitutions may be made without departing from the spirit and scope of the invention as defined by the appended claims. Therefore, the protection scope of the invention is subject to the protection scope of the claims.

Claims (5)

1. The fixed IP application release method based on the container cloud platform is characterized by comprising the following steps of:
Deploying Calico as a Kubernetes cluster network plug-in, distributing a dynamic IP resource pool and a fixed IP resource pool for each Kubernetes service cluster, and deploying a custom object about fixed IP management custom resources;
before the window period is changed, a user logs in a multi-data center container cloud management platform to construct an application template, the constructed application template is set to be in a publishable state, and publishing operation is carried out by selecting the application template in the publishable state and combining a dynamic IP resource pool, a fixed IP resource pool and customization about fixed IP management customization resources;
The fixed IP resource pool is provided with an independent fixed IP controller, and the fixed IP controller monitors the API request of the Kubernetes cluster, distributes fixed IP and updates the IP use state recorded in the fixed IP resource definition;
the custom object related to the fixed IP management custom resource comprises the fixed IP controller and a fixed IP resource definition used for recording the use state of the allocated fixed IP and storing the use state into an ETCD database of the cluster;
Before the window period is changed, a user logs in a multi-data center container cloud management platform to construct an application template, and the specific contents are as follows:
a1 A user logs in the container cloud platform to enter a template management page, selects a newly-built application template, fills in an application name in a form interface, selects a service cluster planned to be released, selects a release mode of a fixed IP and fills in the number of instances planned to be released;
a2 The cloud platform of the container sends a fixed IP acquisition request to API SERVER corresponding to the Kubernetes service cluster according to the service cluster selected by the user, wherein the request is an asynchronous request of the front end;
a3 If the fixed IP controller monitors the fixed IP acquisition request, inquiring whether a corresponding STATICIP CR record exists according to the application name, if not, creating a new CR record, wherein the STATICIP CR record is a data record allocated by the fixed IP;
a4 The fixed IP controller compares the IP entries in the fixed IP resource pool and STATICIP CR data records through a data comparison algorithm, randomly acquires a corresponding number of IP which are not recorded in STATICIP CR records from the fixed IP resource pool according to the number of the planned published examples filled by a user, and returns the corresponding number of IP to the front end;
a5 The front end automatically fills the acquired IP distributed by the fixed IP controller into a modeling form, and the fixed IP controller updates the newly distributed IP into a corresponding STATICIP CR record and updates the state of the IP in a STATICIP CR record into the distributed IP;
the concrete contents of putting the constructed application template on the shelf are as follows:
The user applies for opening a corresponding firewall policy in advance according to the acquired IP, and after finishing configuration filling according to the creation guide of the application template, the template is set into a publishable state to wait for a window period to be changed for application publishing operation;
the specific steps of carrying out release operation by selecting an application template in a release-able state and combining a dynamic IP resource pool, a fixed IP resource pool and the customization of the fixed IP management customization resources include:
b1 The cloud platform of the container automatically converts form information into YAML configuration which can interact with the Kubernetes cluster according to the application template selected by the user, takes the IP distributed in the application template in the publishable state as a part of the configuration, and transmits the IP to API SERVER of the corresponding Kubernetes service cluster in the form of anotation annotation for application publication through messages; after the resource controllers of the corresponding Kubernetes service clusters monitor the request of application creation, application containers are started to be created;
b2 Calico IPAM performs the binding action of the container to the IP according to the IP and the number of instances specified in the YAML configuration;
b3 The fixed IP controller listens for changes in Kubernetes resources and corresponding container instances and acts correspondingly.
2. The method for publishing a fixed IP application based on a container cloud platform of claim 1, wherein the dynamic IP resource pool is configured to provide an IP automatically allocated to a container in a non-fixed IP publishing mode Calico IPAM, and the fixed IP resource pool is configured to provide an IP automatically allocated to a pre-published container by the fixed IP controller in a fixed IP publishing mode.
3. The fixed IP application publishing method of claim 1, wherein the dynamic IP resource pool and the fixed IP resource pool are real IP network segments, and exchange routing information with a physical network through BGP protocol.
4. The fixed IP application publishing method of claim 1, wherein in step b 3), the corresponding actions performed include:
b31 If the container instance is not zero, updating the state of the corresponding IP in STATICIP CR records into a used state, and associating the namespaces, the application systems, the application containers and the computing nodes where the containers are 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 there is a corresponding ReplicaSet or StatefulSet resource object, then re-updating the state of the corresponding IP in the STATICIP CR record to the allocated state, and clearing the corresponding application container and the computing node where the container is located in the CR record;
b33 If the container instance is zero and there is no corresponding ReplicaSet or StatefulSet resource object, then the corresponding STATICIP CR record is cleared.
5. The fixed IP application publishing method based on the container cloud platform of claim 1, wherein in step a 4), a random allocation algorithm is adopted to randomly acquire a corresponding number of IPs not recorded in STATICIP CR records from the fixed IP resource pool, and return the IPs to the front end.
CN202111427570.5A 2021-11-29 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 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 2021-11-29 Fixed IP application publishing method based on container cloud platform

Publications (2)

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

Family

ID=81493117

Family Applications (1)

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

Country Status (1)

Country Link
CN (1) CN114500523B (en)

Families Citing this family (4)

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

Also Published As

Publication number Publication date
CN114500523A (en) 2022-05-13

Similar Documents

Publication Publication Date Title
CN114500523B (en) Fixed IP application publishing method based on container cloud platform
US9769253B2 (en) Port pooling
CN102577256B (en) For the method and apparatus of transparent cloud computing in virtual network infrastructure situation
US9999030B2 (en) Resource provisioning method
JP6218819B2 (en) Method and apparatus for IP commissioning and decommissioning in an orchestrated computing environment
US8705513B2 (en) Methods and apparatus to communicatively couple virtual private networks to virtual machines within distributive computing networks
CN106464528B (en) For the contactless method allocated, medium and the device in communication network
CN103997414B (en) Generate method and the network control unit of configuration information
US8473557B2 (en) Methods and apparatus to migrate virtual machines between distributive computing networks across a wide area network
US9003002B2 (en) Efficient port management for a distributed network address translation
JP6950327B2 (en) Cross-domain orchestration of switch and service functions
US10129096B2 (en) Commissioning/decommissioning networks in orchestrated or software-defined computing environments
CN108780410A (en) The network virtualization of container in computing system
CN113225214B (en) Method and device for cooperative management of edge CDN node and computer readable medium
CN106815059B (en) Linux virtual server LVS automates O&M method and operational system
CN106126318A (en) The dynamic migration method of virtual machine in a kind of Openstack cloud platform
CN111880902A (en) Pod creation method, device, equipment and readable storage medium
CN108809732B (en) Software defined metropolitan area network control system
US9847903B2 (en) Method and apparatus for configuring a communication system
CN111988353B (en) IPv4 and IPv6 compatible internet service and load balancing service loading system and method
CN112532669B (en) Network edge computing method, device and medium
CN114237812A (en) Container network management system
CN108429824A (en) A kind of address distribution method and device
CN102970389B (en) Extranet access method and system
CN116743585A (en) Multi-tenant API gateway service exposure system and method based on cloud protogenesis

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