尝试在Windows 10上启动minikube,但由于以下给定的错误而失败。尝试删除上下文,配置文件本身并重新创建它,但问题仍然存在。
X无法设置kubeconfig:编写kubeconfig:Error writing file C:\Users\<user name>/.kube/config: error acquiring lock for C:\Users\<user name>/.kube/config: timeout acquiring mutex
谢谢。
答案 0 :(得分:3)
我刚刚下载了minikube-windows-amd64.exe,已复制到我的PATH
并从minikube start --vm-driver=virualbox
开始。
C:\WINDOWS\system32>minikube start --vm-driver=virtualbox
* minikube v1.5.2 on Microsoft Windows 10 Enterprise 10.0.18362 Build 18362
* Downloading VM boot image ...
minikube-v1.5.1.iso: 143.76 MiB / 143.76 MiB [] 100.00% 10.15 MiB
* Creating virtualbox VM (CPUs=2, Memory=2000MB, Disk=20000MB) ...
* Preparing Kubernetes v1.16.2 on Docker '18.09.9' ...
* Downloading kubeadm v1.16.2
* Downloading kubelet v1.16.2
* Pulling images ...
* Launching Kubernetes ...
* Waiting for: apiserver
* Done! kubectl is now configured to use "minikube"
C:\WINDOWS\system32>minikube status
host: Running
kubelet: Running
apiserver: Running
kubeconfig: Configured
C:\WINDOWS\system32>
问题似乎与今天(2019年12月11日)的v1.6.0版本有关。
C:\WINDOWS\system32>minikube start --vm-driver=virtualbox
* minikube v1.6.0 on Microsoft Windows 10 Enterprise 10.0.18362 Build 18362
* Selecting 'virtualbox' driver from user configuration (alternates: [hyperv])
* Tip: Use 'minikube start -p <name>' to create a new cluster, or
'minikube delete' to delete this one.
* Using the running virtualbox "minikube" VM ...
* Waiting for the host to be provisioned ...
* Preparing Kubernetes v1.17.0 on Docker '19.03.5' ...
*
X Failed to setup kubeconfig: writing kubeconfig: Error writing file
C:\Users\<username>/.kube/config: error acquiring lock for
C:\Users\<username>/.kube/config: timeout acquiring mutex
*
* Sorry that minikube crashed. If this was unexpected, we would love
to hear from you:
- https://github.com/kubernetes/minikube/issues/new/choose
我已在minikube GitHub Issue Tracker上提交了它。
编辑2019年12月12日:
v1.6.1现在可解决此错误:https://github.com/kubernetes/minikube/releases/tag/v1.6.1
答案 1 :(得分:0)
我只是遇到了同样的问题。最有可能是今天发布的版本1.6.0的问题。暂时降级至1.5.2。
答案 2 :(得分:0)
我在1.6.0版中也遇到了同样的问题,但是在升级到1.6.1版后就解决了。