I'm using the PersistentVolume functionality for sharing VM directories with Pods. For example:
apiVersion: v1
kind: PersistentVolume
metadata:
name: psql-data-disk
spec:
accessModes:
- ReadWriteOnce
capacity:
storage: 1Gi
hostPath:
path: /data/psqldata
But I can't figure out how to delete the directory from the host VM so that I can reset the data. Minikube persists the /data/
directory across VM reboots, but doesn't document where it's storing it.
If you kubectl delete PersistentVolume psql-data-disk
it doesn't delete any of the contents in the directory itself, it just deletes the K8s resource.
I'm using the docker-machine-driver-xhyve
driver installed via brew on OSX Sierra.
Ugh, I hadn't known about the
minikube ssh
command to get into the VM. So I just went in there and deleted the directory.