1

I'm facing an issue with kubectl server version.

Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.4", GitCommit:"e87da0bd6e03ec3fea7933c4b5263d151aafd07c", GitTreeState:"clean", BuildDate:"2021-02-18T16:12:00Z", GoVersion:"go1.15.8", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.8", GitCommit:"9f2892aab98fe339f3bd70e3c470144299398ace", GitTreeState:"clean", BuildDate:"2020-08-13T16:04:18Z", GoVersion:"go1.13.15", Compiler:"gc", Platform:"linux/amd64"}

So, when I try to join a new node I get this:

root@osswrkprbe007:~# kubeadm join 192.168.14.149:6443 --token 2w06dl.jz1clwuvknkbabqp --discovery-token-ca-cert-hash sha256:00370f52b8b14ae094ae83cb8333b9c7a141df9de7b039aeb33399ef5547f36f [preflight] Running pre-flight checks [WARNING IsDockerSystemdCheck]: detected "cgroupfs" as the Docker cgroup driver. The recommended driver is "systemd". Please follow the guide at https://kubernetes.io/docs/setup/cri/ [preflight] Reading configuration from the cluster... [preflight] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -o yaml' error execution phase preflight: unable to fetch the kubeadm-config ConfigMap: this version of kubeadm only supports deploying clusters with the control plane version >= 1.19.0. Current version: v1.18.8 To see the stack trace of this error execute with --v=5 or higher

Thanks for your help

Emanuel Castelli
  • 53
  • 1
  • 1
  • 6

1 Answers1

0

Problem is not in the kubectl version, problem in kubeadm version.

  • Your kubectl is 1.20.4
  • Your cluster is 1.18.8
  • your kubeadm most probably 1.19 and it sais you "this version of kubeadm only supports deploying clusters with the control plane version >= 1.19.0."

So use lower and appropriate kubeadm version(e.g 1.18.8) - it will help.

Refer to this answer to check how to install specific version of Kubernetes.

Vit
  • 7,740
  • 15
  • 40