clusterpedia icon indicating copy to clipboard operation
clusterpedia copied to clipboard

An unexpected error occured when getting resources with a fake cluster name

Open 27149chen opened this issue 3 years ago • 5 comments

What happened?

when getting resources with a fake cluster name (which does not exist in clusterpedia) using clusterclient The following error is returned: no matches for kind "CustomResourceDefinition" in version "apiextensions.k8s.io/v1"

What did you expect to happen?

return a "cluster not found" error

How can we reproduce it (as minimally and precisely as possible)?

getting resources with a fake cluster name (which does not exist in clusterpedia) using clusterclient

Anything else we need to know?

No response

Clusterpedia Version

# replace the pod name of clusterpedia apiserver
$ kubectl -n clusterpedia-system exec {clusterpedia-apiserver-pod-name} -- apiserver --version=raw
# paste output here

# replace the pod name of clusterpedia clustersynchro-manager
$ kubectl -n clusterpedia-system exec {clustersynchro-manager-pod-name} -- clustersynchro-manager --version=raw
# paste output here

Host Kubernetes version

$ kubectl version
# paste output here

27149chen avatar Sep 28 '22 08:09 27149chen

Hi @27149chen, Thanks for opening an issue! We will look into it as soon as possible.

Details

Instructions for interacting with me using comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the gh-ci-bot repository.

clusterpedia-bot avatar Sep 28 '22 08:09 clusterpedia-bot

@27149chen no matches for kind "CustomResourceDefinition" no matches for kind "CustomResourceDefinition" that implies that the version of kubernetes you're using doesn't have the CRD type available. you need to confirm what version or flavor kube you have installed

qiuming520 avatar Sep 29 '22 11:09 qiuming520

@27149chen no matches for kind "CustomResourceDefinition" no matches for kind "CustomResourceDefinition" that implies that the version of kubernetes you're using doesn't have the CRD type available. you need to confirm what version or flavor kube you have installed

@qiuming520 Please read my description carefully, the problem is that this is a cluster which doesn't exist

27149chen avatar Sep 29 '22 13:09 27149chen

@qiuming520 Sorry, I find the problem is not in "collection resources", but in the clustered client, if I new a client using "ClusterConfigFor" with an invalid cluster name, and then use this client to list resources (for example, list crds), the error above is raised

27149chen avatar Sep 30 '22 14:09 27149chen

We do not currently return a specific error when a cluster does not exist.

It seems to make sense to tell the user that the requested cluster does not exist

Iceber avatar Oct 11 '22 05:10 Iceber

/assign

lengrongfu avatar Oct 25 '22 03:10 lengrongfu