<p>I am trying to mount dags folder to be able to run a python script inside of the KubernetesPodOperator on Aiflow, but can't figure out how to do it. In production I would like to do it in Google Composer. Here is my task:</p>
<pre><code>kubernetes_min_pod = KubernetesPodOperator(
    task_id='pod-ex-minimum',
    cmds=[&quot;bash&quot;, &quot;-c&quot;],
    arguments=[&quot;cd /usr/local/tmp&quot;],
    namespace='default',
    image='toru2220/scrapy-chrome:latest',
    is_delete_operator_pod=True,
    get_logs=True,
    in_cluster=False,
    volumes=[
        Volume(&quot;my-volume&quot;, {&quot;persistentVolumeClaim&quot;: {&quot;claimName&quot;: &quot;my-volume&quot;}})
    ],
    volume_mounts=[
        VolumeMount(&quot;my-volume&quot;, &quot;/usr/local/tmp&quot;, sub_path=None, read_only=False)
    ],
)
</code></pre>
<p>I am trying to understand what is the easiest way to mount the current folder where dag is?</p>

<p>As per this <a href="https://cloud.google.com/composer/docs/composer-2/cloud-storage" rel="nofollow noreferrer">doc</a>, when you create an environment, Cloud Composer creates a Cloud Storage bucket and associates the bucket with your environment. The name of the bucket is based on the environment region, name, and a random ID such as “us-central1-b1-6efannnn-bucket”. Cloud Composer stores the source code for your workflows (DAGs) and their dependencies in specific folders in Cloud Storage and uses <a href="https://cloud.google.com/storage/docs/gcs-fuse" rel="nofollow noreferrer">Cloud Storage FUSE</a> to map the folders to the Airflow instances in your Cloud Composer environment.</p>
<p>The Cloud Composer runs on top of a GKE cluster with all the DAGs, tasks, and services running on a single node pool. As per your requirement, you are trying to mount a DAGs folder in your code, which is already mounted in the Airflow pods under “<strong>/home/airflow/gcs/dags</strong>” path. Please refer to this <a href="https://cloud.google.com/composer/docs/how-to/using/using-kubernetes-pod-operator#begin" rel="nofollow noreferrer">doc</a> for more information about KubernetesPodOperator in Cloud Composer.</p>
