--
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+unsubscribe@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 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-users+unsubscribe@googlegroups.com.
{ "kind": "Endpoints", "apiVersion": "v1", "metadata": { "name": "kube-controller-manager", "namespace": "kube-system", "selfLink": "/api/v1/namespaces/kube-system/endpoints/kube-controller-manager", "uid": "89e09aae-5dc6-11e7-89c1-0050569b569d", "resourceVersion": "19152", "creationTimestamp": "2017-06-30T19:01:35Z", "annotations": { "control-plane.alpha.kubernetes.io/leader": "{\"holderIdentity\":\"master2\",\"leaseDurationSeconds\":15,\"acquireTime\":\"2017-06-30T19:01:35Z\",\"renewTime\":\"2017-06-30T19:18:01Z\",\"leaderTransitions\":0}" } }, "subsets": [] }
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: '{"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> 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.
To post to this group, send email to kubernet...@googlegroups.com.
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> 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: '{"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> 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.
To post to this group, send email to kubernet...@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 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.
To post to this group, send email to kubernet...@googlegroups.com.