Where is Kubernetes storage location of a Persistent Volume? Where is Kubernetes storage location of a Persistent Volume? kubernetes kubernetes

Where is Kubernetes storage location of a Persistent Volume?


Docker Desktop on a Mac runs a virtual machine to run docker inside. You're correct when you look at the hostPath.path - that's where it's stored. But because docker/Kubernetes is inside the VM, that's where the path is relative to.

To see this yourself is a little tricky, Docker Desktop doesn't provide a guide on getting inside the VM. The community has some options though. An easy way would be docker run -it --rm --privileged --pid=host justincormack/nsenter1. That command runs a container inside docker that gets you a shell on the VM containing the docker daemon.

As to where this is on your laptop, you can follow the docs about the disk image for the VM. Preferences > Resources > Advanced will show you where the disk image file is physically located on your laptop.