<p>env</p>
<pre><code>k8s v1.20
cri  containerd
system centos7.9 
</code></pre>
<p>shell</p>
<pre><code>kubeadm init --service-cidr=172.30.0.0/16  --pod-network-cidr=10.128.0.0/14 --cri-socket=/run/containerd/containerd.sock --image-repository=registry.aliyuncs.com
</code></pre>
<p>the error log</p>
<pre><code>[wait-control-plane] Waiting for the kubelet to boot up the control plane as static Pods from directory &quot;/etc/kubernetes/manifests&quot;. This can take up to 4m0s
[kubelet-check] Initial timeout of 40s passed.
error execution phase wait-control-plane: couldn't initialize a Kubernetes cluster
To see the stack trace of this error execute with --v=5 or higher
Unfortunately, an error has occurred:
    timed out waiting for the condition

This error is likely caused by:
    - The kubelet is not running
    - The kubelet is unhealthy due to a misconfiguration of the node in some way (required cgroups disabled)

If you are on a systemd-powered system, you can try to troubleshoot the error with the following commands:
    - 'systemctl status kubelet'
    - 'journalctl -xeu kubelet'

Additionally, a control plane component may have crashed or exited when started by the container runtime.
To troubleshoot, list all containers using your preferred container runtimes CLI.

Here is one example how you may list all Kubernetes containers running in cri-o/containerd using crictl:
    - 'crictl --runtime-endpoint /run/containerd/containerd.sock ps -a | grep kube | grep -v pause'
    Once you have found the failing container, you can inspect its logs with:
    - 'crictl --runtime-endpoint /run/containerd/containerd.sock logs CONTAINERID'
</code></pre>
<p><code>journalctl -xeu kubelet</code></p>
<pre><code>Mar 09 22:26:51 master1 kubelet[3179]: I0309 22:26:51.252245    3179 kubelet_node_status.go:71] Attempting to register node master1
Mar 09 22:26:51 master1 kubelet[3179]: E0309 22:26:51.252670    3179 kubelet_node_status.go:93] Unable to register node &quot;master1&quot; with API server: Post &quot;https://192.168.10.1:6443/api/v1/nodes&quot;: dial tcp 192.168

Mar 09 22:26:54 master1 kubelet[3179]: E0309 22:26:54.374695    3179 eviction_manager.go:260] eviction manager: failed to get summary stats: failed to get node info: nodes have not yet been read at least once,
Mar 09 22:26:54 master1 kubelet[3179]: E0309 22:26:54.394116    3179 kubelet.go:2184] Container runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:Network plugin returns error: c
Mar 09 22:26:55 master1 kubelet[3179]: I0309 22:26:55.230293    3179 kubelet.go:449] kubelet nodes not sync
Mar 09 22:26:55 master1 kubelet[3179]: E0309 22:26:55.247912    3179 kubelet.go:2264] nodes have not yet been read at least once, cannot construct node object
Mar 09 22:26:55 master1 kubelet[3179]: I0309 22:26:55.348020    3179 kubelet.go:449] kubelet nodes not sync
Mar 09 22:26:55 master1 kubelet[3179]: E0309 22:26:55.717348    3179 reflector.go:138] k8s.io/client-go/informers/factory.go:134: Failed to watch *v1.Node: failed to list *v1.Node: Get &quot;https://192.168.10.1:644
Mar 09 22:26:56 master1 kubelet[3179]: I0309 22:26:56.231699    3179 kubelet.go:449] kubelet nodes not sync
Mar 09 22:26:57 master1 kubelet[3179]: E0309 22:26:57.134170    3179 event.go:273] Unable to write event: '&amp;v1.Event{TypeMeta:v1.TypeMeta{Kind:&quot;&quot;, APIVersion:&quot;&quot;}, ObjectMeta:v1.ObjectMeta{Name:&quot;master1.166ab2b6
Mar 09 22:26:57 master1 kubelet[3179]: E0309 22:26:57.134249    3179 event.go:218] Unable to write event '&amp;v1.Event{TypeMeta:v1.TypeMeta{Kind:&quot;&quot;, APIVersion:&quot;&quot;}, ObjectMeta:v1.ObjectMeta{Name:&quot;master1.166ab2b6b
Mar 09 22:26:57 master1 kubelet[3179]: E0309 22:26:57.136426    3179 event.go:273] Unable to write event: '&amp;v1.Event{TypeMeta:v1.TypeMeta{Kind:&quot;&quot;, APIVersion:&quot;&quot;}, ObjectMeta:v1.ObjectMeta{Name:&quot;master1.166ab2b6
Mar 09 22:26:57 master1 kubelet[3179]: I0309 22:26:57.230722    3179 kubelet.go:449] kubelet nodes not sync
Mar 09 22:26:57 master1 kubelet[3179]: E0309 22:26:57.844788    3179 controller.go:144] failed to ensure lease exists, will retry in 7s, error: Get &quot;https://192.168.10.1:6443/apis/coordination.k8s.io/v1/namespa
</code></pre>

xlovepython
<p><code>Kubelet</code> wasn't healthy and I couldn't deal with it.</p>
<p>I've created a new virtual machine and used the same steps, it worked.</p>
<p>Additionally,</p>
<p>I found the answer, by changing the version of <code>containerd</code>:</p>
<ul>
<li>from <code>containerd</code>: <code>1.4.1</code>,</li>
<li>to <code>containerd</code>: <code>1.4.4</code></li>
</ul>
<p>It worked, only this old virtual machine had problems. I guess it could be a bug.</p>
