From 5db8f1eb43b05be0f45f71a3b4b977547731ac78 Mon Sep 17 00:00:00 2001 From: Emmanuel Kasper Date: Thu, 2 Jan 2025 08:59:20 +0100 Subject: [PATCH] Add FAQ entry about 'too many open files' Pod error This is based on https://kind.sigs.k8s.io/docs/user/known-issues/#pod-errors-due-to-too-many-open-files and was also mentioned in https://00formicapunk00.wordpress.com/2024/12/10/too-many-open-files-in-minikube-pod/ --- site/content/en/docs/faq/_index.md | 31 ++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/site/content/en/docs/faq/_index.md b/site/content/en/docs/faq/_index.md index 13677ad58899..290523c82903 100644 --- a/site/content/en/docs/faq/_index.md +++ b/site/content/en/docs/faq/_index.md @@ -203,3 +203,34 @@ sudo mkdir -p "$CNI_PLUGIN_INSTALL_DIR" sudo tar -xf "$CNI_PLUGIN_TAR" -C "$CNI_PLUGIN_INSTALL_DIR" rm "$CNI_PLUGIN_TAR" ``` + +## How to increase open files limit for minikube + +When using a container-based driver (docker, podman)) and you are creating multiple nodes, like when creating a [Highly Available Control Plane](https://minikube.sigs.k8s.io/docs/tutorials/multi_control_plane_ha_clusters/) you may see pods in Error status using the `kubectl get po -A` command. + +Inspecting the logs of a Pod shows a "too many open files" Linux error: + +```shell +minikube kubectl -- logs -n kube-system kube-proxy-84gm6 +E1210 11:50:42.117036 1 run.go:72] "command failed" err="failed complete: too many open files" +``` +This can be fixed by increasing the number of inotify watchers on the host where you run minikube: + +```shell +# cat > /etc/sysctl.d/minikube.conf <