Trying to start minikube on windows 10 but it is failing with below given error. Tried deleting context, config file itself and recreated it but issue persists.
X Failed to setup kubeconfig: writing kubeconfig: Error writing file C:\Users\<user name>/.kube/config: error acquiring lock for C:\Users\<user name>/.kube/config: timeout acquiring mutex
Thank you.
I was having the same problem with version 1.6.0 but it was solved after I upgraded to version 1.6.1.
I just had the same problem. Most likely is an issue of version 1.6.0 which was released today. Downgrade to 1.5.2 for the time being.
I have just downloaded minikube-windows-amd64.exe, copied to my PATH
and started with 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>
It seems that the issue is with today's (Dec-11-2019) release of 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
I have submitted it on minikube GitHub Issue Tracker.
EDIT 12-Dec-2019:
v1.6.1 is now available with this bug fixed: https://github.com/kubernetes/minikube/releases/tag/v1.6.1