Hi
Following is a good way of finding the leader, usually also the master node.
kubectl get endpoints kube-scheduler -n kube-system -o yaml
Following is a good way of finding the leader, usually also the master node.
kubectl get endpoints kube-scheduler -n kube-system -o yaml
Here is my example, taken from a k8s cluster i have created on AWS with 3 nodes, 1 master and 2 workers.
apiVersion: v1
kind: Endpoints
metadata:
annotations:
control-plane.alpha.kubernetes.io/leader: '{"holderIdentity":"ip-172-31-15-105_805a03a9-0065-11ea-9ec9-060d741267c8","leaseDurationSeconds":15,"acquireTime":"2019-11-06T07:18:04Z","renewTime":"2019-11-06T07:38:49Z","leaderTransitions":2}'
creationTimestamp: 2019-11-04T14:36:03Z
name: kube-scheduler
namespace: kube-system
resourceVersion: "70343"
selfLink: /api/v1/namespaces/kube-system/endpoints/kube-scheduler
uid: 6db973fb-ff10-11e9-ab52-060d741267c8
Regards,
Dor
No comments:
Post a Comment