Scheduler Leader Election Test
Kubernetes scheduler leader election ensures high availability in a multi-scheduler setup. Only one scheduler instance acts as the leader, responsible for assigning pods to nodes, while others remain in standby. This is achieved using Kubernetes' leader election mechanism, where the leader acquires a lock (via ConfigMaps or Endpoints) in the API server. If the leader fails, a new leader is automatically elected from the standby schedulers, ensuring seamless scheduling without downtime or conflicts.
Monitoring the scheduler's leader election ensures high availability and seamless failover in Kubernetes. Detecting election delays, frequent leadership changes, or failures helps prevent disruptions in pod scheduling, ensuring the cluster remains stable and workloads are managed effectively.
This test monitors the scheduler leader election and reveals the leader details. Administrators can analyze the metric over time to get valuable insights into current state and potential issues which can cause connectivity to fail.
Target of the test : A Kubernetes Master Node
Agent deploying the test : A remote agent
Outputs of the test : One set of results for target Kubernetes Master node being monitored.
Parameter |
Description |
---|---|
Test Period |
How often should the test be executed. |
Host |
The IP address of the host for which this test is to be configured. |
Port |
Specify the port at which the specified Host listens. By default, this is 6443. |
Timeout |
Specify the duration (in seconds) beyond which the test will timeout in the Timeout text box. The default value is 10 seconds. |
Metric URL |
Each of the Kubernetes system components expose monitoring metrics through /metrics endpoint of the HTTP server. For components that don't expose endpoint by default, refer official Kubernetes distribution documentation site. Specify the metric URL textbox. |
Measurement |
Description |
Measurement Unit |
Interpretation |
||||||
---|---|---|---|---|---|---|---|---|---|
Is Leader |
Indicates if the current master node is the leader. |
|
The values that this measure reports and their corresponding numeric values are detailed in the table below:
Note: By default, this test reports the Measure Values listed in the table above to if current etcd node ins a . In the graph of this measure however, the state is indicated using the numeric equivalents only. |