<p>I am looking to execute </p>

<pre><code>apt install tcpdump
</code></pre>

<p>but facing permission denial, upon looking to set the directory to root, it is asking me for password and I don't know from where to get that password.</p>

<p>I installed nginx helm chart from stable/nginx repository with no RBAC</p>

<p>Please see snapshot for details on error, while I tried installing tcpdump in the pod after doing ssh into it.<a href="https://i.stack.imgur.com/KVjcA.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KVjcA.jpg" alt="enter image description here"></a></p>

Tushar Mahajan
<p>In <a href="https://kubernetes.github.io/ingress-nginx/troubleshooting/#using-gdb-with-nginx" rel="nofollow noreferrer">Using GDB with Nginx</a>, you can find troubleshooting section:</p>

<p>Shortly:</p>

<ul>
<li>find the node where your pod is running (<code>kubectl get pods -o wide</code>)</li>
<li>ssh into the node</li>
<li>find the docker_ID for this image (<code>docker ps | grep pod_name</code>)</li>
<li>run <code>docker exec -it --user=0 --privileged docker_ID bash</code></li>
</ul>

<p>Note: <a href="https://docs.docker.com/engine/reference/run/" rel="nofollow noreferrer">Runtime privilege and Linux capabilities</a> </p>

<blockquote>
  <p>When the operator executes docker run --privileged, Docker will enable access to all devices on the host as well as set some configuration in AppArmor or SELinux to allow the container nearly all the same access to the host as processes running outside containers on the host. Additional information about running with --privileged is available on the Docker Blog.</p>
</blockquote>

<p>Additional resources:</p>

<ul>
<li><a href="https://suraj.io/post/root-in-container-root-on-host/" rel="nofollow noreferrer">ROOT IN CONTAINER, ROOT ON HOST</a> </li>
</ul>

<p>Hope this help.</p>
