clusterpedia
clusterpedia copied to clipboard
An unexpected error occured when getting resources with a fake cluster name
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
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.
@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
@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
@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
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
/assign