OpenLens failing to start — Failed to start connection: ValidationError: “current-context” is not allowed to be empty

Laura Frolich
Nov 16, 2023

Starting from yesterday, Wednesday November 15th 2023, I sometimes get an error when clicking on any cluster in the “Catalog” in OpenLens. The error is: “Failed to start connection: ValidationError: “current-context” is not allowed to be empty”.

It turns out to be easy to fix, following advice in https://github.com/lensapp/lens/issues/7826. The error is caused by an empty string, “”, as value for the “current-context” parameter:

~/.kube/config file with empty string for the parameter current-context, which causes a bug when trying to open a cluster in OpenLens.

The fix is simply to open the file ~/.kube/config, finding the empty string “” value for current-context in the “contexts” section, and changing it to be non-empty, for example by adding a space. That is, just substitute the value “” with “ “.

--

--

Laura Frolich

I enjoy combining data sources and data science/engineering to deploy machine learning models that help make the world a better place.