<p>I have a Pod which contains two containers - <em>nginx</em> and <em>busybox</em>. Now I want to access the files within <em>nginx</em> container from the <em>busybox</em> container, say doing 'ls /etc/nginx' in <em>busybox</em> container to list the files there. Is there any configuration in k8s pod to allow me to achieve this?</p>
<p>Below is my current pod yaml file.</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
  labels:
    run: nginxbusybox
  name: nginxbusybox
spec:
  shareProcessNamespace: true
  containers:
  - image: nginx
    name: nginx
  - image: busybox
    name: busybox
    command:
    - sleep
    - '86400'
</code></pre>
<p>P.S. This is for debugging a container which don't have the common linux tools within.</p>

user1726366
<p>OK, I've found a way to achieve this. By using the 'kubectl debug' and checking the /proc/1/root/, I could see the filesystem in the nginx container. Below's what this looks like.</p>
<p><a href="https://i.stack.imgur.com/MyuKy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MyuKy.png" alt="enter image description here" /></a></p>
