kubernetes Ingress Nginx可以自动缩放吗? [英] Can kubernetes Ingress Nginx be autoscaled?
问题描述
当Ingress Nginx控制器达到其最大容量时,它会自动缩放吗? Kubernetes Ingress甚至可以扩展吗?
When the Ingress Nginx controller reach its full capacity does it auto scale? Is Kubernetes Ingress even scalable?
推荐答案
原则上,NGINX入口控制器确实具有可伸缩性-它从Kubernetes API服务器中提取了整个配置,并且其本身基本上是无状态的.
In principle, the NGINX ingress controller is indeed scalable -- it pulls its entire configuration from the Kubernetes API server and is in itself basically stateless.
在实践中,这很大程度上取决于您的入口控制器的设置方式.首先,入口控制器本身不会自动缩放.如果您已使用Deployment
控制器进行了部署,则可以使用文档中所述的水平吊舱自动缩放比例.如果您使用DaemonSet
进行了部署,则入口控制器将根据您的集群自动进行伸缩(如果您使用的是
In practice, this depends very much on how your ingress controller is set up. First of all, the ingress controller will not auto-scale by itself. If you have deployed it using a Deployment
controller, you can use horizontal pod autoscaling as described in the documentation. If you have deployed it using a DaemonSet
, the ingress controller will automatically scale up and down with your cluster (maybe even automatically, if you're using the cluster autoscaler).
在两种情况下,您都需要一个Service
定义(可能为NodePort
或LoadBalancer
类型,以允许外部流量),该定义与由部署/守护程序创建的用于分配流量的所有Pod匹配其中.
In both scenarios, you're going to need a Service
definition (possibly of type NodePort
or LoadBalancer
, to allow for external traffic) that matches all pods created by the deployment/daemon set to distribute traffic among them.
这篇关于kubernetes Ingress Nginx可以自动缩放吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!