Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 443
kalise Avatar asked Dec 09 '25 03:12

kalise


1 Answers

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

like image 83
rrh Avatar answered Dec 11 '25 15:12

rrh