<p>I know where the location is by default which is under <code>/var/lib/kubelet</code></p>

<p>However I don't want to depend on this knowledge. I'd like to get the location using command line or checking some config file (which hopefully is stored in a more permanent location).</p>

<p>Is there a way to determine where the location is? if indeed changed by the user?</p>

Jeff Saremi
<p>So it depends how the <code>root-dir</code> parameter was applied to the kubelet:</p>

<p>F.e you should see this in <code>systemctl status kubelet</code>.</p>

<p>Another approach is to search for KubeletRootDir <code>journalctl -u kubelet | grep KubeletRootDir</code> </p>

<p>So please use <a href="https://stackoverflow.com/a/46526490/11207414">this approach</a>  <code>-root-dir by default = /var/lib/kubelet/</code></p>

<pre><code>sudo ls -l /root-dir/`kubectl get pod -n mynamespace mypod -o 'jsonpath={.metadata.uid}'`/volumes/kubernetes.io~empty-dir/monted_volume
</code></pre>

<p>Hope this help.</p>
