<p>I have installed rancher desktop and created a Kubernetes pod.</p>
<p>Inside the pod I have installed Apache Airflow and created some DAG's tested and saved them.</p>
<p>When I exit rancher desktop and switch off my PC and restart rancher desktop next day all the data is lost which I saved inside the pod.</p>
<p>Can you please help how can we save the data even when we restart the rancher-desktop</p>

Ravi Podila
<p>Kubernetes pods are based on docker containers which are stateless by default, in order to create stateful applications on K8S, we use <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/" rel="nofollow noreferrer">persistent volumes</a> to store all the data we want to persist when the pod restart. So you need to add a persistent volumes by creating a <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/#reserving-a-persistentvolume" rel="nofollow noreferrer">persistent volume claim</a>, then <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/#claims-as-volumes" rel="nofollow noreferrer">load and mount the claim</a> to the Airflow container in the pod, and write the dags files to the mount path.</p>
