<p>I am trying create a bunch of pods, services and deployment using Kubernetes, but keep hitting the following errors when I run the <code>kubectl describe</code> command.</p>

<p><code>for "POD" with RunContainerError: "runContainer: API error (500): Cannot start container bbdb58770a848733bf7130b1b230d809fcec3062b2b16748c5e4a8b12cc0533a: [8] System error: too many open files in system\n"</code></p>

<p>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?</p>

<p>You can confirm which process is hogging file descriptors by running:</p>

<pre><code>lsof | awk '{print $2}' | sort | uniq -c | sort -n
</code></pre>

<p>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/</p>

<pre><code>ps -p &lt;pid&gt;
</code></pre>

<p>If the main hogs are docker/kubernetes, then I would recommend following along on the <a href="https://github.com/kubernetes/kubernetes/issues/13385#issuecomment-138576499" rel="noreferrer">issue</a> that caesarxuchao referenced.</p>
