【发布时间】:2020-10-06 06:33:10
【问题描述】:
我正在尝试将 HPA 与外部指标一起使用以将部署缩减到 0。我正在使用版本为 1.16.9-gke.2 的 GKE。
根据this,我认为它会起作用,但事实并非如此。我还在面对:The HorizontalPodAutoscaler "classifier" is invalid: spec.minReplicas: Invalid value: 0: must be greater than or equal to 1
以下是我的 HPA 定义:
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: classifier
spec:
minReplicas: 0
maxReplicas: 15
metrics:
- external:
metricName: loadbalancing.googleapis.com|https|request_count
targetAverageValue: "1"
type: External
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: classifier
非常感谢您的帮助!
【问题讨论】:
标签: kubernetes google-kubernetes-engine autoscaling kubernetes-deployment hpa