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" error while listing custom resources with multiple versions #2842

Open
kukacz opened this issue Aug 20, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@kukacz
Copy link

kukacz commented Aug 20, 2024




Describe the bug
When trying to display list of some types of custom resources as clusters.cluster.x-k8s.io or clusterclasses.cluster.x-k8s.io, the following error message is displayed instead:

Watcher failed for cluster.x-k8s.io/v1alpha3/clusters -- the server could not find the requested resource (get clusters.cluster.x-k8s.io)

Using kubectl CLI, for example kubectl get clusters.cluster.x-k8s.io works without issues.

The error seems to be related to custom resources with multiple .spec.versions used in CRD. I assume that out of the multiple versions, the one with .spec.versions[].served == true and highest in priority order described in https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning/#version-priority should be returned.

This issue is not present in previous versions as for example v0.31.8.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'crds'.
  2. Select CRD item which is known to have multiple .spec.versions records.
  3. Press Enter to display list of items of given kind.
  4. See error

Historical Documents
Record in k9s.log:

12:33PM DBG No DAO registry entry for "cluster.x-k8s.io/v1alpha3/clusters". Using generics!
12:33PM ERR Watcher failed for cluster.x-k8s.io/v1alpha3/clusters -- the server could not find the requested resource (get clusters.cluster.x-k8s.io) error="the server could not find the requested resource (get clusters.cluster.x-k8s.io)"

Note that in this case, instead of ClusterAPI v1beta1 API version the old v1alpha3 is used.

Expected behavior
List of resources is expected to be displayed.

Versions (please complete the following information):

  • OS: Ubuntu 22.04 inside WSL2
  • K9s: v0.32.5
  • K8s: v1.29.6
@kukacz kukacz changed the title "Watcher failed" error while listing selected custom resources "Watcher failed" error while listing custom resources with multiple versions Aug 20, 2024
@derailed derailed added the bug Something isn't working label Aug 22, 2024
pvivekvarma added a commit to pvivekvarma/k9s that referenced this issue Nov 10, 2024
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

2 participants