You can get it from endpoints resource. The endpoint should have an annotation pointing to the leader.
$ kubectl get endpoints kube-controller-manager --namespace=kube-system -o yaml apiVersion: v1 kind: Endpoints metadata: annotations: *control-plane.alpha.kubernetes.io/leader <http://control-plane.alpha.kubernetes.io/leader>*: '{"holderIdentity":" *kubernetes-master* ","leaseDurationSeconds":15,"acquireTime":"2017-02-14T14:05:57Z","renewTime":"2017-02-14T14:14:42Z","leaderTransitions":0}' ... Regards, Jerzy On Tue, Feb 14, 2017 at 2:27 PM, Qian Zhang <zhq527...@gmail.com> wrote: > Hi, > > I have a Kubernetes HA cluster which consists of 3 master nodes, each of > them has kube-apiserver, kube-scheduler and kube-controller-manager > running, and kube-scheduler and kube-controller-manager are started with > the option "--leader-elect", my question is, is there a way to tell the > current leader of kube-scheduler/kube-controller-manager? E.g., a > Kubernetes API to get such info? Or directly get it from etcd? > > > Thanks, > Qian Zhang > > -- > You received this message because you are subscribed to the Google Groups > "Kubernetes user discussion and Q&A" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to kubernetes-users+unsubscr...@googlegroups.com. > To post to this group, send email to kubernetes-users@googlegroups.com. > Visit this group at https://groups.google.com/group/kubernetes-users. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Kubernetes user discussion and Q&A" group. To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-users+unsubscr...@googlegroups.com. To post to this group, send email to kubernetes-users@googlegroups.com. Visit this group at https://groups.google.com/group/kubernetes-users. For more options, visit https://groups.google.com/d/optout.