<p>I would  like to deploy Airflow locally on Minikube and have a local folder mounted for DAGs handling.</p>
<p>Airflow is deployed like this:</p>
<pre><code>helm install $AIRFLOW_NAME apache-airflow/airflow \
    --values values.yml \
    --set logs.persistence.enabled=true \
    --namespace $AIRFLOW_NAMESPACE \
    --kubeconfig ~/.kube/config
</code></pre>
<p>The <code>values.yml</code> looks like this:</p>
<pre><code>executor: KubernetesExecutor
config:
  core:
    dags_folder: /dags
webserver:
  extraVolumes:
    - name: dags
      hostPath:
        path: /path/dags
  extraVolumeMounts:
    - name: dags
      mountPath: /dags
</code></pre>
<p><code>kubectl describe pods airflow-webserver --kubeconfig ~/.kube/config  --namespace airflow</code>:</p>
<pre><code>Volumes:
  config:
    Type:      ConfigMap (a volume populated by a ConfigMap)
    Name:      airflow-airflow-config
    Optional:  false
  logs:
    Type:       PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
    ClaimName:  airflow-logs
    ReadOnly:   false
  dags:
    Type:          HostPath (bare host directory volume)
    Path:          /path/dags/
    HostPathType:  
  airflow-webserver-token-xtq9h:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  airflow-webserver-*
    Optional:    false
QoS Class:       BestEffort
</code></pre>
<p>The volume dags appears to be correctly mounted but remains empty.
What could cause this behaviour ?</p>
<p>Edit:
<code>kubectl describe pods airflow-scheduler-0 --kubeconfig ~/.kube/config --namespace airflow</code></p>
<pre><code>    Mounts:
      /opt/airflow/airflow.cfg from config (ro,path=&quot;airflow.cfg&quot;)
      /opt/airflow/dags from dags (rw)
      /opt/airflow/logs from logs (rw)
      /opt/airflow/pod_templates/pod_template_file.yaml from config (ro,path=&quot;pod_template_file.yaml&quot;)
      /var/run/secrets/kubernetes.io/serviceaccount from airflow-scheduler-token-9zfpv (ro)
</code></pre>
<pre><code>Volumes:
  config:
    Type:      ConfigMap (a volume populated by a ConfigMap)
    Name:      airflow-airflow-config
    Optional:  false
  dags:
    Type:          HostPath (bare host directory volume)
    Path:          /path/dags
    HostPathType:  
  logs:
    Type:       PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
    ClaimName:  airflow-logs
    ReadOnly:   false
  airflow-scheduler-token-9zfpv:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  airflow-scheduler-token-9zfpv
    Optional:    false
</code></pre>

<p>Assuming that you have some dags in /path/dags already, you should mount your dags folder to scheduler not to webserver (if you are using Airflow 2). Scheduler is the one to parse dags, webserver only displays them based on information stored in the DB so it does not actually need DAGs (it used to need it Airflow 1.10 without serialization)</p>
<p>Also I guess you should use LocalExecutor not KubernetesExecutor if you want to execute dags from local folder - then the <code>dags</code> mounted to scheduler will be available to the processes which are spawned from scheduler in the same container.</p>
<p>If you want to run Kubernetes Executor and want to mount host folder, I believe you will need to add it as a mount to pod template file of yours (you can generate such pod template file using airflow CLI</p>
<p>See <a href="https://airflow.apache.org/docs/apache-airflow/stable/executor/kubernetes.html#pod-template-file" rel="nofollow noreferrer">https://airflow.apache.org/docs/apache-airflow/stable/executor/kubernetes.html#pod-template-file</a></p>
