<p>I want to check the election of basic components, but the information displayed is different in different versions of kubernetes binary installation methods.</p>
<p>Is the corresponding information cancelled in kubernetes v1.20 +? Or is there any other way to view the election of basic components?</p>
<p>The following kubernetes configuration parameters are consistent, except that the binary executable file is replaced</p>
<blockquote>
<p>Kubernetes v1.20.8 or Kubernetes v1.20.2</p>
</blockquote>
<pre><code>$ kubectl get endpoints -n kube-system
No resources found in kube-system namespace.
</code></pre>
<blockquote>
<p>Kubernetes v1.19.12</p>
</blockquote>
<pre><code>$ kubectl get endpoints -n kube-system
NAME                      ENDPOINTS   AGE
kube-controller-manager   &lt;none&gt;      9m12s
kube-scheduler            &lt;none&gt;      9m13s
</code></pre>

Xsky
<p>I found the cause of the problem</p>
<p>The difference between the two versions is the default value of <code>--leader-select resource-lock</code></p>
<blockquote>
<p>Kubernetes v1.20.8 or Kubernetes v1.20.2</p>
</blockquote>
<pre><code>--leader-elect-resource-lock string        The type of resource object that is used for locking during leader election. Supported options are 'endpoints', 'configmaps', 'leases', 'endpointsleases' and 'configmapsleases'. (default &quot;leases&quot;)
</code></pre>
<blockquote>
<p>Kubernetes v1.19.12</p>
</blockquote>
<pre><code>--leader-elect-resource-lock string        The type of resource object that is used for locking during leader election. Supported options are 'endpoints', 'configmaps', 'leases', 'endpointsleases' and 'configmapsleases'. (default &quot;endpointsleases&quot;)
</code></pre>
<p>When I don't set <code>--leader-select-resource-lock</code> string in <code>controller-manager</code> or <code>scheduler</code> in v1.20.8, the default value is leaders.</p>
<p>so I can use the following command to view the information of component leaders.</p>
<pre><code>$ kubectl get leases -n kube-system
NAME                      HOLDER                                                      AGE
kube-controller-manager   master01_dec12376-f89e-4721-92c5-a20267a483b8   45h
kube-scheduler            master02_c0c373aa-1642-474d-9dbd-ec41c4da089d   45h

</code></pre>
