Open
Description
What Happened?
When deleting PVCs and PVs on a multi-node minikube cluster, these resources are reported as non-existent by kubectl get pvc
and kubectl get pv
but the actual files remain on disk under /var/lib/docker/volumes/minikube-m02/_data/hostpath-provisioner/...
Thus the old data can be unexpectedly resurrected when you redeploy a StatefulSet, for example.
How to reproduce
- Create a minikube cluster with at least two nodes
- Create a StatefulSet with persistent volumes
- Delete the StatefulSet
- Delete all the PVs and PVCs (kubectl. Lens whatever)
- Search for files in /var/lib/docker/volumes/minikube-m02/_data/hostpath-provisioner/ - they still will be there
What I expected
Those on-disk files should be wiped out when the corresponding PVs disappear from kubectl get pv
output.
Workaround
Delete the files manually or use a single-node minikube cluster.
Attach the log file
This is minikube version: v1.24.0 on Manjaro Linux. The cluster was created as
minikube start --disk-size=50g --nodes=2 --cni="calico" --insecure-registry="192.168.38.0/24"
Operating System
Other
Driver
Docker
Metadata
Metadata
Assignees
Labels
Issues related to multinode clustersIssues related to multinode clustersCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.Indicates that an issue or PR should not be auto-closed due to staleness.Indicates that an issue or PR should not be auto-closed due to staleness.Important over the long term, but may not be staffed and/or may need multiple releases to complete.Important over the long term, but may not be staffed and/or may need multiple releases to complete.