lensapp / lens

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

Workloads is only showing the overview after the upgrade #7849

Open joelgriffiths opened 1 year ago

joelgriffiths commented 1 year ago

Describe the bug Workloads is only showing the overview after the upgrade

To Reproduce I just upgraded, and checked several environments. Only Overview is showing up in workloads. I am using 1.21.6 for the server (I know, it's a bit old). Network appears to be missing things as well. The only thing that looks complete is Custom Resources.

Using admin.conf for all environments.

Expected behavior See the components.

Screenshots Screen Shot 2023-06-15 at 1 10 03 PM

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:

Your logs go here...

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.

apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: stuff==
    server: https://kube-vip.dev.mydomain.com:6443
  name: k8s-homelab
contexts:
- context:
    cluster: k8s-homelab
    namespace: special
    user: kubernetes-admin
  name: kubernetes-admin@k8s-homelab
current-context: kubernetes-admin@k8s-homelab
kind: Config
preferences: {}
users:
- name: kubernetes-admin
  user:
    client-certificate-data: stuff==
    client-key-data: stuff=
your kubeconfig here

Additional context I don't know what to make of this. Lens is completely useless to me at the moment.

Nokel81 commented 1 year ago

@joelgriffiths Would you be able to try the following command and report the result

kubectl create -f - -o yaml << EOF
apiVersion: authorization.k8s.io/v1
kind: SelfSubjectRulesReview
spec:
  namespace: default
EOF
joelgriffiths commented 1 year ago

I did this with one of the devs. It gave me this, but I am definitely running as the cluster-admin.

apiVersion: authorization.k8s.io/v1
kind: SelfSubjectRulesReview
metadata:
  creationTimestamp: null
spec: {}
status:
  incomplete: false
  nonResourceRules:
  - nonResourceURLs:
    - /healthz
    - /livez
    - /readyz
    - /version
    - /version/
    verbs:
    - get
  - nonResourceURLs:
    - /api
    - /api/*
    - /apis
    - /apis/*
    - /healthz
    - /livez
    - /openapi
    - /openapi/*
    - /readyz
    - /version
    - /version/
    verbs:
    - get
  resourceRules:
  - apiGroups:
    - authorization.k8s.io
    resources:
    - selfsubjectaccessreviews
    - selfsubjectrulesreviews
    verbs:
    - create
joelgriffiths commented 1 year ago
> kubectl auth can-i list pods --namespace default
yes
joelgriffiths commented 1 year ago

Is there some place I can get the last version? Somebody sent me a link, but I received a 403 when I tried to get to it.

tianshangstar commented 11 months ago

The same issue for me, both lens(2023.11.131420-latest) and openlens(6.5.2-366), it happened suddenlly - it means the lens / openlens are both work fine for me before yesterday.

jim-docker commented 10 months ago

reproduced with Lens running for over a week, connected to cluster. This was in the main.log as the last entries:

error: [AUTHORIZATION-REVIEW]: failed to create access review: Error: connect ECONNREFUSED 127.0.0.1:59596 {"resourceAttributes":{"namespace":"kube-system","resource":"*","verb":"create"}}
error: [AUTHORIZATION-REVIEW]: failed to create access review: Error: connect ECONNREFUSED 127.0.0.1:59596 {"resourceAttributes":{"resource":"*","verb":"watch"}}

dev tools showed:

.
.
.
[KUBE-API-SPECIFICS]: watch (event-3) retried /api/v1/namespaces/kube-system/events?watch=1&resourceVersion=1514030
BrowserConsole.js:41 [KUBE-API-SPECIFICS]: watch (event-3) end /api/v1/namespaces/kube-system/events?watch=1&resourceVersion=1514030
BrowserConsole.js:41 [KUBE-API-SPECIFICS]: watch (event-3) retried /api/v1/namespaces/kube-system/events?watch=1&resourceVersion=1514070
BrowserConsole.js:41 [KUBE-API-SPECIFICS]: watch (event-3) end /api/v1/namespaces/kube-system/events?watch=1&resourceVersion=1514070
BrowserConsole.js:41 [KUBE-API-SPECIFICS]: watch (event-3) retried /api/v1/namespaces/kube-system/events?watch=1&resourceVersion=1514110
BrowserConsole.js:41 [KUBE-API-SPECIFICS]: watch (event-3) end /api/v1/namespaces/kube-system/events?watch=1&resourceVersion=1514110
BrowserConsole.js:41 [KUBE-API-SPECIFICS]: watch (event-3) retried /api/v1/namespaces/kube-system/events?watch=1&resourceVersion=1514150
BrowserConsole.js:41 [KUBE-API-SPECIFICS]: watch (event-3) end /api/v1/namespaces/kube-system/events?watch=1&resourceVersion=1514150
BrowserConsole.js:41 [KUBE-API-SPECIFICS]: watch (event-3) retried /api/v1/namespaces/kube-system/events?watch=1&resourceVersion=1514190
BrowserConsole.js:41 [KUBE-API-SPECIFICS]: watch (event-3) end /api/v1/namespaces/kube-system/events?watch=1&resourceVersion=1514190
BrowserConsole.js:41 [KUBE-API-SPECIFICS]: watch (event-3) retried /api/v1/namespaces/kube-system/events?watch=1&resourceVersion=1514230
BrowserConsole.js:41 [KUBE-API-SPECIFICS]: watch (event-3) end /api/v1/namespaces/kube-system/events?watch=1&resourceVersion=1514230
BrowserConsole.js:41 [KUBE-API-SPECIFICS]: watch (event-3) retried /api/v1/namespaces/kube-system/events?watch=1&resourceVersion=1514270
BrowserConsole.js:41 [KUBE-API-SPECIFICS]: watch (event-3) end /api/v1/namespaces/kube-system/events?watch=1&resourceVersion=1514270
BrowserConsole.js:41 [KUBE-API-SPECIFICS]: watch (event-3) retried /api/v1/namespaces/kube-system/events?watch=1&resourceVersion=1514310
BrowserConsole.js:41 [KUBE-API-SPECIFICS]: watch (event-3) end /api/v1/namespaces/kube-system/events?watch=1&resourceVersion=1514310
BrowserConsole.js:41 [KUBE-API-SPECIFICS]: watch (event-3) retried /api/v1/namespaces/kube-system/events?watch=1&resourceVersion=1514350
BrowserConsole.js:41 [KUBE-API-SPECIFICS]: watch (event-3) end /api/v1/namespaces/kube-system/events?watch=1&resourceVersion=1514350
BrowserConsole.js:41 [KUBE-API-SPECIFICS]: watch (event-3) retried /api/v1/namespaces/kube-system/events?watch=1&resourceVersion=1514390
BrowserConsole.js:41 [KUBE-API-SPECIFICS]: watch (event-3) end /api/v1/namespaces/kube-system/events?watch=1&resourceVersion=1514390
BrowserConsole.js:41 [KUBE-API-SPECIFICS]: watch (event-3) retried /api/v1/namespaces/kube-system/events?watch=1&resourceVersion=1514430
BrowserConsole.js:41 [KUBE-API-SPECIFICS]: watch (event-3) end /api/v1/namespaces/kube-system/events?watch=1&resourceVersion=1514430
BrowserConsole.js:41 [KUBE-API-SPECIFICS]: watch (event-3) retried /api/v1/namespaces/kube-system/events?watch=1&resourceVersion=1514470
BrowserConsole.js:41 [KUBE-API-SPECIFICS]: watch (event-3) end /api/v1/namespaces/kube-system/events?watch=1&resourceVersion=1514470
BrowserConsole.js:41 [KUBE-API-SPECIFICS]: watch (event-3) retried /api/v1/namespaces/kube-system/events?watch=1&resourceVersion=1514510
benm5678 commented 3 months ago

I saw the same after messing with the credentials, the fix was to set the default namespace via: kubectl config set-context --current --namespace=<insert-namespace>