When trying to enable Kubernetes on Docker Desktop I get this message:
The kubectl config cannot be modified while the lock is held. The lock has been held for a long time which means it may have leaked.
Unlock the config?
When I click unlock, it shows Kubernetes is starting at the bottom but it never goes into running state.
Any help is appreciated
I think I figured it out… after many Uninstall/Installs and deleting the docker folders there was no luck.
Following worked, but I dont know which one to be precise…
Delete the folder - C:\Users<Username>.kube (create a backup just in case)
Enabled the settings as shown below
In my case it is because my environment variable KUBECONFIG is something like %USERPROFILE%.kube\config, and with the help of docker terminal, I echoed “$env:KUBECONFIG” and see a different path (inside system32). Changing the path to without %USERPROFILE% macro worked for me.