【问题标题】:How to do auto scaling for Rancher and Kubernetes clusters on AWS EC2?如何在 AWS EC2 上为 Rancher 和 Kubernetes 集群做 Auto Scaling?
【发布时间】:2018-05-10 09:10:27
【问题描述】:

使用 AWS EC2 安装 Rancher 集群。然后从 Rancher 服务器设置 Kubernetes 集群。

关于自动缩放,有一些方法可以做到:

使用 Rancher 牛 webhook 服务

https://rancher.com/docs/rancher/v1.6/en/cattle/webhook-service/

这种方式应该使用监控工具 Prometheus 来监控 CPU 使用率,然后根据警报添加或删除节点。

使用terraform动态生成rancher-master-ha、rancher-nodes、networking、database

http://rancher.com/aws-rancher-building-resilient-stack/

Rancher 集群可以很好地做到这一点。

水平 Pod 自动缩放演练

https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/

这是官方的水平 pod 自动缩放方式。

Kubernetes 自动扩缩器

https://github.com/kubernetes/autoscaler

这也是 Kubernetes 集群官方的自动伸缩方式。

使用 AWS Auto Scaling

https://aws.amazon.com/autoscaling/

关于这种方式,如何连接到运行在EC2上的Rancher集群和Kubernetes集群?


自动缩放有很多方法,但哪种方法最好?而且非常重要的是,如何将 AWS Auto Scaling 用于此架构?

【问题讨论】:

    标签: amazon-web-services kubernetes cluster-computing autoscaling rancher


    【解决方案1】:

    由于您使用 Rancher 部署了 Kubernetes,因此您应该使用 Rancher webhook 进行此操作。 当 CPU 使用率超过一定百分比时,使用 Prometheus/Grafana 设置 webhook。

    【讨论】:

    • 我认为这也是最好的解决方案。但是 Rancher Cattle 环境有webhook 服务,Kubernetes 环境也能正常工作吗?
    猜你喜欢
    • 2019-06-21
    • 2019-08-06
    • 1970-01-01
    • 2016-02-12
    • 2018-04-17
    • 2015-11-17
    • 2020-08-01
    • 2011-11-24
    • 2017-07-24
    相关资源
    最近更新 更多