Ignite ReadinessProbe

本秂侑毒 提交于 2021-02-04 05:11:07

问题


Deploying an ignite cluster within Kubernetes, I cam across an issue that prevents cluster members from joining the group. If I use a readinessProbe and a livenessProbe, even with a delay as low as 10 seconds, they nodes never join each other. If I remove those probes, they find each other just fine.

So, my question is: can you use these probes to monitor node health, and if so, what are appropriate settings. On top of that, what would be good, fast health checks for Ignite, anyway?


回答1:


Update:

After posting on the ignite mailing list, it looks like StatefulSets are the way to go. (Thanks Dmitry!)

I think I'm going to leave in the below logic to self-heal any segmentation issues although hopefully it won't be triggered often.

Original answer:

We are having the same issue and I think we have a workable solution. The Kubernetes discovery spi lists services as they become ready.

This means that if there are no ready pods at startup time, ignite instances all think that they are the first and create their own grid.

The cluster should be able to self heal if we have a deterministic way to fail pods if they aren't part of an 'authoritative' grid.

In order to do this, we keep a reference to the TcpDiscoveryKubernetesIpFinder and use it to periodically check the list of ignite pods.

If the instance is part of a cluster that doesn't contain the alphabetical first ip in the list, we know we have a segmented topology. Killing the pods that get into that state should cause them to come up again, look at service list and join the correct topology.




回答2:


I am facing the same issue, using Ignite embedded within a Java spring application.

As you said the readinessProbe: on the Kubernetes Deployment spec.template.spec.container has the side effect to prevent the Kubernetes Pods from being listed on the related Kubernetes Service as Endpoints

Trying without any readinessProbe, it seems to indeed works better (Ignite nodes are all joinging the same Ignite cluster)

Yet this have the undesired side effect of exposing the Kubernetes Pods when not yet ready, as Spring has not yet fully started ...



来源:https://stackoverflow.com/questions/45176143/ignite-readinessprobe

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