[英]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.我看过其他关于类似主题的帖子,例如Kubernetes 如何在 wsl2 支持的环境中正确安装 windows 路径,但我无法让 persistentVolume 工作。
I am running a Windows 11 machine, WSL2.我正在运行 Windows 11 机器,WSL2。 I have Ubuntu running inside WSL2, with docker, minikube and kubectl all installed.
我在 WSL2 中运行了 Ubuntu,并安装了 docker、minikube 和 kubectl。 I do NOT have Docker for Windows Desktop installed as it now requires a license for commercial use.
我没有为 Windows Desktop 安装 Docker,因为它现在需要商业使用许可证。
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.当我查看 /run 文件夹时,我没有桌面文件夹,因此我找到的所有文章中给出的路径都不起作用。 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.
创建 pv 和 pvc 时我没有收到任何错误,它说它已绑定,但没有文件显示,尽管我可以在 pod 内的相应文件夹中看到文件。
Is there some different workaround when you do not have Docker Desktop installed?当您没有安装 Docker Desktop 时,是否有一些不同的解决方法?
Alan, I have a similar setup: Ubuntu, docker, minikube installed inside WSL2, and no Docker Desktop, but on Windows 10 machine. Alan, I have a similar setup: Ubuntu, docker, minikube installed inside WSL2, and no Docker Desktop, but on Windows 10 machine.
minikube mount /mnt/c/Users/your_user:/host
This mounts your windows host dir c:/Users/your_user to /host dir inside minikube node.这会将您的 windows 主机目录 c:/Users/your_user 挂载到 minikube 节点内的 /host 目录。
minikube start --mount-string /mnt/c/Users/your_user:/host --mount
You can find more minikube mount
options here .您可以在此处找到更多
minikube mount
选项。
Let me know if this works on Windows 11, please.请让我知道这是否适用于 Windows 11。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.