I am setting up a Kubernetes cluster on Ubuntu Server LTS 22.04 using Vagrant, with Kubernetes version 1.28.7 and CRI-O 1.28.2 as the container runtime. I'm encountering an issue when initializing the cluster with the kubeadm init
command. Despite the absence of errors in both kubelet and CRI-O service logs, the initialization fails.
The command used is:
sudo kubeadm init --config /etc/kubernetes/kubeadm-config.yaml --v=5
The process fails at the phase upload-config/kubelet with an error message indicating that the node "master" is not found. Here are relevant excerpts from the command output:
[kubelet-check] Initial timeout of 40s passed. nodes "master" not found Error writing Crisocket information for the control-plane node
I checked the running containers in CRI-O, and all necessary Kubernetes components seem to be running correctly:
root@master:~# crictl --runtime-endpoint unix:///var/run/crio/crio.sock ps -a | grep kube | grep -v pause
This is the kubeadm-config.yaml file used in the init command:
apiVersion: kubeadm.k8s.io/v1beta3kind: ClusterConfigurationclusterName: kuberneteskubernetesVersion: v1.28.7networking: podSubnet: 172.16.1.0/16 serviceSubnet: 172.17.1.0/18controlPlaneEndpoint: 10.0.0.101:6443apiServer: certSANs: - 10.0.0.101---apiVersion: kubeadm.k8s.io/v1beta3kind: InitConfigurationbootstrapTokens:- groups: - system:bootstrappers:kubeadm:default-node-token token: abcdef.0123456789abcdef ttl: 24h0m0s usages: - signing - authenticationlocalAPIEndpoint: advertiseAddress: 10.0.0.101 bindPort: 6443nodeRegistration: criSocket: unix:///var/run/crio/crio.sock imagePullPolicy: IfNotPresent name: master taints: null---apiVersion: kubelet.config.k8s.io/v1beta1kind: KubeletConfigurationcgroupDriver: systemd...
I also confirmed that "master" is the hostname of the node and checked the /etc/crictl.yaml configuration:
runtime-endpoint: unix:///var/run/crio/crio.sock image-endpoint: unix:///var/run/crio/crio.sock timeout: 10 debug: false
I have attempted using Kubernetes 1.29.2 and switching the container runtime to containerd without success. All services are up and running, and the Kubernetes API on 10.0.0.101:6443 is reachable. There are no errors in the kubeadm init preflight.
Versions:
Kubernetes: 1.28.7CRI-O: 1.28.2Ubuntu: 22.04Vagrant: 2.4.1Any insights or suggestions to resolve this issue would be greatly appreciated. Thank you.