gke nginx lb health checks / can't get all instances in a “healthy” state

扶醉桌前 提交于 2019-12-08 01:02:08

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/47955064/gke-nginx-lb-health-checks-cant-get-all-instances-in-a-healthy-state

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!