How to detect the active Controller Manager and Scheduler in a Kubernetes HA Master setup? How to detect the active Controller Manager and Scheduler in a Kubernetes HA Master setup? kubernetes kubernetes

How to detect the active Controller Manager and Scheduler in a Kubernetes HA Master setup?


In my case, retrieving the endpoints yaml and looking in the "holderIdentity" field of the "...kubernetes.io/leader" annotation.


I use below commands to find out the leader

kubectl proxy --port=8000curl 127.0.0.1:8000/api/v1/namespaces/kube-system/endpoints/kube-controller-manager | grep leadercurl 127.0.0.1:8000/api/v1/namespaces/kube-system/endpoints/kube-scheduler | grep leader