由于系统中打开的文件太多,Kubernetes无法启动 [英] Kubernetes can't start due to too many open files in system
问题描述
我正在尝试使用Kubernetes创建一堆pod,服务和部署,但是当我运行 kubectl描述
命令时,会继续遇到以下错误。
I am trying create a bunch of pods, services and deployment using Kubernetes, but keep hitting the following errors when I run the kubectl describe
command.
对于POD与RunContainerError:runContainer:API错误(500):无法启动容器bbdb58770a848733bf7130b1b230d809fcec3062b2b16748c5e4a8b12cc0533a:[8]系统错误:系统中打开的文件太多\\ n
我已经终止了所有的pod,并尝试重新启动机器,但它并不能解决问题。我不是Linux专家,所以我只是想知道如何找到所有打开的文件并关闭它们?
I have already terminated all pods and try restarting the machine, but it doesn't solve the issue. I am not an Linux expert, so I am just wondering how shall find all the open files and close them?
推荐答案
你可以确认哪个进程正在通过运行文件描述符:
You can confirm which process is hogging file descriptors by running:
lsof | awk '{print $2}' | sort | uniq -c | sort -n
这将给你一个打开的FD计数的排序列表与进程的pid。然后你可以查找每个进程w /
That will give you a sorted list of open FD counts with the pid of the process. Then you can look up each process w/
ps -p <pid>
如果主要的猪是docker / kubernetes,那么我建议在问题,caesarxuchao引用。
If the main hogs are docker/kubernetes, then I would recommend following along on the issue that caesarxuchao referenced.
这篇关于由于系统中打开的文件太多,Kubernetes无法启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!