ahmetb / kubectl-tree

kubectl plugin to browse Kubernetes object hierarchies as a tree 🎄 (star the repo if you are using)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Could not find the cluster-scoped resource

ryysud opened this issue · comments

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

@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?