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 127.0.0.1:10248: 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 docker.io //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 https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add //on master and worker too
sudo apt-add-repository “deb http://apt.kubernetes.io/ 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