简体   繁体   English

Nginx-ingress舵图的“自动缩放”设置是否起作用?

[英]Is the 'autoscaling' setting for the nginx-ingress helm chart working?

I tried to deploy a nginx-ingress using the autoscaling setting inside the values.yaml file, but it seems that it does not work. 我试图使用values.yaml文件中的autoscaling设置来部署nginx-ingress,但似乎无法正常工作。

  autoscaling:
    enabled: false
  #  minReplicas: 1
  #  maxReplicas: 11
  #  targetCPUUtilizationPercentage: 50

I try to deploy a nginx-ingress like this 我试图像这样部署一个nginx入口

helm upgrade --install ingress --set \
controller.service.type=NodePort,\
controller.service.nodePorts.http=$http_nodePort,\
controller.service.nodePorts.https=$https_nodePort,\
rbac.create=true,\
controller.replicaCount=$ingress_replicas,\
controller.stats.enabled=true,\
controller.metrics.enabled=true,\
controller.autoscaling.enabled=true,\
controller.autoscaling.minReplicas=1,\
controller.autoscaling.maxReplicas=10,\
controller.autoscaling.targetCPUUtilizationPercentage=50 \
stable/nginx-ingress

but I get this error 但是我得到这个错误

Release "ingress" does not exist. Installing it now.
Error: release ingress failed: HorizontalPodAutoscaler.autoscaling "ingress-nginx-ingress-controller" is invalid: spec.metrics[1].resource.targetAverageUtilization: Required value: must set either a target raw value or a target utilization

Does anyone has managed to use the autoscaling setting, or you just deploy manually an HPA? 是否有人设法使用自动缩放设置,或者您只是手动部署HPA?

EDIT 1 I tried the same helm upgrade ... command with a local copy of the ingress chart which is the following [a bit old]: 编辑1我尝试了同一个helm upgrade ...命令,其中包含以下[有点旧]的入口图表的本地副本:

name: nginx-ingress
version: 0.11.1
appVersion: 0.11.0

and it creates the HPA fine! 它会造成HPA罚款! However, I would prefer to deploy it using the stable chart repo. 但是,我宁愿使用稳定的图表仓库来部署它。

The current chart version is this . 当前的图表版本是this

It looks like configuration is inconsistent or helm is not providing every parameter to nginx-ingress installation in the horizontal-autoscale environment. 看起来配置不一致或在水平自动缩放环境中helm没有为nginx-ingress安装提供每个参数。

I've looked at templates/controller-hpa.yaml of nginx-ingress chart, and I think missed variable is: 我查看了nginx-ingress图表的template / controller-hpa.yaml,我认为错过的变量是:

controller.autoscaling.targetMemoryUtilizationPercentage=<value>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM