Creating failed for a kubernetes cluster (newbie)

Hi all!
A few months ago I use minikube, but I wanted to get a little more of the kubernetes infrastructure, so I decided to install a multi node kubernetes cluster in virtualized environment at my home desktop computer.
Found a tutorial, and did what it writes, but didnt succeded. Found another tutorial, but the result is the same (copied the whole tutorial at the bottom):
After running “sudo kubeadm init” I got the next error message:

[kubelet-check] It seems like the kubelet isn’t running or healthy.
[kubelet-check] The HTTP call equal to ‘curl -sSL http://localhost:10248/healthz’ failed with error: Get “http://localhost:10248/healthz”: dial tcp connect: connection refused.

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’

I’ve checked, the kubelet isn’t running indeed, but I can’t guess why doesn’t start.
Could somebody help how to gues why the kubelet isn’t start?

Cluster information:

Kubernetes version:
$ sudo dpkg -l |grep kube
kubeadm 1.26.0-00 amd64 Kubernetes Cluster Bootstrapping Tool
kubectl 1.26.0-00 amd64 Kubernetes Command Line Tool
kubelet 1.26.0-00 amd64 Kubernetes Node Agent
kubernetes-cni 1.1.1-00 amd64 Kubernetes CNI

Cloud being used: Desktop KVM hypervisor (ubuntu 22.0.4) two ubuntu 22.0.4 guests one for master, one for worker
Installation method:
Host OS: Ubuntu 22.0.4
CNI and version: 1.1.1-00
CRI and version:

sudo apt update //on master and worker too
sudo apt install //on master and worker too

Start docker

sudo systemctl start docker //on master and worker too
sudo systemctl enable docker //on master and worker too

Install Kubernetes

sudo apt install apt-transport-https curl //on master and worker too
curl -s | sudo apt-key add //on master and worker too
sudo apt-add-repository “deb kubernetes-xenial main” //on master and worker too
sudo apt install kubeadm kubelet kubectl kubernetes-cni //on master and worker too

Disable swap memory

sudo swapoff -a //on master and worker too
sudo nano /etc/fstab //comment swap line on master and worker too

sudo hostnamectl set-hostname kubernetes-master //on master
sudo hostnamectl set-hostname kubernetes-worker //on worker

Initialize Kubernetes master server

sudo kubeadm init //on master only

Hi @kako,
Docker is removed in k8s version 1.24+. Please use containerd or other CRI.

Please have a look at this page.


Hi @tej-singh-rana!
Thanks for your answer!

I restarted my whole project.
Installed two other VMs for master and worker nodes, but now with containerd instead of docker.
(containerd: 1.4.13~ds1-1~deb11u3)

The result is exacly the same. containerd is running but kubelet doesn’t.
What I found in log is:
dec 20 18:10:14 kubernetes-master kubelet[3102]: E1220 18:10:14.176043 3102 run.go:74] “command failed” err=“failed to run Kubelet: validate service connection: CRI v1 runtime API is not implemented for endpoint "unix:///var/run/containerd/containerd.sock": rpc error: code = Unimplemented desc = unknown service runtime.v1.RuntimeService”
I’ve checked, the socket exists, and listens on a unix domain socket:
root@kubernetes-master:~# ls -la /var/run/containerd/containerd.sock
srw-rw---- 1 root root 0 dec 20 18.01 /var/run/containerd/containerd.sock
root@kubernetes-master:~# netstat -an |grep containerd
unix 2 [ ACC ] STREAM LISTENING 21052 /run/containerd/containerd.sock.ttrpc
unix 2 [ ACC ] STREAM LISTENING 21053 /run/containerd/containerd.sock

I’ve read the “container runtime” page many times. In this doc I found that containerd in packages maybe shipped with disabled CRI support, but not in my case. My /etc/containerd/config.toml file is:

version = 2

      bin_dir = "/usr/lib/cni"
      conf_dir = "/etc/cni/net.d"
    path = "/var/lib/containerd/opt"

here isn’t a disabled_plugins list, so it should be enabled the CRI

The /etc/cni/net.d is empty, but the /usr/lib/cni isn’t exist.

have you got any idea?

hi @kako
there is a bug in the 1.26.00 chain. you need to downgrade kubelet
apt install kubelet=1.25.5-00
and so it will install correctly.
Hope they’ll fix this soon.