Yesterday i was able to successfully set up the cluster using kubeadm in my vm today morning when i started my vm and tried executing
$ k get pods
E0407 14:44:21.791396 7214 memcache.go:265] couldn’t get current server API group list: Get “https://192.168.153.129:6443/api?timeout=32s”: dial tcp 192.168.153.129:6443: connect: no route to host
Cluster information:
Trying to set up a kubeadm cluster in my ubuntu VM.
CRI: containerd
Kubernetes version: 1.29
Cloud being used: bare-metal
Installation method:
Host OS: Linux/Ubuntu
CNI and version:
CRI and version:
please help me in setting up this cluster
I would recommend, first of all, using the tutorial from the CKA repo. Using bare-metal servers should not be much different than the virtualbox version of the tutorial. In particular, you’ll need to use the instructions for the node setup, which has some networking material which seems to be an issue for you here.
Tips:
try to check the kubeconfig by
kubectl config view
Does it show correct endpoint or not?
If yes then
disable selinux and firewall on the server
if not then
configure your kubeconfig or redo the bootstrap
follow the documentation for cleaning up the installation and then redo.
as the API service is showing timeout, my guess would be the firewall issue or the IP you registered as endpoint while bootstrapping is changed. Also check your VM interface.
Happy learning!