I've set a kubernetes cluster with master in high availability: 3 etcd nodes, 3 apiservers, 3 controller managers and 3 schedulers. There is a load balancer in front of the api servers. I see apiservers running as Active-Active while Controller Manager and Scheduler are working as Active/Standby. Does anyone know how to detect the active Controller Manager and Scheduler in a HA Master setup?
All the K8s infra components are managed by systemd not by dockerd.
Thanks.
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=8000
curl 127.0.0.1:8000/api/v1/namespaces/kube-system/endpoints/kube-controller-manager | grep leader
curl 127.0.0.1:8000/api/v1/namespaces/kube-system/endpoints/kube-scheduler | grep leader