lens icon indicating copy to clipboard operation
lens copied to clipboard

Can not install bundled Lens Metrics

Open StephenPCG opened this issue 4 months ago • 3 comments

Describe the bug In a new k8s cluster, I try to install bundled Lens Metrics, but nothing happened, the button shows 'Applying', but in the cluster, lens-metrics namespace is not created. When I navigated to other settings tab and navigate back, it also displays as nothing was installed.

Image

To Reproduce Steps to reproduce the behavior:

  1. Right click on a cluster, click 'Show cluster settings'
  2. Navigate to 'Lens Metrics' tab
  3. Turn on PROMETHEUS, KUBE STATE METRICS, NODE EXPORTER, and click Apply button
  4. It show it is applying, but actually nothing happened.
  5. Wait some time, confirm nothing actually happened, navigate away and back, retry, and also no luck.

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • Lens Version: 2025.8.121212-latest
  • OS: macOS Sequoia 15.6, Apple Chip
  • Installation method (e.g. snap or AppImage in Linux): Originally installed with homebrew, and app upgraded itself several times.

Logs: When you run the application executable from command line you will see some logging output. Please paste them here:

I don't know how to find logs, the main purpose for this issue is to know how to find coresponding logs and figure out what has went wrong.

Kubeconfig: Quite often the problems are caused by malformed kubeconfig which the application tries to load. Please share your kubeconfig, remember to remove any secret and sensitive information.

I believe this is not caused by kubeconfig. It works perfectly with kubectl, the serviceaccount has admin priviledge (bounded to cluster-admin cluster role), with kubectl, I can create any resources (namespace, deployment, etc.). In Lens App, I can also view all pods.

BTW, I just find that, when I try to get a pod shell, it stucks in 'Connecting ...' state:

Image

Does it indicate that lens can not create resource in this cluster for some reason?

Additional context Add any other context about the problem here.

StephenPCG avatar Aug 20 '25 04:08 StephenPCG

Dear @StephenPCG

Thanks for reporting a bug. We will be sure to update our development team about your request.

Warm regards, Oleksandr from Lens

koshevka avatar Aug 20 '25 06:08 koshevka

You can open Help -> Export Support Logs to find the logs.

panuhorsmalahti avatar Aug 20 '25 07:08 panuhorsmalahti

Thanks!

I think I found the problem. Lens App is downloading kubectl, my network to the downloading source is very slow, it may need to take more than an hour to finish download, and also it may fail in the middle. Lens App UI does not show this.

This also explains why this only happen with my new cluster, since the new cluster runs a new version of kubernetes, for which kubectl was not downloaded before.

When I turn off kubectl binary download in global settings, everything works fine.

StephenPCG avatar Aug 20 '25 09:08 StephenPCG