无法将所有实例都置于

无法将所有实例都置于

本文介绍了gke nginx lb健康检查/无法将所有实例都置于“健康”状态。州的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用nginx -traffic:OnlyLocal 注释。这将对其进行配置,以便到达该服务的NodePort的流量永远不会在另一个节点上出现 Pod 。由于您的部署只有一个副本,所以将会收到流量的唯一节点是运行1个Pod的节点。



如果您将部署扩展为2个副本,则2个节点将保持健康状态等。使用该功能注释是推荐配置,因此您不会引入额外的网络跳数。


Using nginx nginx-ingress-controller:0.9.0, below is the permanent state of the google cloud load balancer :

Basically, the single healthy node is the one running the nginx-ingress-controller pods. Besides not looking good on this screen, everything works super fine. Thing is, Im' wondering why such bad notice appears on the lb

Here's the service/deployment used

Am just getting a little lost over how thing works; hope to get some experienced feedback on how to do thing right (I mean, getting green lights on all nodes), or to double check if that's a drawback of not using the 'official' gcloud l7 thing

解决方案

Your Service is using the service.beta.kubernetes.io/external-traffic: OnlyLocal annotation. This configures it so that traffic arriving at the NodePort for that service will never go a Pod on another node. Since your Deployment only has 1 replica, the only node that will receive traffic is the one where the 1 Pod is running.

If you scale your Deployment to 2 replicas, 2 nodes will be healthy, etc.

Using that annotation is a recommend configuration so that you are not introducing additional network hops.

这篇关于gke nginx lb健康检查/无法将所有实例都置于“健康”状态。州的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-07 08:33