Error while worker node joining K8s cluster

Hi All ,

I am following the steps as per 11-Install-Kubernetes-the-kubeadm-way

However getting the following error :
error execution phase preflight: couldn’t validate the identity of the API Server: Get “https://192.168.56.2:6443/api/v1/namespaces/kube-public/configmaps/cluster-info?timeout=10s”: dial tcp 192.168.56.2:6443: connect: protocol not available
To see the stack trace of this error execute with --v=5 or higher

Hi @asad.hasan2004
Unfortunately that’s a bit out of date. Running the apt-get for the kubernetes components without any version constraint will pull down v1.24, and the installation requirements have changed somewhat.

This is more likely to work as per the exact requirements in the solution posted

sudo apt-get install -y kubelet=1.13.0-00 kubeadm=1.13.0-00 kubectl=1.13.0-00

im sorry could you please ellaborate on this?
im using the latest version of kubernetes, after following a half an hour tutorial to set up the cluster just to get stuck in the last step, im annoyed , i hope you understand, can you help a brother out?
how can i make it work? its january 2024

What are you trying to build?

These are the most up to date versions.

1 Like

Im following this video that uses Vagrant.

but didnt work, i followed step by step religiously

You may need a slight change of “religion”. The tutorials @Alistair_KodeKloud recommends are more up-to-date, since there have been changes on the official K8s side that affect how kubeadm installs are done.