CN106888254B - Kubernetes-based container cloud architecture and interaction method among modules thereof - Google Patents
Kubernetes-based container cloud architecture and interaction method among modules thereof Download PDFInfo
- Publication number
- CN106888254B CN106888254B CN201710051697.9A CN201710051697A CN106888254B CN 106888254 B CN106888254 B CN 106888254B CN 201710051697 A CN201710051697 A CN 201710051697A CN 106888254 B CN106888254 B CN 106888254B
- Authority
- CN
- China
- Prior art keywords
- module
- container
- load balancing
- kubernetes
- node
- 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
Links
- 238000000034 method Methods 0.000 title claims description 36
- 230000003993 interaction Effects 0.000 title claims description 8
- 238000012544 monitoring process Methods 0.000 claims abstract description 46
- 238000010276 construction Methods 0.000 claims abstract description 12
- 238000012545 processing Methods 0.000 claims abstract description 7
- 230000008569 process Effects 0.000 claims description 16
- 238000012423 maintenance Methods 0.000 claims description 4
- 238000012536 packaging technology Methods 0.000 claims description 2
- 230000004044 response Effects 0.000 claims description 2
- 238000005516 engineering process Methods 0.000 description 11
- 238000010586 diagram Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 5
- 238000011161 development Methods 0.000 description 4
- 230000010354 integration Effects 0.000 description 2
- 244000035744 Hura crepitans Species 0.000 description 1
- 230000004931 aggregating effect Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 230000001934 delay Effects 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000008676 import Effects 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000004806 packaging method and process Methods 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012800 visualization Methods 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0893—Assignment of logical groups to network elements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/12—Discovery or management of network topologies
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
- H04L67/025—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/104—Peer-to-peer [P2P] networks
- H04L67/1044—Group management mechanisms
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1095—Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/34—Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Theoretical Computer Science (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
技术领域technical field
本发明涉及云计算技术和容器领域,尤其涉及一种基于Kubernetes的容器云架构及其各模块之间的交互方法。The invention relates to the field of cloud computing technology and containers, in particular to a container cloud architecture based on Kubernetes and an interaction method between modules thereof.
背景技术Background technique
随着移动互联网的迅猛发展,网民人数和上网时长急剧增长,网站的后台架构也在不断的变化以应对日益庞大的访问需求。服务器架构的设计,从最初将Web服务和数据库服务等所有服务署到一台物理服务器上,到后来的数据库服务与Web服务分离,从而提高服务器的性能与安全性,进而到使用负载均衡技术将负载分摊到多台服务器上以减少单台服务器的压力,到最近的自动伸缩方式,通过对现有服务器集群的CPU和内存等指标进行监控,根据访问需求以及制定的伸缩策略,自动增加和移除服务器节点。与传统的手工增删节点相比,这种方式响应快,运维成本小,稳定性高。With the rapid development of the mobile Internet, the number of netizens and the time spent on the Internet have grown rapidly, and the background structure of the website is constantly changing to cope with the ever-increasing demand for access. The design of the server architecture, from the initial deployment of all services such as Web services and database services to a physical server, to the separation of database services and Web services later, so as to improve the performance and security of the server, and then to the use of load balancing technology to The load is distributed to multiple servers to reduce the pressure on a single server. To the nearest automatic scaling method, by monitoring the CPU and memory of the existing server cluster and other indicators, according to the access requirements and the formulated scaling strategy, the system can automatically increase and move. Remove the server node. Compared with the traditional manual addition and deletion of nodes, this method has fast response, low operation and maintenance cost, and high stability.
然而,使用传统服务器和云计算技术实现自动伸缩架构有很多问题,导致自动伸缩方式一直没有广泛应用。首先,将业务模块部署到服务器所需时间较长,而移动互联网应用要求业务模块必须快速迭代上线,业务模块的频繁部署和更新会浪费大量的人力物力。与此同时,对于海量访问请求,传统服务器或云计算架构无法快速启动新的服务节点,导致访问延迟甚至系统崩溃。因为传统云计算技术的架构基本都采用虚拟机方式,在一些细分领域,其固有缺陷导致应用效果不尽如人意。近年来,随着云计算技术的流行和相关技术的快速发展,云计算技术基础架构的实现不仅仅局限于虚拟机一种选择。However, there are many problems in implementing auto-scaling architecture using traditional server and cloud computing technologies, resulting in that auto-scaling methods have not been widely used. First of all, it takes a long time to deploy the business module to the server, and the mobile Internet application requires that the business module must be iteratively launched quickly, and the frequent deployment and update of the business module will waste a lot of manpower and material resources. At the same time, for massive access requests, traditional servers or cloud computing architectures cannot quickly start new service nodes, resulting in access delays or even system crashes. Because the architecture of traditional cloud computing technology basically adopts the virtual machine method, in some sub-fields, its inherent defects lead to unsatisfactory application effects. In recent years, with the popularity of cloud computing technology and the rapid development of related technologies, the implementation of cloud computing technology infrastructure is not limited to a choice of virtual machines.
发明内容SUMMARY OF THE INVENTION
本发明的目的在于克服现有技术的缺点与不足,提供一种基于Kubernetes的容器云架构,可以方便的应用于需要高可用性及扩展性的容器系统。The purpose of the present invention is to overcome the shortcomings and deficiencies of the prior art, and to provide a container cloud architecture based on Kubernetes, which can be conveniently applied to a container system that requires high availability and scalability.
本发明的另一目的在于提供一种基于Kubernetes的容器云架构的各模块之间的交互方法。Another object of the present invention is to provide an interaction method between modules of a Kubernetes-based container cloud architecture.
本发明的目的通过以下的技术方案实现:The object of the present invention is achieved through the following technical solutions:
一种基于Kubernetes的容器云架构,包括镜像构建模块、数据仓库模块、负载均衡模块、服务发现模块和容器监控模块,还包括分别与镜像构建模块、数据仓库模块、负载均衡模块、服务发现模块、容器监控模块连接的服务器模块,其中A Kubernetes-based container cloud architecture includes an image building module, a data warehouse module, a load balancing module, a service discovery module, and a container monitoring module, as well as an image building module, a data warehouse module, a load balancing module, a service discovery module, The server module connected to the container monitoring module, where
镜像构建模块,用于提供镜像文件制作、存储和分发服务;Image building module, used to provide image file creation, storage and distribution services;
数据仓库模块,用于存储和处理集群中数据库的数据信息;The data warehouse module is used to store and process the data information of the database in the cluster;
负载均衡模块,用于对Kubernetes集群中的各个计算节点进行负载均衡;The load balancing module is used to load balance each computing node in the Kubernetes cluster;
服务发现模块,用于获取Kuberntes集群中各计算节点动态变化的信息;The service discovery module is used to obtain information about the dynamic changes of each computing node in the Kubernetes cluster;
容器监控模块,用于采集和显示Kubernetes集群各计算节点运行状态的信息。The container monitoring module is used to collect and display information about the running status of each computing node in the Kubernetes cluster.
所述镜像构建模块为Docker私有库模块,并使用Dockerfile打包技术和Kubernetes文件编排模板。The image building module is a Docker private library module, and uses the Dockerfile packaging technology and the Kubernetes file arrangement template.
所述数据仓库模块采用hadoop节点处理Mysql和MongoDB数据。The data warehouse module uses hadoop nodes to process Mysql and MongoDB data.
所述负载均衡模块采用Nginx-Plus代理工具。The load balancing module adopts Nginx-Plus proxy tool.
所述服务发现模块采用Etcd存储系统。The service discovery module adopts the Etcd storage system.
所述服务器模块采用CentOS操作系统。The server module adopts the CentOS operating system.
本发明的另一目的通过以下的技术方案实现:Another object of the present invention is achieved through the following technical solutions:
一种基于Kubernetes的容器云架构的各模块之间的交互方法,包含以下步骤:An interaction method between modules of a Kubernetes-based container cloud architecture, including the following steps:
(1)代码更新:开发人员将新的代码镜像上传到镜像构建模块中,运维人员从镜像构建模块中下载新的镜像并加载运行;(1) Code update: The developer uploads the new code image to the image building module, and the operation and maintenance personnel downloads the new image from the image building module and loads and runs it;
(2)负载均衡:请求端发出请求,负载均衡模块将接收到的请求根据负载平衡策略分摊至任一计算节点;计算节点处理请求,并将结果返回至负载均衡模块,负载均衡模块将响应结果返回至请求端;(2) Load balancing: The requester sends a request, and the load balancing module allocates the received request to any computing node according to the load balancing strategy; the computing node processes the request and returns the result to the load balancing module, and the load balancing module will respond with the result return to the requester;
(3)服务发现:当添加新的计算节点时,会向服务发现模块注册新增计算节点信息;移除计算节点时,首先通知负载均衡模块移除该计算节点,然后从服务发现模块中移除该计算节点的相关信息;(3) Service discovery: When a new computing node is added, the information of the newly added computing node will be registered with the service discovery module; when a computing node is removed, the load balancing module is first notified to remove the computing node, and then removed from the service discovery module. In addition to the relevant information of the computing node;
(4)容器监控:将各服务器模块中运行的监控模块作为从节点,容器监控模块作为主节点,从节点周期性的向主节点发送所在服务器模块的指标数据,主节点接收各从节点的指标数据并绘制成图形,显示在系统监控模块所在的主机浏览器上;(4) Container monitoring: The monitoring module running in each server module is used as the slave node, and the container monitoring module is used as the master node. The slave node periodically sends the indicator data of the server module where it is located to the master node, and the master node receives the indicators of each slave node. The data is drawn into a graph and displayed on the host browser where the system monitoring module is located;
(5)数据处理:将hadoop运行在Kubernetes集群中,处理容器应用中获取的海量MongoDB和Mysql数据,以便达到容器系统的数据有效性和可分析性。(5) Data processing: Hadoop is run in the Kubernetes cluster to process massive MongoDB and Mysql data obtained from container applications, so as to achieve the data validity and analyzability of the container system.
本发明与现有技术相比,具有如下优点和有益效果:Compared with the prior art, the present invention has the following advantages and beneficial effects:
1、LXC容器技术因其启动速度快、性能佳等特点,逐渐在云计算领域中占有一席之地。在这之中,Docker是一个开源的应用容器引擎,让开发者可以打包应用以及依赖包到一个可移植的容器中,然后发布到Linux机器上。容器使用沙箱机制,相互之间不会有任何接口,可以很容易地在主机和数据中心中运行。本发明所采用的Kubernetes作为一种管理轻量级容器Docker的引擎,可以方便快速的创建容器并进行容器的全生命周期管理,使得容器技术的普及更进一步。Kubernetes容器集群管理系统的主要功能包括:使用Docker对应用程序进行打包、实例化及运行;以集群的方式运行及管理跨主机的容器;解决位于不同主机之间所运行的容器之间的通信问题等等。再进一步,Kubernetes作为最早的基于Docker的容器调度方案之一,通过成熟的系统架构和强大的横向扩容能力,有望成为最成功的容器调度方案,并服务于未来云计算领域。1. LXC container technology has gradually gained a place in the field of cloud computing due to its fast startup speed and good performance. Among them, Docker is an open-source application container engine that allows developers to package applications and dependencies into a portable container and distribute them to Linux machines. Containers use a sandbox mechanism, do not have any interface with each other, and can easily run on hosts and data centers. The Kubernetes used in the present invention, as an engine for managing the lightweight container Docker, can conveniently and quickly create a container and perform full life cycle management of the container, which further promotes the popularization of container technology. The main functions of the Kubernetes container cluster management system include: using Docker to package, instantiate and run applications; run and manage containers across hosts in a cluster; solve communication problems between containers running on different hosts and many more. Going a step further, Kubernetes, as one of the earliest container scheduling solutions based on Docker, is expected to become the most successful container scheduling solution through mature system architecture and powerful horizontal expansion capabilities, and will serve the future cloud computing field.
2、本发明可以方便的应用于需要高可用性及扩展性的容器系统,同时实现如下功能:(1)监控CentOS服务器及其运行Docker容器的运行状况;(2)根据监控数据利用Kubernetes技术动态伸缩集群;(3)通过构建Docker私有Registry仓库和制定作业管理策略,实现Docker镜像的持续集成,不需重启容器便可更新业务。2. The present invention can be conveniently applied to a container system that requires high availability and scalability, and simultaneously realizes the following functions: (1) Monitor the running status of the CentOS server and its running Docker container; (2) Use Kubernetes technology to dynamically scale according to the monitoring data (3) By building a Docker private Registry warehouse and formulating job management strategies, the continuous integration of Docker images is realized, and the business can be updated without restarting the container.
附图说明Description of drawings
图1为本发明所述一种基于Kubernetes的容器云架构的结构示意图。FIG. 1 is a schematic structural diagram of a Kubernetes-based container cloud architecture according to the present invention.
图2为图1所述容器云架构的镜像构建模块的运行过程架构图。FIG. 2 is an architecture diagram of an operation process of an image building module of the container cloud architecture described in FIG. 1 .
图3为图1所述容器云架构的负载均衡模块的运行过程架构图。FIG. 3 is an operational process architecture diagram of the load balancing module of the container cloud architecture described in FIG. 1 .
图4为图1所述容器云架构的服务发现模块的运行过程架构图。FIG. 4 is an architecture diagram of an operation process of the service discovery module of the container cloud architecture described in FIG. 1 .
图5为图1所述容器云架构的容器监控模块的运行过程架构图。FIG. 5 is a schematic diagram of the operation process of the container monitoring module of the container cloud architecture described in FIG. 1 .
附图中各部件的标记如下:1-镜像构建模块,2-负载均衡模块,3-服务发现模块,4-容器监控模块。The labels of the components in the accompanying drawings are as follows: 1-image building module, 2-load balancing module, 3-service discovery module, 4-container monitoring module.
具体实施方式Detailed ways
下面结合实施例及附图对本发明作进一步详细的描述,但本发明的实施方式不限于此。The present invention will be described in further detail below with reference to the embodiments and the accompanying drawings, but the embodiments of the present invention are not limited thereto.
如图1至图5,具体如下:As shown in Figure 1 to Figure 5, the details are as follows:
(一)镜像自动部署实现方法(1) Implementation method of image automatic deployment
所述镜像构建模块1用于提供一种从开发到部署以及关于作业定义的镜像构建策略,主要支持镜像与源代码自动化结合方法,比较适合于业务更新时对容器镜像的及时更新。镜像构建的流程步骤如图2所示,详细步骤如下:The image construction module 1 is used to provide an image construction strategy from development to deployment and job definition, mainly supports an automated combination method of image and source code, and is more suitable for timely update of container images during business updates. The process steps of image construction are shown in Figure 2, and the detailed steps are as follows:
(1)代码提交(1) Code submission
开发人员将各种语言编程的代码提交到版本管理仓库,在本发明中,以SVN为版本管理工具,该工具适用于团队合作的项目开发流程中保证代码的一致性。The developer submits the codes of programming in various languages to the version management warehouse. In the present invention, SVN is used as the version management tool, which is suitable for ensuring the consistency of the code in the project development process of team cooperation.
(2)定义作业(2) Define the job
与此同时,运维人员编写适合项目的Docker镜像打包文件Dockerfile和基于Kubernetes的yaml文件,严格按照Dockerfile编写规则和yaml文件编排规则,创建对应的容器运行规则。At the same time, the operation and maintenance personnel write the Docker image packaging file Dockerfile suitable for the project and the Kubernetes-based yaml file, and create the corresponding container operation rules in strict accordance with the Dockerfile writing rules and the yaml file arrangement rules.
(3)构建镜像文件(3) Build an image file
根据CI/CD自动化部署流程,以(1)中源代码和(2)中Dockerfile文件为基础,创建容器的image镜像文件,并推送到私有Docker镜像仓库。According to the CI/CD automated deployment process, based on the source code in (1) and the Dockerfile in (2), the image file of the container is created and pushed to the private Docker image repository.
(4)运行镜像文件(4) Run the image file
根据(3)中的镜像文件和(2)中的yaml文件,在Kubernetes中以合理编排的方式运行镜像文件。According to the image file in (3) and the yaml file in (2), run the image file in a rationally orchestrated manner in Kubernetes.
上述步骤提供了镜像的存储和运行服务,镜像仓库使用Docker推荐的私有库安装方式,解决了作业定义与源代码相结合的问题。The above steps provide image storage and operation services. The image repository uses the private library installation method recommended by Docker, which solves the problem of combining job definitions with source code.
(二)容器系统扩展方法(2) Container system extension method
所述负载均衡模块2用于对动态变化的集群中各个Kubernetes节点进行负载均衡;其采用Nginx-Plus工具实现,Nginx-Plus是Nginx公司发布的可结合在Kubernetes集群中一种可靠的负载均衡工具,特别适合一些负载较大的Web系统使用。配合Kubernetes,可加强Kubernetes的负载均衡能力,使本容器系统的扩展性得以提高。负载均衡模块如图3所示。The
所述服务发现模块3用于实时存储动态变化的Kubernetes集群各节点的信息;其采用Etcd存储系统存储各计算节点信息。Etcd是一个高可用的Key/Value存储系统,主要用于分享配置和服务发现。通过Etcd能够快速有效地增加和移除当前各个Kubernetes节点的信息。服务发现模块如图4所示。The service discovery module 3 is used to store the information of each node of the dynamically changing Kubernetes cluster in real time; it uses the Etcd storage system to store the information of each computing node. Etcd is a highly available Key/Value storage system, mainly used for sharing configuration and service discovery. Etcd can quickly and effectively add and remove information about each current Kubernetes node. The service discovery module is shown in Figure 4.
(三)容器监控方法(3) Container monitoring method
所述容器监控模块4用于采集、存储和显示Kubernetes集群各节点的容器运行状态信息;CentOS是企业最常用的服务器操作系统,基于该系统,本发明实现了基于Zabbix和cAdvisor结合的容器监控模块。Zabbix是一个基于Web界面的提供分布式系统监视以及网络监视功能的企业级解决方案;而cAdvisor是一个用于收集、聚合处理和输出容器运行指标的守护进程,通过cAdvisor能获取Kubernetes集群中Docker各种性能数据。在Zabbix中支持Docker,使用Zabbix Docker Monitoring实现容器监控。容器监控系统如图5所示,监控步骤如下:The
(1)在Kubernetes主节点部署Zabbix Server,监控主节点,并导入Web管理界面,分发到子节点。(1) Deploy Zabbix Server on the Kubernetes master node, monitor the master node, import the Web management interface, and distribute to child nodes.
(2)在子节点部署Zabbix Agent,实现各个子节点的主机监控。(2) Deploy Zabbix Agent on sub-nodes to realize host monitoring of each sub-node.
(3)在各个Kubernetes节点启动cAdvisor容器,实现主机容器性能的监控。(3) Start the cAdvisor container on each Kubernetes node to monitor the performance of the host container.
(4)web可视化界面展示:将得到的监控数据通过HTTP和JSON接口展现在前端。(4) Web visualization interface display: display the obtained monitoring data on the front end through HTTP and JSON interfaces.
(四)各模块交互方法(4) Interaction method of each module
一种基于Kubernetes的Web服务器架构各模块之间的交互方法,包括以下过程:An interaction method between modules of a Kubernetes-based web server architecture, including the following processes:
(1)代码更新:一台主机作为Docker私有库服务器,当业务代码更新时,开发人员将新的代码镜像通过自动化方式上传到运行私有库模块的主机中,每次新增Kubernetes节点时,系统从私有库模块中拉取新的业务镜像并加载运行。如图2所示。(1) Code update: A host is used as a Docker private library server. When the business code is updated, the developer automatically uploads the new code image to the host running the private library module. Every time a Kubernetes node is added, the system Pull the new business image from the private library module and load it to run. as shown in
(2)负载均衡:请求端发出http请求,负载均衡模块将接收到的请求根据负载平衡策略分摊至任一Kubernetes节点;接着节点处理请求,并将结果返回至负载均衡模块,负载均衡模块将响应结果返回至请求端。(2) Load balancing: The requester sends an http request, and the load balancing module allocates the received request to any Kubernetes node according to the load balancing policy; then the node processes the request and returns the result to the load balancing module, and the load balancing module will respond The result is returned to the requester.
所述负载均衡模块定期查询所述服务发现模块(Etcd),并根据查询结果更新并重新加载负载均衡模块的配置文件。具体为:负载均衡模块周期性的从服务发现模块拉取最新的Kubernetes节点信息,如图3所示。The load balancing module periodically queries the service discovery module (Etcd), and updates and reloads the configuration file of the load balancing module according to the query result. Specifically: the load balancing module periodically pulls the latest Kubernetes node information from the service discovery module, as shown in Figure 3.
(3)服务发现:采用Etcd开源工具实现。当添加新的计算节点时,会向服务发现模块(Etcd)注册新增计算节点信息;移除计算节点时,首先通知负载均衡模块移除该计算节点,然后从服务发现模块中移除该计算节点的相关信息,如图4所示。(3) Service discovery: It is implemented with Etcd open source tools. When adding a new computing node, it will register the new computing node information with the service discovery module (Etcd); when removing a computing node, first notify the load balancing module to remove the computing node, and then remove the computing node from the service discovery module The relevant information of the node is shown in Figure 4.
(4)容器监控:采用从节点向主节点汇报的“主动”模式。将各服务器模块中运行的监控模块作为从节点,1台主机运行系统监控模块作为主节点,从节点周期性的向主节点发送所在服务器模块的指标数据,如CPU占比和剩余内存等,主节点接收各从节点的指标数据并绘制成图形,显示在系统监控模块所在的主机浏览器上,如图5所示。(4) Container monitoring: The "active" mode of reporting from the slave node to the master node is adopted. The monitoring module running in each server module is used as a slave node, and one host runs the system monitoring module as the master node. The slave node periodically sends the indicator data of the server module where it is located to the master node, such as CPU ratio and remaining memory. The node receives the indicator data of each slave node and draws it into a graph, which is displayed on the host browser where the system monitoring module is located, as shown in Figure 5.
(5)数据处理:将hadoop运行在Kubernetes集群中,处理容器应用中获取的大量MongoDB和Mysql数据,以便达到容器系统的数据有效性和可分析性。(5) Data processing: Hadoop is run in the Kubernetes cluster to process a large amount of MongoDB and Mysql data obtained in container applications, so as to achieve the data validity and analyzability of the container system.
(五)本发明方法部署要求(5) Deployment requirements of the method of the present invention
本发明至少需要四台主机:一台主机作为服务发现模块的主机,一台主机作为负载均衡模块的主机,一台主机运行容器监控模块,一台主机作为运行镜像构建模块的服务器,其他主机作为运行服务器模块的节点。各主机运行各自的业务逻辑,一个基于Kubernetes的高可用服务器集群便部署完成。The present invention requires at least four hosts: one host serves as the host of the service discovery module, one host serves as the host of the load balancing module, one host runs the container monitoring module, one host serves as the server that runs the image building module, and the other hosts serve as the host of the load balancing module. Node running the server module. Each host runs its own business logic, and a Kubernetes-based high-availability server cluster is deployed.
本发明揭示了一种基于Kubernetes的容器云架构及各模块之间的交互方法,可以方便的应用于需要高可用性及扩展性的容器系统,同时实现如下功能:(1)监控CentOS服务器及其运行Docker容器的运行状况;(2)根据监控数据利用Kubernetes技术动态伸缩集群;(3)通过构建Docker私有Registry仓库和制定作业管理策略,实现Docker镜像的持续集成,并以不需重启容器的方式来更新业务。通过上述功能实现容器系统的高并发性和稳定性。The invention discloses a Kubernetes-based container cloud architecture and an interaction method between modules, which can be easily applied to a container system that requires high availability and scalability, and simultaneously realizes the following functions: (1) Monitoring the CentOS server and its operation The running status of Docker containers; (2) Use Kubernetes technology to dynamically scale clusters according to monitoring data; (3) By building Docker private Registry warehouses and formulating job management strategies, the continuous integration of Docker images is realized, and the container does not need to be restarted. Update business. High concurrency and stability of the container system are achieved through the above functions.
上述实施例为本发明较佳的实施方式,但本发明的实施方式并不受上述实施例的限制,其他的任何未背离本发明的精神实质与原理下所作的改变、修饰、替代、组合、简化,均应为等效的置换方式,都包含在本发明的保护范围之内。The above-mentioned embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited by the above-mentioned embodiments, and any other changes, modifications, substitutions, combinations, The simplification should be equivalent replacement manners, which are all included in the protection scope of the present invention.
Claims (5)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710051697.9A CN106888254B (en) | 2017-01-20 | 2017-01-20 | Kubernetes-based container cloud architecture and interaction method among modules thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710051697.9A CN106888254B (en) | 2017-01-20 | 2017-01-20 | Kubernetes-based container cloud architecture and interaction method among modules thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106888254A CN106888254A (en) | 2017-06-23 |
CN106888254B true CN106888254B (en) | 2020-08-18 |
Family
ID=59176696
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710051697.9A Active CN106888254B (en) | 2017-01-20 | 2017-01-20 | Kubernetes-based container cloud architecture and interaction method among modules thereof |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106888254B (en) |
Families Citing this family (89)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10291472B2 (en) | 2015-07-29 | 2019-05-14 | AppFormix, Inc. | Assessment of operational states of a computing environment |
US10581687B2 (en) | 2013-09-26 | 2020-03-03 | Appformix Inc. | Real-time cloud-infrastructure policy implementation and management |
EP3226135A3 (en) * | 2016-03-30 | 2018-01-31 | AppFormix, Inc. | Real-time cloud-infrastructure policy implementation and management |
US11068314B2 (en) | 2017-03-29 | 2021-07-20 | Juniper Networks, Inc. | Micro-level monitoring, visibility and control of shared resources internal to a processor of a host machine for a virtual environment |
US10868742B2 (en) | 2017-03-29 | 2020-12-15 | Juniper Networks, Inc. | Multi-cluster dashboard for distributed virtualization infrastructure element monitoring and policy control |
US11323327B1 (en) | 2017-04-19 | 2022-05-03 | Juniper Networks, Inc. | Virtualization infrastructure element monitoring and policy control in a cloud environment using profiles |
CN107395731A (en) * | 2017-07-28 | 2017-11-24 | 郑州云海信息技术有限公司 | A kind of adjusting method and device of the container cluster based on service orchestration |
CN107730125B (en) * | 2017-10-20 | 2021-09-14 | 南方电网科学研究院有限责任公司 | Laboratory management system |
CN107908521A (en) * | 2017-11-10 | 2018-04-13 | 南京邮电大学 | A kind of monitoring method of container performance on the server performance and node being applied under cloud environment |
CN107766126B (en) * | 2017-11-15 | 2023-01-13 | 腾讯科技(深圳)有限公司 | Container mirror image construction method, system and device and storage medium |
CN109814881A (en) * | 2017-11-21 | 2019-05-28 | 北京京东尚科信息技术有限公司 | Method and apparatus for disposing data-base cluster |
CN107948035A (en) * | 2017-11-28 | 2018-04-20 | 广州供电局有限公司 | Business data service bus construction method based on the interaction of private clound big data |
CN108052333A (en) * | 2017-12-11 | 2018-05-18 | 北京紫优能源科技有限公司 | A kind of power scheduling centralized control system standardization Automation arranging method and framework |
CN108156225B (en) * | 2017-12-15 | 2021-02-05 | 南瑞集团有限公司 | Micro-application monitoring system and method based on container cloud platform |
CN108039975B (en) * | 2017-12-21 | 2020-08-28 | 北京搜狐新媒体信息技术有限公司 | Container cluster management system and application method thereof |
CN108259611A (en) * | 2018-01-22 | 2018-07-06 | 郑州云海信息技术有限公司 | Cluster docker management methods, device, system and readable storage medium storing program for executing |
CN108076159A (en) * | 2018-01-26 | 2018-05-25 | 成都精灵云科技有限公司 | A kind of cloud platform based on Docker builds device |
CN108304267B (en) * | 2018-01-31 | 2022-03-22 | 中科边缘智慧信息科技(苏州)有限公司 | Multi-source data leading method with high reliability and low resource overhead |
CN109284184A (en) * | 2018-03-07 | 2019-01-29 | 中山大学 | A method for building a distributed machine learning platform based on containerization technology |
US11128530B2 (en) | 2018-03-29 | 2021-09-21 | Hewlett Packard Enterprise Development Lp | Container cluster management |
US10848552B2 (en) | 2018-03-29 | 2020-11-24 | Hewlett Packard Enterprise Development Lp | Determining whether to perform address translation to forward a service request or deny a service request based on blocked service attributes in an IP table in a container-based computing cluster management system |
CN108616419B (en) * | 2018-03-30 | 2020-07-28 | 武汉虹旭信息技术有限责任公司 | Data packet acquisition and analysis system and method based on Docker |
CN108829509A (en) * | 2018-05-03 | 2018-11-16 | 山东汇贸电子口岸有限公司 | Distributed container cluster framework resources management method based on domestic CPU and operating system |
CN110198231B (en) * | 2018-05-08 | 2022-02-25 | 腾讯科技(深圳)有限公司 | Container network management method and system for multiple tenants and middleware |
CN110457040B (en) * | 2018-05-08 | 2022-02-25 | 腾讯科技(深圳)有限公司 | Method and device for distributed construction of source code |
CN108848149B (en) * | 2018-06-05 | 2021-01-19 | 挖财网络技术有限公司 | Method and device for adaptively positioning maximum processing capacity of HTTP (hyper text transport protocol) service |
CN108848157A (en) * | 2018-06-12 | 2018-11-20 | 郑州云海信息技术有限公司 | A kind of method and apparatus of Kubernetes cluster container monitors |
CN108762912A (en) * | 2018-07-04 | 2018-11-06 | 郑州云海信息技术有限公司 | A kind of method and apparatus of container cluster elastic telescopic |
CN109117248A (en) * | 2018-07-19 | 2019-01-01 | 郑州云海信息技术有限公司 | A kind of deep learning task elastic telescopic system and method based on kubernetes platform |
CN109117259B (en) * | 2018-07-25 | 2021-05-25 | 北京京东尚科信息技术有限公司 | Task scheduling method, platform, device and computer readable storage medium |
CN108984205A (en) * | 2018-07-26 | 2018-12-11 | 浙江大学 | A kind of method and device of application automation building and deployment based on container technique |
CN109309581B (en) * | 2018-08-22 | 2021-07-13 | 华东计算技术研究所(中国电子科技集团公司第三十二研究所) | Container management system crossing hardware architecture |
CN109194732A (en) * | 2018-08-28 | 2019-01-11 | 郑州云海信息技术有限公司 | A kind of the High Availabitity dispositions method and device of OpenStack |
CN110896404B (en) | 2018-09-12 | 2021-09-14 | 华为技术有限公司 | Data processing method and device and computing node |
CN109445904B (en) * | 2018-09-30 | 2020-08-04 | 咪咕文化科技有限公司 | An information processing method, device and computer storage medium |
CN109471720A (en) * | 2018-10-19 | 2019-03-15 | 曙光信息产业(北京)有限公司 | Online operational system |
CN109392020A (en) * | 2018-10-26 | 2019-02-26 | 中山大学 | A kind of resource management platform towards 5G mobile network |
CN111182017B (en) * | 2018-11-13 | 2022-09-09 | 北京国双科技有限公司 | Data transmission method and device, storage medium and electronic equipment |
CN109471658A (en) * | 2018-11-19 | 2019-03-15 | 四川长虹电器股份有限公司 | A method of the fast construction target drone environment based on container |
CN109542791B (en) * | 2018-11-27 | 2019-11-29 | 湖南智擎科技有限公司 | A kind of program large-scale concurrent evaluating method based on container technique |
CN109656682A (en) * | 2018-12-03 | 2019-04-19 | 中国石油化工股份有限公司 | A kind of system and method for the exploration and development big data processing platform based on container technique |
CN109669637B (en) * | 2018-12-21 | 2022-09-16 | 北京百度网讯科技有限公司 | System, method and apparatus for providing container services |
CN109754849B (en) * | 2018-12-24 | 2023-02-24 | 武汉大学 | Personal health stream data processing system and method in cloud computing environment |
CN111427949B (en) * | 2019-01-09 | 2023-10-20 | 杭州海康威视数字技术股份有限公司 | Method and device for creating big data service |
CN111431955B (en) * | 2019-01-10 | 2023-03-24 | 中科星图股份有限公司 | Streaming data processing system and method |
CN109901922B (en) * | 2019-03-05 | 2021-06-18 | 北京工业大学 | A multi-layer service-oriented container cloud resource scheduling optimization method |
CN109981351A (en) * | 2019-03-06 | 2019-07-05 | 浪潮通用软件有限公司 | A kind of private clound dispositions method |
CN111694705A (en) * | 2019-03-15 | 2020-09-22 | 北京沃东天骏信息技术有限公司 | Monitoring method, device, equipment and computer readable storage medium |
CN110086726A (en) * | 2019-04-22 | 2019-08-02 | 航天云网科技发展有限责任公司 | A method of automatically switching Kubernetes host node |
CN110262941B (en) * | 2019-05-28 | 2023-06-16 | 深圳市汇川技术股份有限公司 | Method, system, equipment and storage medium for realizing cluster alarm of application program container |
CN110362381A (en) * | 2019-06-21 | 2019-10-22 | 深圳市汇川技术股份有限公司 | HDFS cluster High Availabitity dispositions method, system, equipment and storage medium |
CN110333889B (en) * | 2019-07-19 | 2023-09-15 | 浪潮云信息技术股份公司 | Method and system for upgrading container service user cluster |
CN110532075A (en) * | 2019-08-09 | 2019-12-03 | 济南浪潮数据技术有限公司 | Method and device for realizing stateful load |
CN110764742B (en) * | 2019-10-18 | 2023-05-23 | 成都信息工程大学 | A high-speed calculation method and system for linear correlation degree of climate observation data |
CN110932926B (en) * | 2019-10-31 | 2022-02-18 | 北京浪潮数据技术有限公司 | Container cluster monitoring method, system and device |
CN110806881B (en) * | 2019-11-05 | 2023-07-04 | 浪潮云信息技术股份公司 | Method for deploying different CPU architectures by kubernetes |
CN110837418A (en) * | 2019-11-06 | 2020-02-25 | 浪潮云信息技术有限公司 | High-concurrency web system based on container and implementation method |
CN110912972B (en) * | 2019-11-07 | 2022-08-19 | 北京浪潮数据技术有限公司 | Service processing method, system, electronic equipment and readable storage medium |
CN110990668A (en) * | 2019-11-13 | 2020-04-10 | 北京浪潮数据技术有限公司 | Document data display method and related device |
CN112910937B (en) * | 2019-11-19 | 2022-12-23 | 北京金山云网络技术有限公司 | Object scheduling method, device, server and container cluster in container cluster |
CN110764786A (en) * | 2019-12-27 | 2020-02-07 | 凯泰铭科技(北京)有限公司 | Optimized deployment resource and software delivery platform in cloud computing environment |
CN111209011A (en) * | 2019-12-31 | 2020-05-29 | 烽火通信科技股份有限公司 | Cross-platform container cloud automatic deployment system |
CN111242801A (en) * | 2019-12-31 | 2020-06-05 | 中国电力科学研究院有限公司 | Power system regulation and control cloud power grid operation analysis platform |
CN111277460B (en) * | 2020-01-17 | 2022-02-25 | 江苏满运软件科技有限公司 | ZooKeeper containerization control method and device, storage medium and electronic equipment |
CN111273960A (en) * | 2020-01-20 | 2020-06-12 | 山东汇贸电子口岸有限公司 | Method for realizing cloud native MIPS architecture container cloud |
CN111367662B (en) * | 2020-02-26 | 2023-06-02 | 普信恒业科技发展(北京)有限公司 | Load balancing method, device and system |
CN111400374B (en) * | 2020-03-18 | 2023-05-23 | 中国雄安集团数字城市科技有限公司 | Data mining-oriented containerized data exploration isolation region and use method thereof |
CN111427600B (en) * | 2020-03-20 | 2023-04-21 | 成都千立网络科技有限公司 | Platform system deployment upgrading method and system based on dock |
CN111414233A (en) * | 2020-03-20 | 2020-07-14 | 京东数字科技控股有限公司 | Online model reasoning system |
CN111427625B (en) * | 2020-03-23 | 2023-03-24 | 中国—东盟信息港股份有限公司 | Method for constructing Kubernetes container cloud external load balancer based on dynamic routing |
CN111614727B (en) * | 2020-04-27 | 2022-08-02 | 深圳壹账通智能科技有限公司 | Monitoring sandbox architecture, monitoring method, device and storage medium |
CN111767282B (en) * | 2020-06-12 | 2024-09-27 | 咪咕文化科技有限公司 | MongoDB-based storage system, data insertion method and storage medium |
CN111813418B (en) * | 2020-06-30 | 2024-04-05 | 深圳赛安特技术服务有限公司 | Distributed link tracking method, device, computer equipment and storage medium |
CN111897551B (en) * | 2020-08-03 | 2021-07-02 | 汇链通供应链科技(上海)有限公司 | Platform and method for rapidly cloning software environment in cloud environment |
CN112084009B (en) * | 2020-09-17 | 2024-06-11 | 湖南长城科技信息有限公司 | Method for constructing and monitoring Hadoop clusters and alarms based on containerization technology under PK system |
CN112486634A (en) * | 2020-12-09 | 2021-03-12 | 浪潮云信息技术股份公司 | Method for realizing integral monitoring of container cloud platform |
CN112764825B (en) * | 2020-12-30 | 2023-12-29 | 望海康信(北京)科技股份公司 | Service integration system, corresponding device and storage medium |
CN112799777B (en) * | 2020-12-31 | 2024-04-05 | 深圳软通动力信息技术有限公司 | Preheating scheduling method in assembly line |
CN112328456B (en) * | 2021-01-04 | 2021-12-03 | 北京电信易通信息技术股份有限公司 | Cluster resource monitoring system based on service discovery |
CN112765122B (en) * | 2021-01-19 | 2022-10-04 | 深圳软通动力信息技术有限公司 | Method and system for importing database in kubernets |
CN113051131B (en) * | 2021-03-23 | 2024-09-20 | 北京沃东天骏信息技术有限公司 | Acquisition end, management control platform, prometheus service adjustment method and system |
CN113190328A (en) * | 2021-05-22 | 2021-07-30 | 北京理工大学 | System identification-oriented containerized cloud workflow processing system and method |
CN113656241B (en) * | 2021-07-20 | 2023-10-31 | 国网天津市电力公司 | A container terminal full life cycle management and control system and method |
CN113504916B (en) * | 2021-07-23 | 2024-07-26 | 京东方科技集团股份有限公司 | Code updating method and device, computer equipment and medium |
CN114443069B (en) * | 2021-12-30 | 2023-09-08 | 苏州浪潮智能科技有限公司 | Method and system for constructing operating system mirror image by dynamically expanding cluster |
CN114466017B (en) * | 2022-03-14 | 2024-03-12 | 阿里巴巴(中国)有限公司 | Data monitoring method and device for kubernetes edge cluster |
CN114866544B (en) * | 2022-04-02 | 2023-10-03 | 中国人民解放军国防科技大学 | Containerized microservice load balancing method for CPU heterogeneous clusters in cloud edge environment |
CN116797199A (en) * | 2022-04-08 | 2023-09-22 | 西安幸福悦动信息科技有限公司 | Object management operation and maintenance system |
CN117614963A (en) * | 2023-10-20 | 2024-02-27 | 云南兆讯科技有限责任公司 | Distributed MQTT message server |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105119913A (en) * | 2015-08-13 | 2015-12-02 | 东南大学 | Web server architecture based on Docker and interactive method between modules |
CN105357296A (en) * | 2015-10-30 | 2016-02-24 | 河海大学 | Elastic caching system based on Docker cloud platform |
CN105376303A (en) * | 2015-10-23 | 2016-03-02 | 深圳前海达闼云端智能科技有限公司 | Docker implementation system and communication method thereof |
-
2017
- 2017-01-20 CN CN201710051697.9A patent/CN106888254B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105119913A (en) * | 2015-08-13 | 2015-12-02 | 东南大学 | Web server architecture based on Docker and interactive method between modules |
CN105376303A (en) * | 2015-10-23 | 2016-03-02 | 深圳前海达闼云端智能科技有限公司 | Docker implementation system and communication method thereof |
CN105357296A (en) * | 2015-10-30 | 2016-02-24 | 河海大学 | Elastic caching system based on Docker cloud platform |
Non-Patent Citations (1)
Title |
---|
基于Docker的平台即服务架构研究;张建,谢天钧;《信息技术与信息化》;20141031;全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN106888254A (en) | 2017-06-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106888254B (en) | Kubernetes-based container cloud architecture and interaction method among modules thereof | |
US9880827B2 (en) | Managing software version upgrades in a multiple computer system environment | |
CN105119913A (en) | Web server architecture based on Docker and interactive method between modules | |
US8832130B2 (en) | System and method for implementing on demand cloud database | |
CN105700907B (en) | Utilize the Uninstaller model for local checkpoint | |
CN109445802B (en) | Privatized Paas platform based on container and method for publishing application thereof | |
CN104503845B (en) | A kind of task distribution method and system | |
US20180060133A1 (en) | Event-driven resource pool management | |
WO2020215752A1 (en) | Graph computing method and device | |
CN106020854A (en) | Applying firmware updates in a system with zero downtime | |
CN110795503A (en) | Multi-cluster data synchronization method and related device of distributed storage system | |
CN101146127B (en) | A client buffer update method and device in distributed system | |
CN103581332B (en) | HDFS framework and pressure decomposition method for NameNodes in HDFS framework | |
Essa et al. | Mobile agent based new framework for improving big data analysis | |
CN108243012B (en) | Charging application processing system, method and device in OCS (online charging System) | |
CN109117252B (en) | Method and system for task processing based on container and container cluster management system | |
CN111343219B (en) | Computing service cloud platform | |
Kijsipongse et al. | A hybrid GPU cluster and volunteer computing platform for scalable deep learning | |
US20210373914A1 (en) | Batch to stream processing in a feature management platform | |
US20150355892A1 (en) | Resources provisioning based on a set of discrete configurations | |
CN111552010A (en) | Satellite remote sensing quick response and visualization service platform for global meteorological disasters | |
CN115640110A (en) | Distributed cloud computing system scheduling method and device | |
CN108259608B (en) | Multi-agent cluster operation method | |
CN113254437B (en) | Batch processing job processing method and device | |
CN115562676B (en) | Triggering method of graph calculation engine |
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 | ||
CB03 | Change of inventor or designer information |
Inventor after: Lu Lu Inventor after: OuYang Peng Inventor after: Tu Yixin Inventor before: Lu Lu Inventor before: Tu Yixin |
|
CB03 | Change of inventor or designer information | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right |
Effective date of registration: 20220909 Address after: Room 1001, No. 266, Kefeng Road, Huangpu District, Guangzhou City, Guangdong Province, 510705 Patentee after: Guangzhou Lusheng Intelligent Technology Co.,Ltd. Address before: 510640 No. five, 381 mountain road, Guangzhou, Guangdong, Tianhe District Patentee before: SOUTH CHINA University OF TECHNOLOGY |
|
TR01 | Transfer of patent right |