简体   繁体   中英

Minikube, WSL2, Windows 11, No Docker Desktop - Unable to create persistent Volume

I have seen other posts on a similar topic, such as Kubernetes how to correctly mount windows path in wsl2 backed environment but I cannot get a persistentVolume to work.

I am running a Windows 11 machine, WSL2. I have Ubuntu running inside WSL2, with docker, minikube and kubectl all installed. I do NOT have Docker for Windows Desktop installed as it now requires a license for commercial use.

When I look in the /run folder, I do not have a desktop folder so the paths given in all the articles I have found do not work. I get no errors when creating the pv and pvc and it says it is bound, but no files show up although I can see files in the corresponding folder inside the pod.

Is there some different workaround when you do not have Docker Desktop installed?

Alan, I have a similar setup: Ubuntu, docker, minikube installed inside WSL2, and no Docker Desktop, but on Windows 10 machine.

  • And I can mount windows dirs using this command:
minikube mount /mnt/c/Users/your_user:/host

This mounts your windows host dir c:/Users/your_user to /host dir inside minikube node.

  • Or you can do this by running this command before creating a new minikube cluster:
minikube start --mount-string /mnt/c/Users/your_user:/host --mount

You can find more minikube mount options here .

Let me know if this works on Windows 11, please.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM