kubernetes / minikube

Run Kubernetes locally
https://minikube.sigs.k8s.io/
Apache License 2.0
29.28k stars 4.87k forks source link

Worker node failed to join cluster #19063

Open AlleNeri opened 3 months ago

AlleNeri commented 3 months ago

What Happened?

$ minikube start -n 3
😄  minikube v1.33.1 on Arch 
✨  Using the kvm2 driver based on user configuration
👍  Starting "minikube" primary control-plane node in "minikube" cluster
🔥  Creating kvm2 VM (CPUs=2, Memory=2633MB, Disk=20000MB) ...
❗  This VM is having trouble accessing https://registry.k8s.io
💡  To pull new external images, you may need to configure a proxy: https://minikube.sigs.k8s.io/docs/reference/networking/proxy/
🐳  Preparing Kubernetes v1.30.0 on Docker 26.0.2 ...
    ▪ Generating certificates and keys ...
    ▪ Booting up control plane ...
    ▪ Configuring RBAC rules ...
🔗  Configuring CNI (Container Networking Interface) ...
🔎  Verifying Kubernetes components...
    ▪ Using image gcr.io/k8s-minikube/storage-provisioner:v5
🌟  Enabled addons: storage-provisioner, default-storageclass

👍  Starting "minikube-m02" worker node in "minikube" cluster
🔥  Creating kvm2 VM (CPUs=2, Memory=2633MB, Disk=20000MB) ...
🌐  Found network options:
    ▪ NO_PROXY=192.168.39.102
❗  This VM is having trouble accessing https://registry.k8s.io
💡  To pull new external images, you may need to configure a proxy: https://minikube.sigs.k8s.io/docs/reference/networking/proxy/
🐳  Preparing Kubernetes v1.30.0 on Docker 26.0.2 ...
    ▪ env NO_PROXY=192.168.39.102
E0612 12:00:24.130674   20803 start.go:344] worker node failed to join cluster, will retry: kubeadm join: /bin/bash -c "sudo env PATH="/var/lib/minikube/binaries/v1.30.0:$PATH" kubeadm join control-plane.minikube.internal:8443 --token btojdo.1e6p5op37ki7dxv1 --discovery-token-ca-cert-hash sha256:22444ca426d8a61ff25565ec793eba299323470f6c0cbb9c3b5356da1758fad9 --ignore-preflight-errors=all --cri-socket unix:///var/run/cri-dockerd.sock --node-name=minikube-m02": Process exited with status 1
stdout:
[preflight] Running pre-flight checks

stderr:
    [WARNING Service-Kubelet]: kubelet service is not enabled, please run 'systemctl enable kubelet.service'
error execution phase preflight: couldn't validate the identity of the API Server: failed to request the cluster-info ConfigMap: Get "https://control-plane.minikube.internal:8443/api/v1/namespaces/kube-public/configmaps/cluster-info?timeout=10s": context deadline exceeded
To see the stack trace of this error execute with --v=5 or higher

❌  Exiting due to GUEST_START: failed to start node: adding node: join node to cluster: error joining worker node "m02" to cluster: kubeadm join: /bin/bash -c "sudo env PATH="/var/lib/minikube/binaries/v1.30.0:$PATH" kubeadm join control-plane.minikube.internal:8443 --token btojdo.1e6p5op37ki7dxv1 --discovery-token-ca-cert-hash sha256:22444ca426d8a61ff25565ec793eba299323470f6c0cbb9c3b5356da1758fad9 --ignore-preflight-errors=all --cri-socket unix:///var/run/cri-dockerd.sock --node-name=minikube-m02": Process exited with status 1
stdout:
[preflight] Running pre-flight checks

stderr:
    [WARNING Service-Kubelet]: kubelet service is not enabled, please run 'systemctl enable kubelet.service'
error execution phase preflight: couldn't validate the identity of the API Server: failed to request the cluster-info ConfigMap: Get "https://control-plane.minikube.internal:8443/api/v1/namespaces/kube-public/configmaps/cluster-info?timeout=10s": context deadline exceeded
To see the stack trace of this error execute with --v=5 or higher

╭───────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                           │
│    😿  If the above advice does not help, please let us know:                             │
│    👉  https://github.com/kubernetes/minikube/issues/new/choose                           │
│                                                                                           │
│    Please run `minikube logs --file=logs.txt` and attach logs.txt to the GitHub issue.    │
│                                                                                           │
╰───────────────────────────────────────────────────────────────────────────────────────────╯

Attach the log file

logs.txt

Operating System

Other

Driver

KVM2

medyagh commented 3 months ago

@AlleNeri I see minikube is warning that you dont have access to the registry.k8s.io

❗  This VM is having trouble accessing https://registry.k8s.io

are you behind a proxy or a corp setting that restricts you ? or have you set the right HTTP_PROXY env vars before starting minikube?

medyagh commented 3 months ago

/triage needs-information /kind support

AlleNeri commented 3 months ago

No, the host isn't behind a proxy, and I don't have corporate restrictions. I encounter this issue regardless of the network I'm using. \ I've tried several things:

I suspect this might be a problem related to the CNI, although I'm not entirely familiar with how it operates or how Minikube handles it

AlleNeri commented 3 months ago

I tried using VirtualBox as the driver and it worked. \ Since I'm using Minikube for my thesis, I cannot afford to wait for a solution for too long; therefore, I will use Virtualbox. However I'm not closing the issue because I'm still interested in a solution and also for others who might having the same problem. \ I leave the last piece of information that I have found: in the control plane node the kublet service has issues with the IP tables. kubelet-service.txt

k8s-triage-robot commented 3 weeks ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale