作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2021, Vol. 47 ›› Issue (1): 312-320. doi: 10.19678/j.issn.1000-3428.0056560

• 开发研究与工程应用 • 上一篇    

基于Kubernetes云平台的弹性伸缩方案设计与实现

单朋荣1, 杨美红1, 赵志刚1, 李志鹏2, 杨丽娜1   

  1. 1. 齐鲁工业大学(山东省科学院) 山东省计算中心(国家超级计算济南中心) 山东省计算机网络重点实验室, 济南 250000;
    2. 同济大学 电子信息工程学院, 上海 201804
  • 收稿日期:2019-11-11 修回日期:2020-01-07 发布日期:2020-01-10
  • 作者简介:单朋荣(1995-),男,硕士研究生,主研方向为云计算、软件工程;杨美红,研究员;赵志刚,副研究员;李志鹏,博士研究生;杨丽娜,硕士研究生。
  • 基金资助:
    国家重点研发计划(2018YFB0203903)。

Design and Implementation of Elastic Scaling Scheme Based on Kubernetes Cloud Platform

SHAN Pengrong1, YANG Meihong1, ZHAO Zhigang1, LI Zhipeng2, YANG Lina1   

  1. 1. Shandong Provincial Key Laboratory of Computer Networks, Shandong Computer Science Center(National Supercomputer Center in Jinan), Qilu University of Technology(Shandong Academy of Sciences), Jinan 250000, China;
    2. School of Electronic Information Engineering, Tongji University, Shanghai 201804, China
  • Received:2019-11-11 Revised:2020-01-07 Published:2020-01-10

摘要: 容器技术可为多个业务需求及其依赖组件提供独立的应用资源,在现实生产环境中由于容器中的业务需求不断变化,使得与其对应的应用资源在线负载处于动态变化中,面临固定资源容量规划不能满足在线负载变化的困境。为解决该问题,设计一种基于Kubernetes云平台的弹性伸缩方案。该方案通过集成Prometheus监控系统来自定义指标与采集业务指标,并结合HPA、VPA等组件,实现包括自定义指标和不同维度伸缩方法相结合的最佳弹性伸缩方法。通过集成Grafana页面显示和报警等组件,实现实时查看弹性伸缩状态变化以及伸缩预警功能,以实时观测集群健康状态,使得集群操作更加友好、便于维护。实验结果表明,在不同压力测量测试下,该弹性伸缩方案具有随负载增加扩大集群规模的作用,能够增强应用集群的高可用能力。

关键词: 云平台, Kubernetes技术, 弹性伸缩, Prometheus系统, HPA组件

Abstract: Container technology can provide independent application resources for multiple service requirements and their dependent components.In the real production scenarios,the online loads of application resources are always in change along with the continuously changing service requirements in the container,so the fixed resource capacity planning fail to meet the changing requirements of online loads.In order to solve the problem,this paper designs an elastic scaling scheme based on the Kubernetes cloud platform.This scheme integrates the Prometheus monitoring system to customize the indicators and collect service indicators,and combines Horizontal Pod Autoscaler(HPA),Vertical Pod Autoscaler(VPA) and other components to realize the optimal elastic scaling method that is capable of both customizing indicators and scaling in different dimensions.Furthermore,by integrating Grafana page display, alarm and other components,this scheme realizes the real-time view of elastic scaling state changes and early warning function for scaling,so as to observe the health state of the cluster in real time,making the cluster operations more friendly and easy to maintain.Experimental results show that under different pressure measurement and tests,the elastic scaling scheme is capable of increasing the cluster size along with the increase of loads,and can enhance the high availability of the application cluster.

Key words: cloud platform, Kubernetes technology, elastic scaling, Prometheus system, HPA components

中图分类号: