#3806·kind

Increase maxkeys and maxbytes in Known Issues

Author: antoinetranCreated Dec 4, 2024Updated Sep 1, 2026
Labelshelp wantedkind/documentation

What would you like to be documented: In https://kind.sigs.k8s.io/docs/user/known-issues/, to add this frequent error:

could not create session key: disk quota exceeded

And the fix:

bash
sudo sysctl -w kernel.keys.maxkeys=20000
sudo sysctl -w kernel.keys.maxbytes=500000
cat <<EOF | sudo tee /etc/sysctl.d/01-keys.conf
# See https://github.com/moby/moby/issues/22865
# Default maxkeys: 200
kernel.keys.maxkeys = 20000
# Default maxbytes: 20000
kernel.keys.maxbytes = 500000
EOF

Why is this needed: The default settings are not enough in the context of Kind. If the container runtime is podman, then the rootless user that runs kind cannot have more than 200 keys by default (in Debian/redhat family). Because:

We reach the limit very fast, with lots of empty keyring, that can be listed with:

cat /proc/keys

See https://github.com/moby/moby/issues/22865 that is docker side of the fix, they increase root max keys and bytes to 1m and 25m. I suggest a bit less in the above code.