Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Watcher failed for apps/v1/deployments #1413

Closed
bpoetzschke opened this issue Jan 5, 2022 · 10 comments
Closed

Watcher failed for apps/v1/deployments #1413

bpoetzschke opened this issue Jan 5, 2022 · 10 comments
Labels
bug Something isn't working

Comments

@bpoetzschke
Copy link

bpoetzschke commented Jan 5, 2022

I recently updated to v0.25.18 and I started to receive the following error when trying to change to deployments.

ERR component init failed for "Deployment" error="`list access denied for user on \"\":apps/v1/deployments"
ERR Watcher failed for apps/v1/deployments -- [list watch] access denied on resource "":"apps/v1/deployments"

I also got a similar message when trying to access pods or other resources. Furthermore, I verified my general k8s access with kubectl and it worked.

I downgraded now to v0.25.8 and do not experience the issue anymore.

mac: 12.1 (21C52)
go version go1.17.5 darwin/amd64

@bpoetzschke bpoetzschke changed the title [list watch] access denied on resource "":"apps/v1/deployments" Watcher failed for apps/v1/deployments Jan 5, 2022
@derailed derailed added the bug Something isn't working label Jan 12, 2022
@adrobisch
Copy link

adrobisch commented Jan 14, 2022

This seems to be kubernetes version related, k9s v0.25.18 works still fine on a v1.19.14 cluster but fails with the watcher error on a v1.20.11 cluster

I went backwards version by version: v0.25.13 is the last version that works on the v1.20 cluster.

@mug-3-n
Copy link

mug-3-n commented Feb 25, 2022

Hi,

Same issue for v1.21.1 K8s cluster.

@adrobisch
Copy link

I don't think anymore that this is cluster related, deleting .config/k9s/config.yml can fix this.
This was tested with a gcloud access config on GKE.

@mug-3-n
Copy link

mug-3-n commented Feb 28, 2022

Hi,

I confirm the observation of @adrobisch.
By changing the environment variable KUBECONFIG, the problem occurs.
Then deleting the .config/k9s/config.yml file temporarily fixes the problem until the next KUBECONFIG change.

@davic80
Copy link

davic80 commented Jun 17, 2022

Same issue with k8s v1.20.11

@tataue
Copy link

tataue commented Jul 7, 2022

In my case, k9s generate .config/k9s/config.yml and add default to the active namespace, which however my config does not have the permission to access.

just fix the .config/k9s/config.yml and everything just fine.

@dmlond
Copy link

dmlond commented Jul 29, 2022

I found that you can launch k9s with a specific context that you have created with kubectl, and it should not only work, but change your .config/k9s/config.yml active namespace

k9s --context $context

@obok
Copy link

obok commented Apr 3, 2023

Deleting config didn't help in my case.
However setting namespace explicitly in my context (as suggested in a separate issue) helped.

kubectl config set-context --current --namespace=default

@slimus
Copy link
Collaborator

slimus commented Apr 3, 2023

Hi @bpoetzschke! Can I close this issue? You can create a new one with more details if you still facing this (or another) problem!

@bpoetzschke
Copy link
Author

@slimus it seems the issue no longer persists for me with an upgraded k8s version and the latest version of the k9s.
So I will close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants