kind: Error rootless-cni-infra: modprobe: can't change directory to '/lib/modules': No such file or director

What happened: Preparing Nodes stage fails under rootless Podman.

What you expected to happen: It should work.

How to reproduce it (as minimally and precisely as possible):

Install podman 3.1.2-2 Install kind v0.11.0 go1.16.4 linux/amd64

Follow steps https://wiki.archlinux.org/title/Podman#Rootless_Podman to enable rootless Podman Follow steps https://kind.sigs.k8s.io/docs/user/rootless/ to enable rootless Kind

KIND_EXPERIMENTAL_PROVIDER=podman kind create cluster
using podman due to KIND_EXPERIMENTAL_PROVIDER
enabling experimental podman provider
Creating cluster "kind" ...
 ✓ Ensuring node image (kindest/node:v1.21.1) 🖼
 ✗ Preparing nodes 📦
ERROR: failed to create cluster: podman run error: command "podman run --hostname kind-control-plane --name kind-control-plane --label io.x-k8s.kind.role=control-plane --privileged --tmpfs /tmp --tmpfs /run --volume b553212b8e4f27ffdc4913d05e9fa094741bace1b2b64c2b6e31958b4ef27678:/var:suid,exec,dev --volume /lib/modules:/lib/modules:ro --detach --tty --net kind --label io.x-k8s.kind.cluster=kind -e container=podman --publish=127.0.0.1:39369:6443/tcp -e KUBECONFIG=/etc/kubernetes/admin.conf kindest/node@sha256:fae9a58f17f18f06aeac9772ca8b5ac680ebbed985e266f711d936e91d113bad" failed with error: exit status 127
Command Output: Error: command rootless-cni-infra [alloc 3dca4d05101ca0d3e9eb0f86c095f8ec2ec4d14d0570c5b44fc630f65c544f5d kind kind-control-plane   ] in container eb38361e52803d8166430e540033d44259e2364ff0c3a77b75f26dfd5b0e9ff7 failed with status 1, stdout="", stderr="failed to list chains: running [/sbin/ip6tables -t nat -S --wait]: exit status 3: modprobe: can't change directory to '/lib/modules': No such file or directory\nip6tables v1.8.4 (legacy): can't initialize ip6tables table `nat': Table does not exist (do you need to insmod?)\nPerhaps ip6tables or your kernel needs to be upgraded.\n\n"

Anything else we need to know?:

Environment:

  • kind version: kind v0.11.0 go1.16.4 linux/amd64
  • Kubernetes version: (use kubectl version): Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.1", GitCommit:"5e58841cce77d4bc13713ad2b91fa0d961e69192", GitTreeState:"archive", BuildDate:"2021-05-14T14:09:09Z", GoVersion:"go1.16.4", Compiler:"gc", Platform:"linux/amd64"}
  • Docker version: (use docker info): podman 3.1.2-2
  • OS (e.g. from /etc/os-release): 5.12.5-arch1-1
NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://www.archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://bugs.archlinux.org/"
LOGO=archlinux

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 20 (20 by maintainers)

Most upvoted comments

It appears to check out fine for me using the latest Kind node images and no longer my custom built ones!

Please try sudo modprobe ip6tables_nat (https://kind.sigs.k8s.io/docs/user/rootless/)