ahmetb / kubectl-tree

kubectl plugin to browse Kubernetes object hierarchies as a tree 🎄 (star the repo if you are using)
Apache License 2.0
3.01k stars 127 forks source link

Could not find the cluster-scoped resource #26

Closed ryysud closed 4 years ago

ryysud commented 4 years ago

We are developing a Custom Controller and creating resources with the cluster-scoped CR set to OwnerReference, but kubectl tree doesn't work as bellow:

$ kubectl api-resources
NAME                              SHORTNAMES   APIGROUP                       NAMESPACED   KIND
samples                                        sample.example.org             false        Sample

$ kubectl tree samples sample -A
Error: failed to get samples/sample: the server could not find the requested resource
ahmetb commented 4 years ago

@feloy i think this is happening because of #22.

CRD here is not namespaced and user didn't specify -all-namespaces.

Maybe if KIND is not namespaced, we should remove namespace filter. Wdyt?