简体   繁体   English

kube系统/入口控制器盒的多个副本?

[英]Multiple replicas of kube-system/ingress controller pods?

We have a relatively standard Kubernetes cluster which is hosted in the cloud behind a load balancer. 我们有一个相对标准的Kubernetes集群,它托管在负载均衡器后面的云中。 We have found that most of the system pods only run as a single instance, the really concerning thing is that by default our nginx ingress controller will also run as a single instance. 我们发现大多数系统pod只作为单个实例运行,真正关心的是默认情况下我们的nginx入口控制器也将作为单个实例运行。 This means that in the event of a node failure there is a 1/n chance of every single application going down until the liveness probe kicks in and moves the ingress controller pod. 这意味着在节点发生故障的情况下,每个应用程序都有1 / n的机会下降,直到活动探测器启动并移动入口控制器盒。

We have had to increase the number of replicas of our ingress controller because it is a single point of failure. 我们不得不增加入口控制器的副本数量,因为它是单点故障。 However, I'm not particularly happy about how that makes our network diagram look and I'd imagine that this would cause issues if any of our applications were stateful. 但是,我对如何使我们的网络图看起来并不特别高兴,并且我认为如果我们的任何应用程序都是有状态的,这将导致问题。

Some pods (like heapster) you can probably only have a single instance of but I was wondering if anyone had any guidelines on what can and can't be scaled up and why this is the default behavior? 有些pod(比如heapster)你可能只有一个实例,但是我想知道是否有人有关于什么可以放大和不放大的指导以及为什么这是默认行为?

Thanks, 谢谢,

Joe

I don't see any issues with scaling your ingress controllers, you just have more replicas and are served by your external IPs or load balancer. 我没有看到扩展入口控制器的任何问题,你只有更多的副本,并由外部IP或负载均衡器提供服务。 In the event one of them goes down your load balancer will stop forwarding requests to the ingress that is down. 如果其中一个发生故障,您的负载均衡器将停止将请求转发到已关闭的入口。

As far as the backend you can have one or more replicas too, it really depends on what kind of redundancy you want to have and also the type of service. 对于后端,您也可以拥有一个或多个副本,这实际上取决于您希望拥有的冗余类型以及服务类型。 Having said that, I really don't recommend an ingress for stateful apps. 话虽如此,我真的不推荐有状态应用程序的入口。 An ingress is at a layer 7 (HTTP(s)), you'd better off connecting directly using TCP in your cluster. 入口位于第7层(HTTP(s)),您最好使用群集中的TCP直接连接。 For example, connecting to a MySQL or PostgreSQL instance. 例如,连接到MySQL或PostgreSQL实例。 I suppose ElasticSearch is one of those exceptions where you would add data through HTTP(s), but I'd be careful of posting large amounts of data through an Ingress. 我认为ElasticSearch是您通过HTTP添加数据的例外之一,但我会小心通过Ingress发布大量数据。

The nginx ingress controller is actually a Deployment . nginx入口控制器实际上是一个Deployment See here . 看到这里

Your namespace and deployment name may vary, but try this: 您的命名空间和部署名称可能会有所不同,但请尝试以

kubectl scale deployment --namespace nginx-ingress nginx-ingress-controller --replicas=3

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

相关问题 kube-system(kube-controller 和 kube-flannels)pod 使用了太多资源 - kube-system (kube-controller and kube-flannels) pods are using too much resources Rancher:kube-system pod 卡在 ContainerCreating 上 - Rancher: kube-system pods stuck on ContainerCreating kube-system 命名空间中的 pod 是如何管理的? - How are pods in kube-system namespace managed? K3S 多个 Kube-System pod 未以未知状态运行,包括 DNS 个 pod - K3S multiple Kube-System pods not running with Unknown Status, including DNS pods 获取除 kube-system 中的 pod 之外的所有 pod - Get all pods except the pods inside kube-system 防止 kube-system pods 在特定节点上运行 - Prevent kube-system pods from running on a specific node docker-for-mac&kubernetes在命名空间kube-system中没有pods - docker-for-mac & kubernetes no pods in namespace kube-system Kubernetes-什么是kube系统吊舱,删除它们是否安全? - Kubernetes - What are kube-system pods and is it safe to delete them? Kubernetes Logs - 如何获取kube-system pod的日志 - Kubernetes Logs - How to get logs for kube-system pods 为什么某些kube-system Pod(例如kube-proxy)与它们所在的节点具有相同的Pod IP? - Why do certain kube-system Pods such as kube-proxy have the same Pod IP as the node that they are on?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM