"Kind create cluster" fails to create any cluster, but "sudo kind create cluster" works #2094
Labels
kind/bug
Categorizes issue or PR as related to a bug.
kind/external
upstream bugs
triage/duplicate
Indicates an issue is a duplicate of other open issue.
What happened:
I previously posted on issue #1458 and was instructed to run the following commands prior to "kind create cluster":
sudo mkdir /sys/fs/cgroup/systemd
sudo mount -t cgroup -o none,name=systemd cgroup /sys/fs/cgroup/systemd
That was already configured and the command "kind create cluster" still fails with the following output:
giulio ThinkPad-T430 ~ $ sudo mkdir /sys/fs/cgroup/systemd
[sudo] password for giulio:
mkdir: cannot create directory ‘/sys/fs/cgroup/systemd’: File exists
giulio ThinkPad-T430 ~ ERROR $ sudo mount -t cgroup -o none,name=systemd cgroup /sys/fs/cgroup/systemd
mount: /sys/fs/cgroup/systemd: cgroup already mounted on /sys/fs/cgroup/systemd.
giulio ThinkPad-T430 ~ 32 $ kind create cluster
Creating cluster "kind" ...
✓ Ensuring node image (kindest/node:v1.19.1) 🖼
✓ Preparing nodes 📦
✗ Writing configuration 📜
ERROR: failed to create cluster: failed to generate kubeadm config content: failed to get kubernetes version from node: failed to get file: command "docker exec --privileged kind-control-plane cat /kind/version" failed with error: exit status 1
Command Output: Error response from daemon: Container 1d30a2599e7d022d01575c5e2e25be6c3d3225dd2482974ca77b795d8ce170d1 is not running
However, if I run "sudo kind create cluster" the cluster is created:
giulio ThinkPad-T430 ~ ERROR $ sudo kind create cluster
[sudo] password for giulio:
Creating cluster "kind" ...
✓ Ensuring node image (kindest/node:v1.19.1) 🖼
✓ Preparing nodes 📦
✓ Writing configuration 📜
✓ Starting control-plane 🕹️
✓ Installing CNI 🔌
✓ Installing StorageClass 💾
Set kubectl context to "kind-kind"
You can now use your cluster with:
kubectl cluster-info --context kind-kind
Not sure what to do next? 😅 Check out https://kind.sigs.k8s.io/docs/user/quick-start/
What you expected to happen:
I believe "kind create cluster" should work without sudo privileges.
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
I have a rootless installation of docker. In fact I can run other containers without sudo privileges, as shown below:
giulio ThinkPad-T430 ~ $ docker run -it busybox sh
/ # ls
bin dev etc home proc root sys tmp usr var
/ #
Environment:
kind version: (use
kind version
): kind v0.9.0 go1.15.6 linux/amd64Kubernetes version: (use
kubectl version
): GitVersion:"v1.20.0"Docker version: (use
docker info
):giulio ThinkPad-T430 ~ ERROR $ docker version
Client: Docker Engine - Community
Version: 20.10.0
API version: 1.41
Go version: go1.13.15
Git commit: 7287ab3
Built: Tue Dec 8 18:54:00 2020
OS/Arch: linux/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.0
API version: 1.41 (minimum version 1.12)
Go version: go1.13.15
Git commit: eeddea2
Built: Tue Dec 8 18:58:04 2020
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: v1.4.3
GitCommit: 269548fa27e0089a8b8278fc4fc781d7f65a939b
runc:
Version: 1.0.0-rc92
GitCommit: ff819c7e9184c13b7c2607fe6c30ae19403a7aff
docker-init:
Version: 0.19.0
GitCommit: de40ad0
/etc/os-release
):NAME="Ubuntu"
VERSION="20.10 (Groovy Gorilla)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.10"
VERSION_ID="20.10"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=groovy
UBUNTU_CODENAME=groovy
The text was updated successfully, but these errors were encountered: