Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save thuanpham582002/4c554ef07a80051c9b69483c564d86b1 to your computer and use it in GitHub Desktop.
Save thuanpham582002/4c554ef07a80051c9b69483c564d86b1 to your computer and use it in GitHub Desktop.
Pod errors due to “too many open files”
You may encounter that some pods fail to get running and the logs of these pods complain “too many open files”.
This may be caused by running out of inotify resources. Resource limits are defined by fs.inotify.max_user_watches and fs.inotify.max_user_instances system variables. For example, in Ubuntu these default to 8192 and 128 respectively, which is not enough to create multiple kind clusters with many pods.
To increase these limits temporarily run the following commands on the host:
sudo sysctl fs.inotify.max_user_watches=524288
sudo sysctl fs.inotify.max_user_instances=512
To make the changes persistent, edit the file /etc/sysctl.conf and add these lines:
fs.inotify.max_user_watches = 524288
fs.inotify.max_user_instances = 512
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment