Kubernetes 水平吊舱自动缩放器未按比例缩小

Kubernetes 水平吊舱自动缩放器未按比例缩小,kubernetes,google-kubernetes-engine,kubernetes-pod,horizontal-pod-autoscaling,horizontalpodautoscaler,Kubernetes,Google Kubernetes Engine,Kubernetes Pod,Horizontal Pod Autoscaling,Horizontalpodautoscaler,我的HPA是这样的。POD的可扩展性很好,但没有缩小,CPU利用率仅为5%。它没有缩小到至少1个副本 以下是我的HPA apiVersion: autoscaling/v2beta2 kind: HorizontalPodAutoscaler metadata: name: app spec: scaleTargetRef: apiVersion: apps/v1 kind: Deployment name: app minReplicas: 1 maxR

我的HPA是这样的。POD的可扩展性很好,但没有缩小,CPU利用率仅为5%。它没有缩小到至少1个副本

以下是我的HPA

apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
  name: app
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: app
  minReplicas: 1
  maxReplicas: 10
  metrics:
  - type: Resource
    resource:
      name: cpu
      target:
        type: Utilization
        averageUtilization: 70
  - type: Resource
    resource:
      name: memory
      target:
        type: AverageValue
        averageValue: 100Mi

在上面的yaml文件中,我使用了两个资源,如下所示

metrics:
  - type: Resource
    resource:
      name: cpu
      target:
        type: Utilization
        averageUtilization: 70
  - type: Resource
    resource:
      name: memory
      target:
        type: AverageValue
        averageValue: 100Mi

应用程序没有很快释放内存资源,一旦我删除了内存资源,当利用率较低时,吊舱就会缩小。

您的吊舱的内存利用率是否低于90英里?此外,在扩展过程中也有一些延迟。内存-20569080M/100Mi,已经15分钟没有加载了,所以每个Pod大约有200Mi的内存。这就是为什么它没有按比例缩小。我注意到,如果指定多个度量,任何度量的最大副本数都会决定比例值。许多应用程序也不会如此快速地释放内存。在按内存使用进行缩放之前,我会检查您的