基于Kubernetes容器集群的自动化监测和管理系统

 2022-04-02 10:04

论文总字数:27598字

摘 要

Kubernetes,作为容器云的代表,已经成为容器编排领域的事实标准。越来越多的企业已经将自己的应用部署在Kubernetes集群中。

目前手动部署应用十分麻烦,并且会造成资源的浪费。应用正常运行之后,还需要一个监控系统来对整个系统的应用进行相关的维护。然而,目前市面上并没有完善的一套方案可以完成部署和监控的任务,这也在相当的程度上阻碍了Kubernetes的快速发展和应用。

本文基于Kubernetes容器集群,设计实现了这样一套自动化监测和管理系统。首先从部署开始,用户输入以JSON格式表示的应用拓扑结构树,系统将对JSON文件进行处理,查看是否有布置条件,然后简并重复节点,交给Kubernetes集群去部署。在监控模块,本文设计了高可用的联邦集群架构,解决了单个监控节点无法应对大规模数据量的问题,并在系统上加上持久化存储功能,将临时数据存入远端数据库,提高了系统的扩展性和可用性。最后将采集到的监控数据在前端可视化,方便运维人员实时掌握集群最新动态,同时提供预警功能。

关键词:Kubernetes,容器,集群,部署,监控

Abstract

Kubernetes, as a representative of container clouds, has become the fact standard in the field of container orchestration. More and more companies have deployed their applications in the Kubernetes cluster.

Manually deploying applications is currently cumbersome and wastes resources. After the application is running normally, a monitoring system is needed to perform related maintenance on the entire system. However, there is currently no complete set of solutions on the market to complete the deployment and monitoring tasks, which also hinders the rapid development and application of Kubernetes to a considerable extent.

Based on the Kubernetes container cluster, such an automated monitoring and management system is designed and implemented. First, from the deployment, the user enters the application topology tree expressed in JSON format. The system will process the JSON file to see if there are layout conditions, then degenerate the nodes and hand them over to the Kubernetes cluster for deployment. In the monitoring module, a highly available federated cluster architecture is designed, which solves the problem that a single monitoring node cannot cope with large-scale data volume, and adds persistent storage function to the system to store temporary data in the remote database. System scalability and availability have been increased. Finally, the collected monitoring data is visualized at the front end, which facilitates the operation and maintenance personnel to grasp the latest circumstances of the cluster in real time, and provides early warning functions.

KEY WORDS: Kubernetes, Container, cluster, deployment, monitoring

目 录

摘 要 I

Abstract II

第一章 绪论 1

1.1论文研究背景 1

1.2国内外动态 1

1.3研究的目的和意义 2

1.4本文的组织结构 2

第二章 相关技术介绍 4

2.1容器技术概述 4

2.2Kubernetes及相关技术概述 5

2.2.1Kubernetes基本概念 5

2.2.2Kubernetes核心概念 6

2.2.3Kubernetes架构 7

2.3Prometheus及相关技术概述 8

2.3.1Prometheus简介 8

2.3.2Prometheus组成及架构 8

2.4本章小结 9

第三章 项目需求分析 10

3.1系统需求概述 10

3.2功能需求 11

3.2.1自动化部署 11

3.2.2自动化监控 11

3.2.3可视化界面 12

3.3非功能性需求 13

3.4本章小结 13

第四章 系统设计 14

4.1系统总体设计 14

4.2自动化部署模块设计 15

4.2.1JSON预处理 15

4.2.2JSON解析简并 16

4.3自动化监控模块设计 17

4.3.1Prometheus的高可用架构设计 17

4.3.2数据持久化设计 19

4.4前端可视化模块设计. 20

4.5本章小结 20

第五章 系统实现 21

5.1自动化部署的开发与实现 21

5.1.1JSON预处理 21

5.1.2JSON解析简并 23

5.2自动化监控的开发与实现 24

5.2.1Prometheus联邦集群实现 24

5.2.2数据持久化实现 28

5.3可视化界面的开发与实现 29

5.4本章小结 30

第六章 系统测试 31

6.1功能性测试 31

6.2非功能性测试 31

6.3本章小结 32

第七章 总结与展望 33

7.1论文总结 33

7.2未来工作展望 34

参考文献 35

致 谢 36

第一章 绪论

1.1论文研究背景

随着容器化进程的加快,人们不再满足于单纯使用如Docker这样的技术来用于生产使用。复杂分布式应用的出现,规模越来愈大的容器需求,让正值盛行的容器风暴也遇上发展的瓶颈。应用所需的容器增多,使得对容器管理解决方案的渴求却不可得成为了企业不得不去面对的一个难题。

在此基础上,Google隆重推出了Kubernetes,它能够跨主机管理容器集群,是Google内部Borg的一个开源版本。Brog是谷歌企业内部自用的容器管理方案,经历了谷歌内部容器集群长时间使用的考验。Kubernetes有着Brog的优点,又秉承着开源精神,面世之初就收到了极大的关注和欢迎。

剩余内容已隐藏,请支付后下载全文,论文总字数:27598字

您需要先支付 80元 才能查看全部内容!立即支付

该课题毕业论文、开题报告、外文翻译、程序设计、图纸设计等资料可联系客服协助查找;