This should definitely be added to the doc. 在 2017年2月15日星期三 UTC+8下午4:51:35,Qian Zhang写道: > > Thanks Jerzy! > > > Thanks, > Qian Zhang > > On Tue, Feb 14, 2017 at 10:18 PM, 'Jerzy Szczepkowski' via Kubernetes user > discussion and Q&A <kubernet...@googlegroups.com <javascript:>> wrote: > >> 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 <zhq5...@gmail.com >> <javascript:>> 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-use...@googlegroups.com <javascript:>. >>> To post to this group, send email to kubernet...@googlegroups.com >>> <javascript:>. >>> 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 a topic in the >> Google Groups "Kubernetes user discussion and Q&A" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/kubernetes-users/5Zf3WmXuOco/unsubscribe >> . >> To unsubscribe from this group and all its topics, send an email to >> kubernetes-use...@googlegroups.com <javascript:>. >> To post to this group, send email to kubernet...@googlegroups.com >> <javascript:>. >> 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.