kind: RROR: failed to create cluster: failed to init node with kubeadm

What happened: use kind create cluster then prompt: ERROR: failed to create cluster: failed to init node with kubeadm: command “docker exec --privileged kind-control-plane kubeadm init --ignore-preflight-errors=all --config=/kind/kubeadm.conf --skip-token-print --v=6” failed with error: exit status 1

What you expected to happen: create the cluster ok

How to reproduce it (as minimally and precisely as possible): Mac vagrant centos/7 Client: Docker Engine - Community Version: 19.03.8 API version: 1.40 Go version: go1.12.17 Git commit: afacb8b Built: Wed Mar 11 01:27:04 2020 OS/Arch: linux/amd64 Experimental: false

Server: Docker Engine - Community Engine: Version: 19.03.8 API version: 1.40 (minimum version 1.12) Go version: go1.12.17 Git commit: afacb8b Built: Wed Mar 11 01:25:42 2020 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.2.13 GitCommit: 7ad184331fa3e55e52b890ea95e65ba581ae3429 runc: Version: 1.0.0-rc10 GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd docker-init: Version: 0.18.0 GitCommit: fec3683 Anything else we need to know?:

Environment:

  • kind version: (use kind version):kind v0.7.0 go1.13.6 linux/amd64
  • Kubernetes version: (use kubectl version):Client Version: version.Info{Major:“1”, Minor:“17”, GitVersion:“v1.17.4”, GitCommit:“8d8aa39598534325ad77120c120a22b3a990b5ea”, GitTreeState:“clean”, BuildDate:“2020-03-12T21:03:42Z”, GoVersion:“go1.13.8”, Compiler:“gc”, Platform:“linux/amd64”} The connection to the server localhost:8080 was refused - did you specify the right host or port?
  • Docker version: (use docker info):19.03.8
  • OS (e.g. from /etc/os-release):CentOS Linux release 7.6.1810 (Core)

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 26 (13 by maintainers)

Most upvoted comments

kind create cluster --retain -v 1 kind export logs lots of log files there.

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

please check that the name of your cluster should not contain any underscore… i bumped into the same error when i include an ‘_’ in my cluster name

this one worked for me, thank you!

Hello, I faced similar issue (I’m using Fedora 32), I solved it with: sysctl net.bridge.bridge-nf-call-iptables=0 sysctl net.bridge.bridge-nf-call-arptables=0 sysctl net.bridge.bridge-nf-call-ip6tables=0 systemctl restart docker

Note: modify sysctl.conf for persistent kernel setting

please check that the name of your cluster should not contain any underscore… i bumped into the same error when i include an ‘_’ in my cluster name

–retain will not clean up, you need that flag when creating it, then export will work.

On Thu, Apr 16, 2020 at 2:16 PM Michael Nikitochkin < notifications@github.com> wrote:

@BenTheElder https://github.com/BenTheElder thanks for the command.

I see logs. It seems kubelete could not be started.

But because was not created I could not get kubelet logs:

$ kind export logs ERROR: unknown cluster “kind”

Is there any other way to extract logs during the boot?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kubernetes-sigs/kind/issues/1437#issuecomment-614900945, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHADKYSE77FDGDX26XHC5LRM5YUPANCNFSM4LSGE3RA .

@BenTheElder thanks for the command.

I see logs. It seems kubelete could not be started.

because cluster was not created I could not get kubelet logs:

 $ kind export logs           
ERROR: unknown cluster "kind"

Is there any other way to extract logs during the boot?

@Seshirantha I would recommend using something like this in the kind config instead of trying to mount the config file:

kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
containerdConfigPatches: 
- |-
  [plugins."io.containerd.grpc.v1.cri".registry.mirrors."localhost:5000"]
    endpoint = ["http://blah:5000"]

(replace the patch contents with whatever you’re setting in this config file)

This error just means that kubeadm was unable to bring up the control plane successfully, which generally means the host environment is unhealthy.

I’m going to need more information about your failure and your host environment to know why it isn’t working for you but common reasons are:

  • using an unsupported version of docker (I mean supported by docker upstream… some of the older versions etc. have issues)
  • not having enough disk / memory / CPU available to docker to run a kubernetes node (generally disk, occasionally memory, you need something like 600MB memory for one node and at least 2gb disk space to pull the node image and have some space to do things after)
  • using a filesystem that doesn’t work out of the box with docker in docker https://github.com/kubernetes-sigs/kind/issues/1416#issuecomment-600438973
  • using a host environment that cannot nest containers like this (e.g. crostini) https://github.com/kubernetes-sigs/kind/issues/763

please check the known issues