Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: failed to create cluster: failed to generate kubeadm config content: failed to get kubernetes version from node: file should only be one line, got 0 lines #3528

Open
younes-io opened this issue Feb 22, 2024 · 5 comments
Labels
kind/support Categorizes issue or PR as a support question. triage/needs-information Indicates an issue needs more information in order to work on it.

Comments

@younes-io
Copy link

younes-io commented Feb 22, 2024

I have just installed KIND. Really having trouble creating a basic cluster because of this annoying error:

➜  Camunda kind create cluster --name camunda-local
Creating cluster "camunda-local" ...
 ✓ Ensuring node image (kindest/node:v1.29.2) 🖼
 ✓ Preparing nodes 📦
 ✗ Writing configuration 📜
Deleted nodes: ["camunda-local-control-plane"]
ERROR: failed to create cluster: failed to generate kubeadm config content: failed to get kubernetes version from node: file should only be one line, got 0 lines
➜  Camunda kind create cluster
Creating cluster "kind" ...
 ✓ Ensuring node image (kindest/node:v1.29.2) 🖼
 ✓ Preparing nodes 📦
 ✗ Writing configuration 📜
Deleted nodes: ["kind-control-plane"]
ERROR: failed to create cluster: failed to generate kubeadm config content: failed to get kubernetes version from node: file should only be one line, got 0 lines
➜  Camunda

EDIT:

➜  Camunda kind version
kind v0.22.0 go1.20.13 linux/amd64
➜  Camunda docker info
Client:
 Version:    24.0.7-rd
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.12.0
    Path:     /home/onto/.docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.23.3
    Path:     /home/onto/.docker/cli-plugins/docker-compose

Server:
 Containers: 19
  Running: 8
  Paused: 0
  Stopped: 11
 Images: 13
 Server Version: 23.0.6
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 0cae528dd6cb557f7201036e9f43420650207b58
 runc version: 51d5e94601ceffbbd85688df1c928ecccbfa4685
 init version:
 Security Options:
  seccomp
   Profile: builtin
 Kernel Version: 5.15.133.1-microsoft-standard-WSL2
 Operating System: Rancher Desktop WSL Distribution
 OSType: linux
 Architecture: x86_64
 CPUs: 8
 Total Memory: 15.49GiB
 Name: uoy-npf3
 ID: 56b673cb-fa03-4826-b076-0c14583dc166
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: No blkio throttle.read_bps_device support
WARNING: No blkio throttle.write_bps_device support
WARNING: No blkio throttle.read_iops_device support
WARNING: No blkio throttle.write_iops_device support
➜  Camunda
➜  Camunda sudo cat /etc/os-release
[sudo] password for onto:
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
➜  Camunda kubectl version
Client Version: v1.29.2
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.28.6+k3s2
➜  Camunda
➜  Camunda cat /etc/resolv.conf
# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:
# [network]
# generateResolvConf = false
nameserver 172.24.48.1
➜  Camunda
@stmcginnis
Copy link
Contributor

Definitely will need more details than that to help troubleshoot. Can you fill in the rest of the prompts from the issue template:


  • kind version: (use kind version):
  • Runtime info: (use docker info or podman info):
  • OS (e.g. from /etc/os-release):
  • Kubernetes version: (use kubectl version):
  • Any proxies or other special environment settings?:

It looks like you are using WSL. There are various issues that are commonly encountered, depending on how you have things set up. But if you can provide a little more detail, that might help narrow things down.

@younes-io
Copy link
Author

@stmcginnis done =)

@BenTheElder
Copy link
Member

We're going to need kind create cluster --retain && kind export logs && kind delete cluster, something with this host is causing the node containers to exit early most likely, given we fail to cat a static file right after starting them ...

@BenTheElder BenTheElder added kind/support Categorizes issue or PR as a support question. triage/needs-information Indicates an issue needs more information in order to work on it. labels Apr 17, 2024
@pedro-cs-ribeiro
Copy link

pedro-cs-ribeiro commented Aug 1, 2024

Hello @BenTheElder BenTheElder @younes-io I'm also getting the same issue. Here are the logs reproducing the issue:

PS C:\Users\PedroRibeiro> kind create cluster --retain
Creating cluster "kind" ...
 • Ensuring node image (kindest/node:v1.30.0) 🖼  ...
 ✓ Ensuring node image (kindest/node:v1.30.0) 🖼
 • Preparing nodes 📦   ...
 ✓ Preparing nodes 📦
 • Writing configuration 📜  ...
 ✗ Writing configuration 📜
ERROR: failed to create cluster: failed to generate kubeadm config content: failed to get kubernetes version from node: file should only be one line, got 0 lines
PS C:\Users\PedroRibeiro> kind export logs
Exporting logs for cluster "kind" to:
C:\Users\PEDROR~1\AppData\Local\Temp\3666541512
PS C:\Users\PedroRibeiro> kind delete cluster
Deleting cluster "kind" ...
Deleted nodes: ["kind-control-plane"]

Here are the logs: 3666541512.zip

Here's my setup information:

C:\Users\PedroRibeiro>kind version
kind v0.23.0 go1.21.10 windows/amd64

C:\Users\PedroRibeiro>docker info
Client:
 Version:    27.1.1
 Context:    wsl
 Debug Mode: false

Server:
 Containers: 1
  Running: 0
  Paused: 0
  Stopped: 1
 Images: 2
 Server Version: 27.1.1
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 2bf793ef6dc9a18e00cb12efb64355c2c9d5eb41
 runc version: v1.1.13-0-g58aa920
 init version: de40ad0
 Security Options:
  seccomp
   Profile: builtin
 Kernel Version: 5.15.153.1-microsoft-standard-WSL2
 Operating System: Ubuntu 22.04.4 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 16
 Total Memory: 18.96GiB
 Name: CJ-PF4PHDLA
 ID: 80ffacf3-6c6f-4588-ae41-7cdbcfd61c5c
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

[DEPRECATION NOTICE]: API is accessible on http://0.0.0.0:2375 without encryption.
         Access to the remote API is equivalent to root access on the host. Refer
         to the 'Docker daemon attack surface' section in the documentation for
         more information: https://docs.docker.com/go/attack-surface/
In future versions this will be a hard failure preventing the daemon from starting! Learn more at: https://docs.docker.com/go/api-security/
WARNING: No blkio throttle.read_bps_device support
WARNING: No blkio throttle.write_bps_device support
WARNING: No blkio throttle.read_iops_device support
WARNING: No blkio throttle.write_iops_device support

C:\Users\PedroRibeiro>kubectl version
Client Version: v1.30.3
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Unable to connect to the server: dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.

I also just installed kind and I got this error

@stmcginnis
Copy link
Contributor

I highly recommend using cgroupv2 instead of v1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/support Categorizes issue or PR as a support question. triage/needs-information Indicates an issue needs more information in order to work on it.
Projects
None yet
Development

No branches or pull requests

4 participants