【问题标题】:YAML File to Achieve HPA and Autoscaler用于实现 HPA 和 Autoscaler 的 YAML 文件
【发布时间】:2019-11-11 12:16:55
【问题描述】:

Horizo​​ntal Pod Autoscaler 和 Cluster Autoscaler 的 YAML 文件

我有集群 ss1,它分为 2 个代理池:Pool1 和 Pool2,需要 HPA 为 Pool2-Worker POD 运行,它在 Pool2 上运行,集群自动缩放器在 pool2 上运行,需要通过 YAML 文件实现,无论如何要在单个 YAML 文件中同时执行 HPA 和 Cluster Autoscaler,任何帮助文件来实现这一点

【问题讨论】:

    标签: kubernetes yaml


    【解决方案1】:
    apiVersion: autoscaling/v1
    kind: HorizontalPodAutoscaler
    metadata:
      name: test-app
      namespace: default
    spec:
      scaleTargetRef:
        apiVersion: apps/v1
        kind: Deployment
        name: test-app
      minReplicas: 3
      maxReplicas: 10
      targetCPUUtilizationPercentage: 50
    

    有关更多信息,您还可以访问官方 Kubernetes 文档。

    【讨论】:

    • 以上是指HPA,那么如何实现Autoscaler
    • 如何启动集群自动扩缩器取决于 Kubernetes 集群的运行位置。您能否提供运行集群的环境?
    猜你喜欢
    • 1970-01-01
    • 2018-09-24
    • 1970-01-01
    • 2019-08-22
    • 1970-01-01
    • 1970-01-01
    • 2020-01-18
    • 1970-01-01
    • 2019-06-08
    相关资源
    最近更新 更多