'Lens IDE errror: Unable to read client-cert

I'm running minikube in my WSL(Ubuntu distro). But whenever I tried to connect minikube through lens it shows me the error that "system cannot find the path specified." / Unable to read client-cert. What should I do, any suggestion?

enter image description here



Solution 1:[1]

I've not used minikube but I have used Lens. Looking at your error message the path to the certificates looks rather convoluted, so I'm wondering whether the config is wrong.

I would suggest opening a shell in WSL and seeing if you can find the files at those locations.

With a fresh shell, and you typing pwd I'd expect to see:

% pwd
/home/linux

If so, I'd try cd'ing into the next directory as shown in the error message and checking that the path exists, continuing from above for example:

% pwd
/home/linux
% cd .kube
% cd home
% cd linux
% cd .minikube
% cd profiles
% cd minikube
% ls -l

What I suspect will happen is one of the cd commands will return with:

cd <directory-name>: No such file or directory

which shows that the config path is incorrect.

If you know where your kubeconfig file lives then it might just be simpler to add a new cluster in Lens, browse directly to the kubeconfig file and start fresh.

Good luck, Tim

(I'm sorry if the cd suggestion above feels too simplistic but I don't know your level of experience so wouldn't want to offer an unhelpful answer.)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 trmatthe