Newer kind-images increases `fs.nr_open`
What happened:
From kind v0.32.0, all pre-built images increase fs.nr_open on startup, regardless of existing kernel settings. This causes issues with some applications running in kind, eg. wodby/varnish:6, and the referenced issue here, which results in very long startup times.
What you expected to happen:
I expected kind to not mess with kernel settings, eg. fs.nr_open.
How to reproduce it (as minimally and precisely as possible):
Initially, make sure your fs.nr_open is not already maxed - set it with sudo sysctl -w fs.nr_open=1048576.
Now, run kind create cluster --image kindest/node:v1.35.0 - this image does not change fs.nr_open, as it was built for v0.31.0. Run sysctl fs.nr_open to verify that the setting is unchanged.
Now, delete the cluster with kind delete cluster and start another with kind create cluster --image kindest/node:v1.35.1 - this image is built for v0.32.0. Run sysctl fs.nr_open and see that fs.nr_open has been maxed.
To test the resulting startup delay in varnish, run kubectl create deployment varnish --image wodby/varnish:6 - this application will take a long time to get to a "VCL compiled" log statement if the fs.nr_open setting is too high.
Anything else we need to know?:
I originally came across this issue, as systemd on some systems also maximizes fs.nr_open, which gave me some headaches trying to replicate the issue on other systems. Ubuntu 24.04 does not max fs.nr_open on startup, but Ubuntu 26.04 does. It is likely that for 24.04, systemd was compiled with -Dbump-proc-sys-fs-nr-open=false.
Environment:
- kind version: v0.31.0 and v0.32.0
- Runtime info: docker 28.4.0
- OS: Ubuntu 24.04 and Ubuntu 26.04
- Kubernetes version: 1.35.0 and 1.35.1
- Any proxies or other special environment settings?: Nope
Source: kubernetes-sigs/kind