lensapp / lens

Lens - The way the world runs Kubernetes
https://k8slens.dev/
MIT License
22.45k stars 1.45k forks source link

Lens not working on BigSur + corporate proxy #1494

Open vandreykiv opened 3 years ago

vandreykiv commented 3 years ago

Describe the bug When corporate proxy configured lens didn't show any information about cluster resources.

To Reproduce Steps to reproduce the behavior:

  1. Go to cluster settings and set HTTP proxy
  2. Run application
  3. Open workloads
  4. See error

image

Expected behavior List of workloads, pods, deployments, etc.

Environment (please complete the following information):

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

❯ /Applications/Lens.app/Contents/MacOS/Lens
info: [IPC]: setup channel "cluster:activate"
info: [IPC]: setup channel "cluster:set-frame-id"
info: [IPC]: setup channel "cluster:refresh"
info: [IPC]: setup channel "cluster:disconnect"
info: [IPC]: setup channel "cluster:install-feature"
info: [IPC]: setup channel "cluster:uninstall-feature"
info: [IPC]: setup channel "cluster:upgrade-feature"
info: 🚀 Starting Lens from "/Users/vandreyk/Library/Application Support/Lens"
info: Checking for update
info: [STORE]: LOADED from /Users/vandreyk/Library/Application Support/Lens/config.json
info: [STORE]: LOADED from /Users/vandreyk/Library/Application Support/Lens/lens-cluster-store.json
info: [STORE]: LOADED from /Users/vandreyk/Library/Application Support/Lens/lens-workspace-store.json
info: [CLUSTER-MANAGER]: init cluster {"id":"324b228e-072c-456e-a7da-7102576b45c8","name":"dev-eks-cluster","initialized":false,"ready":false,"online":false,"accessible":false,"disconnected":true}
info: [CLUSTER]: "dev-eks-cluster" init success {"id":"324b228e-072c-456e-a7da-7102576b45c8","context":"dev-eks-cluster","apiUrl":"https://<REDACTED>"}
info: [CLUSTER-MANAGER]: init cluster {"id":"dfec318f-b7ab-4135-8ed7-7615ec3bcb13","name":"amr-gdc-cluster","initialized":false,"ready":false,"online":false,"accessible":false,"disconnected":true}
info: [CLUSTER]: "amr-gdc-cluster" init success {"id":"dfec318f-b7ab-4135-8ed7-7615ec3bcb13","context":"<REDACTED>","apiUrl":"https://<REDACTED>"}
info: [CLUSTER-MANAGER]: init cluster {"id":"66fc770c-b2c3-4d46-b845-092aa4727faf","name":"stage-eks-cluster","initialized":false,"ready":false,"online":false,"accessible":false,"disconnected":true}
info: [CLUSTER]: "stage-eks-cluster" init success {"id":"66fc770c-b2c3-4d46-b845-092aa4727faf","context":"stage-eks-cluster","apiUrl":"<REDACTED>"}
info: [CLUSTER-MANAGER]: init cluster {"id":"77525ccc-3edc-4b20-a8fa-44649cee2bac","name":"prod-eks-cluster","initialized":false,"ready":false,"online":false,"accessible":false,"disconnected":true}
info: [CLUSTER]: "prod-eks-cluster" init success {"id":"77525ccc-3edc-4b20-a8fa-44649cee2bac","context":"prod-eks-cluster","apiUrl":"<REDACTED>"}
info: LensProxy server has started at http://localhost:55520
info: Update for version 3.6.9 is not available (latest version: 3.6.9, downgrade is disallowed).
info: [CLUSTER]: activate {"id":"324b228e-072c-456e-a7da-7102576b45c8","name":"dev-eks-cluster","initialized":true,"ready":false,"online":false,"accessible":false,"disconnected":true}
info: [CLUSTER]: bind events {"id":"324b228e-072c-456e-a7da-7102576b45c8","name":"dev-eks-cluster","initialized":true,"ready":false,"online":false,"accessible":false,"disconnected":true}
info: [CLUSTER]: reconnect {"id":"324b228e-072c-456e-a7da-7102576b45c8","name":"dev-eks-cluster","initialized":true,"ready":false,"online":false,"accessible":false,"disconnected":true}
info: [KUBE-AUTH]: out-channel "kube-auth:324b228e-072c-456e-a7da-7102576b45c8" {"data":"Authentication proxy started\n","meta":{"id":"324b228e-072c-456e-a7da-7102576b45c8","name":"dev-eks-cluster","initialized":true,"ready":false,"online":false,"accessible":false,"disconnected":true}}
error: failed to request selfSubjectAccessReview: HttpError: HTTP request failed
info: [CLUSTER]: refresh {"id":"324b228e-072c-456e-a7da-7102576b45c8","name":"dev-eks-cluster","initialized":true,"ready":true,"online":true,"accessible":true,"disconnected":false}
error: failed to request selfSubjectAccessReview: HttpError: HTTP request failed
info: [CLUSTER]: refresh {"id":"324b228e-072c-456e-a7da-7102576b45c8","name":"dev-eks-cluster","initialized":true,"ready":true,"online":true,"accessible":true,"disconnected":false}
error: failed to request selfSubjectAccessReview: HttpError: HTTP request failed
info: [CLUSTER]: refresh {"id":"324b228e-072c-456e-a7da-7102576b45c8","name":"dev-eks-cluster","initialized":true,"ready":true,"online":true,"accessible":true,"disconnected":false}
error: failed to request selfSubjectAccessReview: HttpError: HTTP request failed
^Cinfo: Closing proxy server
info: [CLUSTER]: disconnect {"id":"324b228e-072c-456e-a7da-7102576b45c8","name":"dev-eks-cluster","initialized":true,"ready":true,"online":true,"accessible":true,"disconnected":false}
info: [CLUSTER]: unbind events {"id":"324b228e-072c-456e-a7da-7102576b45c8","name":"dev-eks-cluster","initialized":true,"ready":true,"online":true,"accessible":true,"disconnected":false}
info: [CLUSTER]: disconnect {"id":"dfec318f-b7ab-4135-8ed7-7615ec3bcb13","name":"amr-gdc-cluster","initialized":true,"ready":false,"online":false,"accessible":false,"disconnected":true}
info: [CLUSTER]: unbind events {"id":"dfec318f-b7ab-4135-8ed7-7615ec3bcb13","name":"amr-gdc-cluster","initialized":true,"ready":false,"online":false,"accessible":false,"disconnected":true}
info: [CLUSTER]: disconnect {"id":"66fc770c-b2c3-4d46-b845-092aa4727faf","name":"stage-eks-cluster","initialized":true,"ready":false,"online":false,"accessible":false,"disconnected":true}
info: [CLUSTER]: unbind events {"id":"66fc770c-b2c3-4d46-b845-092aa4727faf","name":"stage-eks-cluster","initialized":true,"ready":false,"online":false,"accessible":false,"disconnected":true}
info: [CLUSTER]: disconnect {"id":"77525ccc-3edc-4b20-a8fa-44649cee2bac","name":"prod-eks-cluster","initialized":true,"ready":false,"online":false,"accessible":false,"disconnected":true}
info: [CLUSTER]: unbind events {"id":"77525ccc-3edc-4b20-a8fa-44649cee2bac","name":"prod-eks-cluster","initialized":true,"ready":false,"online":false,"accessible":false,"disconnected":true}

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.

Not related as kubctl works without any issues
❯ kubectl version --context dev-eks-cluster
Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.4", GitCommit:"d360454c9bcd1634cf4cc52d1867af5491dc9c5f", GitTreeState:"clean", BuildDate:"2020-11-12T01:09:16Z", GoVersion:"go1.15.4", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"17+", GitVersion:"v1.17.12-eks-7684af", GitCommit:"7684af4ac41370dd109ac13817023cb8063e3d45", GitTreeState:"clean", BuildDate:"2020-10-20T22:57:40Z", GoVersion:"go1.13.15", Compiler:"gc", Platform:"linux/amd64"}
vandreykiv commented 3 years ago

When I connect to cluster and do vim $KUBECONFIG in terminal and replace config with one from kubeconfig file it works but after restart lens replca it back to "proxy" and we have picture as above. Could you help me understand how to fix this?

Thanks.

Nokel81 commented 3 years ago

Is this related to #1022 and thus a duplicate of #2390?