计算机与现代化

• 软件工程 • 上一篇    下一篇

基于Kubernetes的水平弹性扩缩容系统

  

  1. (1.河南大学计算机与信息工程学院,河南开封475001;2.中兴通讯股份有限公司,江苏南京210012)
  • 收稿日期:2019-01-10 出版日期:2019-07-05 发布日期:2019-07-08
  • 作者简介:屠雪真(1998-),女,河南开封人,本科生,CCF会员,研究方向:分布式计算存储,E-mail: tuxuezhen@qq.com; 杨海潮(1978-),男,河南新乡人,高级工程师,研究方向:云计算与微服务,E-mail: yang.haichao@zte.com.cn。
  • 基金资助:
    深圳市科技创新委员会科技应用示范项目(sf20170036)

A Horizontal Elastic Expansion and Contraction System Based on Kubernetes

  1. (1. School of Computer and Information Engineering, Henan University, Kaifeng 475001, China;
    2. ZTE Corporation, Nanjing 210012, China)
  • Received:2019-01-10 Online:2019-07-05 Published:2019-07-08

摘要: Kubernetes的诞生,降低了应用开发者对基础架构和运维团队的依赖,为其提供了强大的工具来编排和调度容器及虚拟机,已经成为分布式集群系统开发及管理的事实标准。Kubernetes通过核心组件HPA(Horizontal Pod Autoscaler)监测集群中CPU和内存的使用情况,并依据这些指标来对微服务集群进行扩容和缩容。但是这些简单的度量指标不能满足实际应用的扩缩容诉求,虽然在社区的最新版本中已经做出了改进,实际效果依然差强人意。本文在原生平台的基础上,设计一种叠加的弹性扩缩容系统E-HPA,可以通过灵活简易的配置方式提供丰富的用户可定制的度量指标,弥补Kubernetes在水平弹性扩缩容方面的缺陷和不足;阐述该系统的设计思想和具体实现细节,并以电信业务应用为例,验证其实验效果。

关键词: Kubernetes, 基础架构, 运维, 容器, 分布式集群, 弹性扩缩容

Abstract: The birth of Kubernetes has reduced application developers’ reliance on infrastructure and operations teams, it provides powerful tools for orchestrating and scheduling containers and virtual machines, which has become the de facto standard for the development and management of distributed cluster systems. Kubernetes monitors CPU and memory usage in the cluster through the core component HPA (horizontal pod autoscaler), and scales and shrinks the microservice cluster based on these metrics. However, these simple metrics can not meet the expansion and contraction requirements of the actual application. Although the improvements have been made in the latest version of the community, the actual results are still unsatisfactory. Based on the original platform, this paper designs a superimposed elastic expansion and contraction system E-HPA to make up for the defects and shortcomings of Kubernetes in horizontal elastic expansion and contraction, which can provide rich user-customizable metrics through flexible and simple configuration. The design ideas and specific implementation details of the system are expounded, and the experimental results are verified by taking the telecom business application as an example.

Key words: Kubernetes, infrastructure, operation, container, distributed cluster, elastic expansion and contraction

中图分类号: