Kubernetes-client: Do we have a plan to support LeaderElection?

Created on 14 Jan 2020  路  7Comments  路  Source: fabric8io/kubernetes-client

Just like the official kubernetes client[1], does fabric8io kubernetes-client could support leader election? It is a very useful feature.

[1]. https://github.com/kubernetes-client/java/blob/master/examples/src/main/java/io/kubernetes/client/examples/LeaderElectionExample.java

feature

Most helpful comment

@wangyang0918 : Thanks for your feedback. I think it makes sense for us to support it.

All 7 comments

@wangyang0918 : Thanks for pointing this out. I think we can consider supporting this feature. I'm not familiar with this. Could you please elaborate what use cases it is designed to solve?

@rohanKanojia Thanks for your quick response.
I am from Flink community and focused on running Flink on kubernetes recently. I choose fabric8io/kubernetes-client sdk, because it used more widely than the official client. Unfortunately, it does not support leader election. In Flink, also other big data framework, we have internal high availability implementation. Multiple masters will participate in the election and the leader publish the address information to config map. All the workers retrieve the master information and connect to the master.

So if the kubernetes-client could provide the ability of leader election, it will be very useful for us.

@wangyang0918 : Thanks for your feedback. I think it makes sense for us to support it.

@rohanKanojia Glad to hear that. It is my pleasure to help with the new feature test once you have an implementation.

... It is my pleasure to help with the new feature test once you have an implementation.

@wangyang0918 we've just open a PR with an implementation #1955

Kubernetes Client 4.8.0 containing a LeaderElection implementation was released 3 days ago.

I'm closing this issue as the initial request is fulfilled.

If there is any problem or some feature missing from our implementation (e.g. an additional lock implementation), please open a new issue.

Was this page helpful?
0 / 5 - 0 ratings