Kubeadm init failing , kubelet not running

Am installing kubernetes cluster in RHEL 8. containerd is the run time environment. kubeadm init is failing with error kubelet not running

10:43:33 ######## kubelet[13883]: W0621 10:43:33.317252 13883 reflector.go:324] vendor/k8s.io/client-go/informers/factory.go:134: failed to list *v1.RuntimeClass: Get “https://######:6443/apis/node.k8s.io/v1/runtimeclasses?limit=500&resourceVersion=0”: dial tcp ########:6443: connect: connection refused
Jun 21 10:43:33 ######## kubelet[13883]: E0621 10:43:33.317309 13883 reflector.go:138] vendor/k8s.io/client-go/informers/factory.go:134: Failed to watch *v1.RuntimeClass: failed to list *v1.RuntimeClass: Get “https://########:6443/apis/node.k8s.io/v1/runtimeclasses?limit=500&resourceVersion=0”: dial tcp ########:6443: connect: connection refused
Jun 21 10:43:33 ######## kubelet[13883]: E0621 10:43:33.346628 13883 cgroup_manager_linux.go:473] cgroup manager.Set failed: open /sys/fs/cgroup/kubepods.slice/cpu.weight: no such file or directory
Jun 21 10:43:33 ######## kubelet[13883]: E0621 10:43:33.346691 13883 kubelet.go:1378] “Failed to start ContainerManager” err=“failed to initialize top level QOS containers: root container [kubepods] doesn’t exist”
Jun 21 10:43:33 ######## systemd[1]: kubelet.service: Main process exited, code=exited, status=1/FAILURE
Jun 21 10:43:33 ######## systemd[1]: kubelet.service: Failed with result ‘exit-code’.

Hi,

I found this guide online that you could try. I don’t have immediate access to a RHEL8 environment to try it myself however, meaning I’m not going to be able to debug it if it doesn’t work :wink:

I have installed crio as per the doc. But kubeadm init getting failed with error.

when checking the kubelet status it is giving the below error.

[root@########### ~]# systemctl status kubelet.service
● kubelet.service - kubelet: The Kubernetes Node Agent
Loaded: loaded (/usr/lib/systemd/system/kubelet.service; enabled; vendor preset: disabled)
Drop-In: /usr/lib/systemd/system/kubelet.service.d
└─10-kubeadm.conf
Active: active (running) since Tue 2022-07-26 15:30:24 +04; 18h ago
Docs: Kubernetes Documentation | Kubernetes
Main PID: 23891 (kubelet)
Tasks: 45 (limit: 405268)
Memory: 83.2M
CGroup: /system.slice/kubelet.service
└─23891 /usr/bin/kubelet --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.con>

Jul 27 10:26:16 ########### kubelet[23891]: E0727 10:26:16.401401 23891 kubelet.go:2424] “Error getting node” err="node "###########>
Jul 27 10:26:16 ########### kubelet[23891]: E0727 10:26:16.502261 23891 kubelet.go:2424] “Error getting node” err="node "###########>
Jul 27 10:26:16 ########### kubelet[23891]: E0727 10:26:16.603361 23891 kubelet.go:2424] “Error getting node” err="node "###########>
Jul 27 10:26:16 ########### kubelet[23891]: E0727 10:26:16.704287 23891 kubelet.go:2424] “Error getting node” err="node "###########>
Jul 27 10:26:16 ########### kubelet[23891]: E0727 10:26:16.805186 23891 kubelet.go:2424] “Error getting node” err="node "###########>
Jul 27 10:26:16 ########### kubelet[23891]: E0727 10:26:16.906035 23891 kubelet.go:2424] “Error getting node” err="node "###########>
Jul 27 10:26:17 ########### kubelet[23891]: E0727 10:26:17.006746 23891 kubelet.go:2424] “Error getting node” err="node "###########>
Jul 27 10:26:17 ########### kubelet[23891]: E0727 10:26:17.107286 23891 kubelet.go:2424] “Error getting node” err="node "###########>
Jul 27 10:26:17 ########### kubelet[23891]: E0727 10:26:17.207675 23891 kubelet.go:2424] “Error getting node” err="node "###########>
Jul 27 10:26:17 ########### kubelet[23891]: E0727 10:26:17.308501 23891 kubelet.go:2424] “Error getting node” err="node "###########>