kind: Rancher-Desktop [Alpine] can't create cluster with v0.20.0 [Previously Also Colima]
What happened:
After updating to v0.20.0 I cannot create a cluster anymore.
I’m using Mac with colima
Creating cluster "colima" ...
✓ Ensuring node image (kindest/node:v1.27.2) 🖼
✗ Preparing nodes 📦
Deleted nodes: ["colima-control-plane"]
ERROR: failed to create cluster: command "docker run --name colima-control-plane --hostname colima-control-plane --label io.x-k8s.kind.role=control-plane --privileged --security-opt seccomp=unconfined --security-opt apparmor=unconfined --tmpfs /tmp --tmpfs /run --volume /var --volume /lib/modules:/lib/modules:ro -e KIND_EXPERIMENTAL_CONTAINERD_SNAPSHOTTER --detach --tty --label io.x-k8s.kind.cluster=colima --net kind --restart=on-failure:1 --init=false --cgroupns=private --publish=127.0.0.1:52490:6443/TCP -e KUBECONFIG=/etc/kubernetes/admin.conf kindest/node:v1.27.2@sha256:3966ac761ae0136263ffdb6cfd4db23ef8a83cba8a463690e98317add2c9ba72" failed with error: exit status 125
Command Output: 3236752928bc442ebdaf6bd3b6b164643987d45b1a120ec3cd20ca14cc7f5dd7
docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "cgroup" to rootfs at "/sys/fs/cgroup": mount cgroup:/sys/fs/cgroup/openrc (via /proc/self/fd/7), flags: 0xe, data: openrc: invalid argument: unknown.
What you expected to happen:
No error and cluster creates successfully
How to reproduce it (as minimally and precisely as possible):
- Try to create cluster with kind v0.20.0
Environment:
-
kind version: (use
kind version
): v0.20.0 -
Runtime info: (use
docker info
orpodman info
):Client: Docker Engine - Community Version: 24.0.2 Context: default Debug Mode: false Plugins: buildx: Docker Buildx (Docker Inc.) Version: v0.10.5 Path: /usr/local/lib/docker/cli-plugins/docker-buildx compose: Docker Compose (Docker Inc.) Version: v2.18.1 Path: /usr/local/lib/docker/cli-plugins/docker-compose dev: Docker Dev Environments (Docker Inc.) Version: v0.1.0 Path: /usr/local/lib/docker/cli-plugins/docker-dev extension: Manages Docker extensions (Docker Inc.) Version: v0.2.19 Path: /usr/local/lib/docker/cli-plugins/docker-extension init: Creates Docker-related starter files for your project (Docker Inc.) Version: v0.1.0-beta.4 Path: /usr/local/lib/docker/cli-plugins/docker-init sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.) Version: 0.6.0 Path: /usr/local/lib/docker/cli-plugins/docker-sbom scan: Docker Scan (Docker Inc.) Version: v0.26.0 Path: /usr/local/lib/docker/cli-plugins/docker-scan scout: Command line tool for Docker Scout (Docker Inc.) Version: v0.12.0 Path: /usr/local/lib/docker/cli-plugins/docker-scout Server: Containers: 0 Running: 0 Paused: 0 Stopped: 0 Images: 1 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: 1fbd70374134b891f97ce19c70b6e50c7b9f4e0d runc version: 860f061b76bb4fc671f0f9e900f7d80ff93d4eb7 init version: Security Options: seccomp Profile: builtin Kernel Version: 6.1.29-0-virt Operating System: Alpine Linux v3.18 OSType: linux Architecture: aarch64 CPUs: 6 Total Memory: 7.754GiB Name: colima ID: c67ab9db-07cd-4788-8cbe-b016d3bead80 Docker Root Dir: /var/lib/docker Debug Mode: false Username: patrykmalekkonghq Experimental: false Insecure Registries: 127.0.0.0/8 Live Restore Enabled: false
-
OS (e.g. from
/etc/os-release
): Mac OS with colima VM./etc/os-release
from within the VM that hosts the docker daemon:cat /etc/os-release NAME="Alpine Linux" ID=alpine VERSION_ID=3.18.0 PRETTY_NAME="Alpine Linux v3.18" HOME_URL="https://alpinelinux.org/" BUG_REPORT_URL="https://gitlab.alpinelinux.org/alpine/aports/-/issues" BUILD_ID="" VARIANT_ID="clm"
About this issue
- Original URL
- State: open
- Created a year ago
- Reactions: 28
- Comments: 68 (35 by maintainers)
Commits related to this issue
- feat(brew): uninstall kind I cannot get kind running anymore because colima is alpine-based. See https://github.com/kubernetes-sigs/kind/issues/3277 — committed to jscheytt/dotfiles by jscheytt a year ago
- feat(brew): uninstall kind I cannot get kind running anymore because colima is alpine-based. See https://github.com/kubernetes-sigs/kind/issues/3277 — committed to jscheytt/dotfiles by jscheytt a year ago
- Bump kind version to `0.19.0` and k8s to `1.28.0` (#386) Addresses: https://github.com/aws-controllers-k8s/community/issues/1903 Description of changes: - Bump kind version to `0.19.0` [avoiding ... — committed to aws-controllers-k8s/test-infra by a-hilaly 9 months ago
Yeah, same issue here.
brew install
doesn’t supportkind@0.19.0
so I had to install it through the go approach. Runninggo install sigs.k8s.io/kind@v0.19.0
seems to have temporarily fixed the issue.Experiencing the same on Rancher Desktop. Downgrading to kind 0.19.0 fixes the issue for now.
Would be great to get a fix for 0.20.0.
The issue I see on Rancher Desktop using Kind 0.20.0 is the following:
Colima v0.6.0 supports kind https://github.com/abiosoft/colima/releases/tag/v0.6.0
Do not want to duplicate issues. Running on MacOS Ventura 13.5.1.
Kind version
Docker info
Rollback to
0.19
Switching to an Ubuntu image with regular
lima
instead ofcolima
worked for me:Same error happens with Rancher Desktop that is using lima under the hood
Thanks, switching to
limactl start template://docker
fixed my issue. I am now again able to build docker images without errors.I’ve been able to switch Alpine to use the unified cgroups v2 layout, which seems to fix the
buildkitd
issue.And it fixes the initial problem with
kind
as well, but fails with a different problem right after:I guess the issue is that cgroups are not writable inside the container.
You can use the
docker.lima
(orpodman.lima
, orkubectl.lima
) wrappers to do all the setup for you.Right, colima and rancher desktop don’t have or need kind specific examples either to my knowledge.
kind just needs docker (or podman), so just the example for running docker with a functioning VM guest distro is sufficient.
The standard docker template currently uses ubuntu and is reported to work fine in an earlier comment https://github.com/kubernetes-sigs/kind/issues/3277#issuecomment-1680876276, as I understand it
Depending on your use case, it may make sense to use the kubeadm or K3s templates instead, but that’s a little out of scope here 😅
limactl start template://docker
is briefly mentioned in https://github.com/lima-vm/lima#advanced-usage, and the output of that command will give info on how to use docker CLI with it, which is all kind needs. https://github.com/lima-vm/lima/blob/7b7b84a7983a7c26138660ad2db6ca9269963894/examples/docker.yaml#L80-L85P.S. Thanks for your contributions, lima is a cool project 😃
Lima has support for running containerd, and Docker, and Podman, and Kubernetes out-of-the-box…
It was deemed unnecessary to have a all-in-one example of kind (or k3d), in addition to kubeadm (and k3s).
But that is also possible, if you want to run kind but don’t have access to Docker Engine or Podman Engine:
The tool both colima and rancher-desktop are built on,
lima
, supports other distros / templates, and should work fine. Aside from e.g. docker desktop or running docker in other VM tools that are not pinned to Alpine. Podman desktop also supports kind, though kind needs some improvements around podman still.limactl start template://docker
should work https://github.com/kubernetes-sigs/kind/issues/3277#issuecomment-1680876276You can pick any k8s (k3s) version you want in Rancher Desktop and you can also upgrade to any new version and see how it affects your deployed workloads:
I’m not actually sure if versions prior to 1.19 still work properly, but all the more recent releases should be fully functional.
For me the only reason to use
k3d
is when I want to have a multi-node cluster to play around with pod placement strategies like taints and affinity, to make sure the manifests work as expected.Eventually there should be a config setting in Rancher Desktop to allow multiple nodes. Personally I’ve also wanted a mixed-architecture cluster with both amd64 and arm64 nodes, but that is more for fun than actual need… 😄
I think I will stick with Ubuntu LTS for the default kubeadm template (k8s.yaml), even if Debian is also a possibility.
https://github.com/rancher-sandbox/rancher-desktop/issues/5363
The point of setting this flag is to ensure that this is set on cgroupv1 hosts. cgroupv2 hosts already default to this.
cgroupv1 hosts are the problem. On hosts other than apline/colima/rancher desktop this works great. Alpine and colima / rancher desktop use an unusual init system that doesn’t seem to set this up properly.
Lima defaults to Ubuntu…
limactl start template://docker
Using Alpine is a choice by downstream, mostly for size reasons. I don’t know of an apk distro using systemd/glibc instead of openrc/musl, but I suppose it is possible (or maybe use Debian, it is also smaller)
EDIT: updating this early comment to note that Colima is fixed via https://github.com/kubernetes-sigs/kind/issues/3277#issuecomment-1807235030, just upgrade to v0.6.0 colima
This is an issue with the host environment presumably with --cgroupns=private.
colima is @abiosoft