Giter VIP home page Giter VIP logo

Comments (14)

BenTheElder avatar BenTheElder commented on June 2, 2024 1

Can you please try with a minimal cluster first? The log output suggests you're using a custom multi-node config.

from kind.

stmcginnis avatar stmcginnis commented on June 2, 2024

Can you add the output from docker info? Paste the text, not a screenshot of the text please.

I was able to create a cluster using the same config file, so that makes me think this is something in your local environment. Note that creating a cluster with multiple nodes does have the risk of running into host resource issues with CPU, memory, inotify resources, and others. I would suggest starting with a smaller cluster to see if there is a point where you start having trouble.

Also make sure you don't have a lot of other containers running. Even stopped ones. It might be good to run docker system prune -a --volumes to make sure everything is cleaned up before trying to create a new cluster.

from kind.

bzsuni avatar bzsuni commented on June 2, 2024

I encountered the same issue. I tried creating a cluster using a command like

kind create cluster --name kind-2

and it worked fine.
However, when using a configuration file, like

kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
name: network-chart
networking:
  kubeProxyMode: iptables
  disableDefaultCNI: true
nodes:
  - role: control-plane
  - role: worker
  - role: worker

there is a problem.

from kind.

BenTheElder avatar BenTheElder commented on June 2, 2024

Please check https://kind.sigs.k8s.io/docs/user/known-issues/

Common one for operating more nodes include e.g. running out of inotify limit on the host https://kind.sigs.k8s.io/docs/user/known-issues/#pod-errors-due-to-too-many-open-files

from kind.

achu911 avatar achu911 commented on June 2, 2024

Please test multi nodes,I upgrade kind version, and I also get a same error。

from kind.

achu911 avatar achu911 commented on June 2, 2024

[kubelet-check] It seems like the kubelet isn't running or healthy.
[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10248/healthz' failed with error: Get "http://localhost:10248/healthz": dial tcp [::1]:10248: connect: connection refused.

Unfortunately, an error has occurred:
timed out waiting for the condition

This error is likely caused by:
- The kubelet is not running
- The kubelet is unhealthy due to a misconfiguration of the node in some way (required cgroups disabled)

If you are on a systemd-powered system, you can try to troubleshoot the error with the following commands:
- 'systemctl status kubelet'
- 'journalctl -xeu kubelet'

Additionally, a control plane component may have crashed or exited when started by the container runtime.
To troubleshoot, list all containers using your preferred container runtimes CLI.
Here is one example how you may list all running Kubernetes containers by using crictl:
- 'crictl --runtime-endpoint unix:///run/containerd/containerd.sock ps -a | grep kube | grep -v pause'
Once you have found the failing container, you can inspect its logs with:
- 'crictl --runtime-endpoint unix:///run/containerd/containerd.sock logs CONTAINERID'
couldn't initialize a Kubernetes cluster
k8s.io/kubernetes/cmd/kubeadm/app/cmd/phases/init.runWaitControlPlanePhase
cmd/kubeadm/app/cmd/phases/init/waitcontrolplane.go:108
k8s.io/kubernetes/cmd/kubeadm/app/cmd/phases/workflow.(*Runner).Run.func1
cmd/kubeadm/app/cmd/phases/workflow/runner.go:259
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
cmd/kubeadm/app/cmd/phases/workflow/runner.go:232
k8s.io/kubernetes/cmd/kubeadm/app/cmd.newCmdInit.func1

from kind.

domoran avatar domoran commented on June 2, 2024

I have the same problem with the newest version of kind. It worked exactly once to create a cluster using "kind create cluster". Now afterwards every attempt fails with the above error. Restarting the docker service did not work. A reboot fixed the problem.

from kind.

liangyuanpeng avatar liangyuanpeng commented on June 2, 2024

@bzsuni @domoran @achu911

Please provide more info here, OS/docker version/kind version/kubelet error log/command of kind create cluster/ kind config file , etc...

from kind.

liangyuanpeng avatar liangyuanpeng commented on June 2, 2024

/remove-kind bug
/kind support

I think this is a support first. If the problem becomes clear and it is confirmed to be a bug, we can go back to the bug.

from kind.

tao12345666333 avatar tao12345666333 commented on June 2, 2024

You can just try

kind create cluster

without any other configuration

from kind.

BenTheElder avatar BenTheElder commented on June 2, 2024

Please test multi nodes,I upgrade kind version, and I also get a same error。

No, we need a test with a trivial kind create cluster first so we know if it's a problem with the host for even a single, one-node cluster, or if the problem only shows up for multiple nodes + custom config options. If it doesn't show up for a single node, it's probably a resourcing issue with the host environment and we have suggestions in https://kind.sigs.k8s.io/docs/user/known-issues/, a common one is https://kind.sigs.k8s.io/docs/user/known-issues/#pod-errors-due-to-too-many-open-files which kind itself is not responsible for.

from kind.

domoran avatar domoran commented on June 2, 2024

This problem happened to me with a "simple" cluster, but customized config:
Windows 10,
Docker Desktop 3.5.2 (66501),
Docker Engine Version: 20.10.7
Kind v0.20.0 go1.20.4 (windows/amd)

config.yaml

kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
  kubeadmConfigPatches:
  - |
    kind: InitConfiguration
    nodeRegistration:
      kubeletExtraArgs:
        node-labels: "ingress-ready=true"
  extraPortMappings:
  - containerPort: 80
    hostPort: 80
    protocol: TCP
  - containerPort: 443
    hostPort: 443
    protocol: TCP
  extraMounts:
   - hostPath: ./ca.crt
     containerPath: /usr/local/share/ca-certificates/ca.crt

When simply doing_

kind create cluster  --config=config.yaml               (works, control plane comes up)
kind delete cluster                                                      (works)
kind create cluster  --config=config.yaml                   (control plane would not come up)

After a reboot, it works again. Since I am using a very old version of docker engine it could be a problem of docker engine.

from kind.

SantoDE avatar SantoDE commented on June 2, 2024

Simple kind create cluster just failed on my new installation on macOS Sonoma.

kind create cluster
Creating cluster "kind" ...
 ✓ Ensuring node image (kindest/node:v1.29.1) 🖼
 ✓ Preparing nodes 📦
 ✗ Writing configuration 📜
Deleted nodes: ["kind-control-plane"]
ERROR: failed to create cluster: failed to copy kubeadm config to node: command "docker exec --privileged -i kind-control-plane cp /dev/stdin /kind/kubeadm.conf" failed with error: exit status 1
Command Output: Error response from daemon: Container 91347e93b6fa8b5eb7607a237a13c4935c4617a9add85cd6b08275805c40a8bd is not running
kind version
kind v0.21.0 go1.21.6 darwin/arm64

Is that linked?

from kind.

aojea avatar aojea commented on June 2, 2024

@SantoDE see #3510

from kind.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.