高可用集群中查找kube-scheduler的leader节点

高可用集群中查找kube-scheduler的leader节点
kubectl get ep kube-scheduler -oyaml

apiVersion: v1
kind: Endpoints
metadata:
  annotations:
    control-plane.alpha.kubernetes.io/leader: '{"holderIdentity":"my-scheduler-c748fb949-gw6xj_8ec03272-372e-11ec-ac3e-d25c86a77abb","leaseDurationSeconds":15,"acquireTime":"2021-10-27T14:03:05Z","renewTime":"2021-11-02T03:26:41Z","leaderTransitions":9}'
  creationTimestamp: 2020-12-13T07:46:46Z

当前scheduler的leader为my-scheduler-c748fb949-gw6xj这个pod

[gx@xxxxx ~]$ ./kuctl config/config.test-cluster  -n kube-system get po my-scheduler-c748fb949-gw6xj
NAME                           READY   STATUS    RESTARTS   AGE
my-scheduler-c748fb949-gw6xj   1/1     Running   0          5d13h

你可能感兴趣的:(golang,kubernetes,kubernetes)