<p>I'm running a MySQL image in my one-node cluster for local testing purposes only.</p>
<p>I would like to be able to delete the database when needed to have the image build a new database from scratch, but I can't seem to find where or how I can do that easily.</p>
<p>I am on Windows, using Docker Desktop to manage my Docker images and Kubernetes cluster with WSL2. The pod uses a persistent volume/claim which can be seen below.</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: v1
kind: PersistentVolume
metadata:
  name: mysql-pv-volume
  labels:
    type: local
spec:
  storageClassName: manual
  capacity:
    storage: 3Gi
  accessModes:
    - ReadWriteOnce
  hostPath:
    path: &quot;/var/MySQLTemp&quot;
    type: DirectoryOrCreate
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: mysql-pv-claim
spec:
  storageClassName: manual
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 3Gi
</code></pre>
<p>The volume part of my deployment looks like:</p>
<pre class="lang-yaml prettyprint-override"><code>        volumeMounts:
        - name: mysql-persistent
          mountPath: /var/lib/mysql
      volumes:
      - name: mysql-persistent
        persistentVolumeClaim:
          claimName: mysql-pv-claim
</code></pre>
<p>Is there a command I can use to either see where this database is stored on my Windows or WSL2 machine so I can delete it manually, or delete it from the command line through <code>docker</code> or <code>kubectl</code>?</p>

Ral
<p>A brilliant work-around to Docker Desktop's inability to easily support persistent volumes using WSL2 and KinD when the host file system is Windows.</p>
<p>I could not get hostpath to work either. To make this a generic solution when using KinD and Docker Desktop, I simply modified this entry:</p>
<p>/run/desktop/mnt/host/c/MySQLTemp
to
/run/desktop/mnt/host/v &lt;- The windows drive I wanted to access and it worked!</p>
<p>Kudos to Ral :-)</p>
