I’m building a small on-premise Kubernetes cluster: 1 control node and 1 worker node
The cluster worked more than an year but the worker had OS issues and I reinstalled the OS. After that I cannot connect the worker to the control node again.
OS all nodes: RHEL 9.2 5.14.0-284.25.1.el9_2.x86_64
kubeadm and kubelet - v1.27.4, BuildDate:“2023-07-19T12:19:40Z”, GoVersion:“go1.20.6”
Everything was updated to the latest version.
The following command was executed on the worker node:
sudo kubeadm join 192.168.1.10:6443 --token {–token–} --discovery-token-ca-cert-hash sha256:{–sha–}
[preflight] Running pre-flight checks
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x1aa84f3]goroutine 1 [running]:
k8s_io/kubernetes/cmd/kubeadm/app/discovery.For (0xc00012c870)
cmd/kubeadm/app/discovery/discovery.go:56 +0x153
k8s_io/kubernetes/cmd/kubeadm/app/cmd.(*joinData).TLSBootstrapCfg (0xc0003dd110)
cmd/kubeadm/app/cmd/join.go:530 +0xb2
k8s_io/kubernetes/cmd/kubeadm/app/cmd.(*joinData).InitCfg(0xc0003dd110)
cmd/kubeadm/app/cmd/join.go:540 +0x33
k8s_io/kubernetes/cmd/kubeadm/app/cmd/phases/join.runPreflight({0x1e69860?, 0xc0003dd110?})
cmd/kubeadm/app/cmd/phases/join/preflight.go:98 +0x18d
k8s_io/kubernetes/cmd/kubeadm/app/cmd/phases/workflow.(*Runner).Run.func1(0xc0005237a0)
cmd/kubeadm/app/cmd/phases/workflow/runner.go:259 +0x134
k8s_io/kubernetes/cmd/kubeadm/app/cmd/phases/workflow.(*Runner).visitAll(…)
cmd/kubeadm/app/cmd/phases/workflow/runner.go:446
k8s_io/kubernetes/cmd/kubeadm/app/cmd/phases/workflow.(*Runner).Run(0xc000158f30, {0xc0005dfdb0, 0x1, 0x5})
cmd/kubeadm/app/cmd/phases/workflow/runner.go:232 +0x3e3
k8s_io/kubernetes/cmd/kubeadm/app/cmd.newCmdJoin.func1(0xc0002f6f00?, {0xc0005dfdb0, 0x1, 0x5})
cmd/kubeadm/app/cmd/join.go:179 +0x90
github_com/spf13/cobra.(*Command).execute(0xc0002f6f00, {0xc0005dfd60, 0x5, 0x5})
vendor/github.com/spf13/cobra/command.go:916 +0x862
github_com/spf13/cobra.(*Command).ExecuteC(0xc0001e8600)
vendor/github.com/spf13/cobra/command.go:1040 +0x3bd
github_com/spf13/cobra.(*Command).Execute(0x22531c0?)
vendor/github.com/spf13/cobra/command.go:968 +0x19 k8s_io/kubernetes/cmd/kubeadm/app.Run()
cmd/kubeadm/app/kubeadm.go:50 +0x15d main.main()
cmd/kubeadm/kubeadm.go:25 +0x19
All OS firewall and Selinux are disabled.
the “ping 192.168.1.10” command works.
No errors in journalctl on both OSs
I checked “sudo kubeadm init --pod-network-cidr 10.244.0.0/16” on the worker and new control node was created successfully.
then after “kubeadm reset” the “kubeadm join” fails again.
How could I connect the worker to the control node?
Is this OS issue or Kubernetes issue?