I was wondering if it's possible to see which component is the primary service(scheduler,controller-manager, etc.) in a multi-master deployment.

Is there any command to show that information?

Thanks in advance.


You can retrieve endpoints yaml and look in the holderIdentity field of the ...kubernetes.io/leader annotation.

Example from my cluster:

~$ kubectl -n kube-system get ep kube-scheduler -o yaml

apiVersion: v1
kind: Endpoints
    control-plane.alpha.kubernetes.io/leader: '{"holderIdentity":"cluster-0_9e8c557b-8dc4-11e9-90d3-42010a9c000a","leaseDurationSeconds":15,"acquireTime":"2019-06-13T10:19:10Z","renewTime":"2019-06-13T11:19:20Z","leaderTransitions":19}'
  creationTimestamp: "2019-03-26T13:04:45Z"
  name: kube-scheduler
  namespace: kube-system
  resourceVersion: "923505"
  selfLink: /api/v1/namespaces/kube-system/endpoints/kube-scheduler
  uid: ba115d1b-4fc7-11e9-b783-42010a9c000a
  • Thanks! Really useful! – gixnex Jun 18 at 22:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.