自动缩放在Azure Kubernetes Service(AKS)中不起作用

问题描述 投票:0回答:1

我搜索了许多博客,文档和tuto,但无法解决此问题。

在deployment.yml中

  resources:
    requests:
       memory: 64Mi
       cpu: 128m
    limits:
       memory: 128Mi
       cpu: 256m

对于autoscaling.yml文件:

 apiVersion: autoscaling/v1
 kind: HorizontalPodAutoscaler
 metadata:
    name: dotnetapi
    namespace: default
 spec:
   scaleTargetRef:
      apiVersion: apps/v1beta1
      kind: Deployment
      name: dotnetapi
   minReplicas: 1
   maxReplicas: 7
   targetCPUUtilizationPercentage: 50

enter image description here

enter image description here

azure deployment kubernetes autoscaling pod
1个回答
0
投票

即使我在AKS上遇到HPA的相同问题?你能解决吗?如果可以,请您帮我解决。以下是我得到的错误。.

“ FailedGetResourceMetric,HPA无法计算副本数:缺少对cpu的请求。”

© www.soinside.com 2019 - 2024. All rights reserved.