[英]Using Helm chart nginx-ingress with custom nginx template
[英]Is the 'autoscaling' setting for the nginx-ingress helm chart working?
我试图使用values.yaml
文件中的autoscaling
设置来部署nginx-ingress,但似乎无法正常工作。
autoscaling:
enabled: false
# minReplicas: 1
# maxReplicas: 11
# targetCPUUtilizationPercentage: 50
我试图像这样部署一个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
但是我得到这个错误
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
是否有人设法使用自动缩放设置,或者您只是手动部署HPA?
编辑1我尝试了同一个helm upgrade ...
命令,其中包含以下[有点旧]的入口图表的本地副本:
name: nginx-ingress
version: 0.11.1
appVersion: 0.11.0
它会造成HPA罚款! 但是,我宁愿使用稳定的图表仓库来部署它。
当前的图表版本是this 。
看起来配置不一致或在水平自动缩放环境中helm没有为nginx-ingress安装提供每个参数。
我查看了nginx-ingress图表的template / controller-hpa.yaml,我认为错过的变量是:
controller.autoscaling.targetMemoryUtilizationPercentage=<value>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.