Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4791 pages
Servers, nginx and Docker

kind create cluster stops on rootless Podman or Docker over cgroups

Your error

ERROR: failed to create cluster: running kind with rootless provider requires setting systemd property "Delegate=yes", see https://kind.sigs.k8s.io/docs/user/rootless/1 more line it can show

Fix it fast

Most common cause, 1 of 3

systemd is older than 252 and does not delegate the cpu controller

Create a drop-in for user@.service that sets Delegate=yes, which hands every controller to user sessions, and reload systemd.

Fix
sudo mkdir -p /etc/systemd/system/user@.service.d/
printf '[Service]\nDelegate=yes\n' | sudo tee /etc/systemd/system/user@.service.d/delegate.conf
sudo systemctl daemon-reload
Did this fix it?
Full steps for this cause: check, fix, verify

Short answer

kind refuses a rootless Podman, Docker or nerdctl provider when your user's cgroup lacks the memory, pids or cpu controller. systemd 252 and newer delegate these by default; older systemd needs a user@.service drop-in with Delegate=yes, then a fresh login. A host still on cgroup v1 gets a separate cgroup v2 message. Applies to kind 0.33 and Podman 6.2.

  • Applies to kind 0.33.0, Podman 6.2.0, Rootless Docker Engine 29.10, systemd 252 and later
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Which cause do you have?

Check three things as the same user that runs kind: the cgroup version the runtime reports, the controllers systemd hands to your user, and the systemd version. kind needs cgroup v2 plus memory, pids and cpu in that list.

Run this first
podman info | grep -i cgroupVersion
cat "/sys/fs/cgroup/user.slice/user-$(id -u).slice/user@$(id -u).service/cgroup.controllers"
systemctl --version | head -1

Then find the line you see in this list and open its fix:

  1. 1systemd is older than 252 and does not delegate the cpu controllercgroupVersion is v2, but the controllers file lists only memory pids, and systemctl --version prints a number below 252
  2. 2The drop-in exists, but your user manager was started before itdelegate.conf is present, yet the controllers file still lacks cpu in the shell you are using
  3. 3The host still boots with cgroup v1The error says rootless provider requires cgroup v2, and podman info shows cgroupVersion: v1

What does the error look like?

  • ERROR: failed to create cluster: running kind with rootless provider requires setting systemd property "Delegate=yes", see https://kind.sigs.k8s.io/docs/user/rootless/
  • running kind with rootless provider requires cgroup v2, see https://kind.sigs.k8s.io/docs/user/rootless/

Cause 1 of 3

systemd is older than 252 and does not delegate the cpu controller

You seecgroupVersion is v2, but the controllers file lists only memory pids, and systemctl --version prints a number below 252

Check

kind raises the Delegate=yes error after it asks the provider which cgroup controllers a rootless container may use and finds memory, pids or cpu missing. systemd 252 and later delegate the cpu controller to user services by default; older releases keep it, so the user slice cannot set CPU limits.

Check
cat "/sys/fs/cgroup/user.slice/user-$(id -u).slice/user@$(id -u).service/cgroup.controllers"

Fix

Create a drop-in for user@.service that sets Delegate=yes, which hands every controller to user sessions, and reload systemd.

Fix
sudo mkdir -p /etc/systemd/system/user@.service.d/
printf '[Service]\nDelegate=yes\n' | sudo tee /etc/systemd/system/user@.service.d/delegate.conf
sudo systemctl daemon-reload

Verify

After the next login (cause 2), the controllers file lists cpu as well as memory and pids.

Verify
cat "/sys/fs/cgroup/user.slice/user-$(id -u).slice/user@$(id -u).service/cgroup.controllers"

Confirmed by kind.sigs.k8s.io

Did this fix it?

Cause 2 of 3

The drop-in exists, but your user manager was started before it

You seedelegate.conf is present, yet the controllers file still lacks cpu in the shell you are using

Check

Podman's troubleshooting guide notes that new delegation settings take effect only after the user logs out and back in. Until then the old session keeps its old controller list, so kind repeats the Delegate=yes message even though daemon-reload ran.

Check
cat /etc/systemd/system/user@.service.d/delegate.conf
cat "/sys/fs/cgroup/user.slice/user-$(id -u).slice/user@$(id -u).service/cgroup.controllers"

Fix

Log out of every session for that user and log back in, or reboot. For rootless Docker, also restart the user daemon so it runs under the new cgroup.

Fix
# after logging back in
systemctl --user restart docker   # rootless Docker only
KIND_EXPERIMENTAL_PROVIDER=podman kind create cluster

Verify

kind create cluster completes without the Delegate=yes error, and the new cluster answers kubectl.

Verify
kubectl cluster-info --context kind-kind

Confirmed by raw.githubusercontent.com

Did this fix it?

Cause 3 of 3

The host still boots with cgroup v1

You seeThe error says rootless provider requires cgroup v2, and podman info shows cgroupVersion: v1

Check

kind checks the cgroup version before it looks at delegation. Rootless clusters need the unified cgroup v2 hierarchy, which recent Ubuntu, Fedora and Arch releases use by default, but older or customised installs may still boot into v1.

Check
podman info | grep -i cgroupVersion

Fix

Switch the kernel command line to the unified hierarchy, regenerate the GRUB config and reboot. Then run the first step again, since an older systemd may also need cause 1.

Fix
# in /etc/default/grub
GRUB_CMDLINE_LINUX="systemd.unified_cgroup_hierarchy=1"
sudo update-grub
sudo reboot

Verify

podman info now reports cgroupVersion: v2.

Verify
podman info | grep -i cgroupVersion

Confirmed by raw.githubusercontent.com

Did this fix it?

How do I stop it coming back?

  • Bake the delegate.conf drop-in into the image or provisioning script of every build host that runs kind rootless, so a fresh machine never meets the check.
  • Run the controllers check from the first step as the opening step of CI jobs that create kind clusters, and fail early with a clear message.
  • Stay on Podman 4.0 or newer: older versions do not report cgroup controllers, so kind can only print a warning and any cgroup error surfaces later, inside the cluster.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Which stack is behind this page?

Projects of mine on the same stack: TaxiDex, Dispatch Pro.

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.