Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FAQ entry about too many open files errors when using a container-based driver #20168

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions site/content/en/docs/faq/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<EOF
fs.inotify.max_user_watches = 524288
fs.inotify.max_user_instances = 512
EOF
```

```shell
# sysctl --system
...
* Applying /etc/sysctl.d/minikube.conf ...
* Applying /etc/sysctl.conf ...
...
fs.inotify.max_user_watches = 524288
fs.inotify.max_user_instances = 512
```

After increasing the number of watchers, restart the minikube cluster and the error should disappear.