<p>I want to write some data into volume i.e one of the directory which is residing in this volume, I can exec a pod, but i am not aware how to check the attached volume and write data to it.</p>
<p>I can find the volumes and mount point using:</p>
<pre><code>kubectl describe pods pod-name
</code></pre>

<p>You can get the volumes mounted on the pod using the output of <code>kubectl describe pod</code> which has the <code>Mounts</code> section in each container's <code>spec</code>.</p>
<p>An example from the <a href="https://kubernetes.io/docs/tasks/debug-application-cluster/debug-application-introspection/#using-kubectl-describe-pod-to-fetch-details-about-pods" rel="nofollow noreferrer">docs</a>:</p>
<pre><code>Mounts:
  /var/run/secrets/kubernetes.io/serviceaccount from default-token-5kdvl (ro)`
</code></pre>
<p>You can then <code>exec</code> into the pod using <code>kubectl exec</code> and the <code>cd</code> to the directory you want to write data to.</p>
<p>Another option is to use <code>kubectl copy</code> command and you could read a related answer of mine <a href="https://stackoverflow.com/questions/66149037/can-we-run-an-executable-jar-file-inside-an-already-running-kubernetes-pod/66149285#66149285">here</a>.</p>
