Skip to content

How to detect whether an etcd member is a learner? #18232

Answered by jmhbnz
kwohlfahrt asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @kwohlfahrt - Thanks for your question. For this use case you could wire up a health check based on etcdctl which can give some parseable json for the learner status, for example:

 ➜ ./etcdctl endpoint status -w json                                                                                                                                                                                                                                                
[{"Endpoint":"127.0.0.1:2379","Status":{"header":{"cluster_id":14841639068965178418,"member_id":10276657743932975437,"revision":1,"raft_term":2},"version":"3.6.0-alpha.0","dbSize":20480,"leader":10276657743932975437,"raftIndex":4,"raftTerm"

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@kwohlfahrt
Comment options

Answer selected by kwohlfahrt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment