Closed danielpacak closed 4 years ago
It might be because it's cluster-scoped. Gotta check out the code, I don't think we'd have anything explicitly prevents this.
Actually yeah in query.go we explicitly skip non-namespaced CRDs. I am trying to remember why but there must've been a reason.
Thanks for checking @ahmetb I'd love to know what was the reason for skipping non-namespaced CRDs. IMO Having them displayed by tree would be very useful.
See #18 and #22 for context.
Apparently we used to query ALL resources in the cluster.
But now we query only the current namespace. However you should be able to get everything using --all-namespaces
.
Indeed! It works with the -A flag. Awesome @ahmetb . Thank you for a prompt reply and this amazing plugin đź’Ş
$ k tree node minikube -A
NAMESPACE NAME READY REASON AGE
Node/minikube True KubeletReady 30d
├─CISKubeBenchReport/minikube-1594737175 - 2d4h
├─CISKubeBenchReport/minikube-1594903596 - 5h49m
├─CSINode/minikube - 30d
kube-node-lease ├─Lease/minikube - 30d
kube-system ├─Pod/etcd-minikube True 30d
kube-system ├─Pod/kube-apiserver-minikube True 30d
kube-system ├─Pod/kube-controller-manager-minikube True 30d
kube-system └─Pod/kube-scheduler-minikube True 30d
I do have a custom cluster-scoped resource
CISKubeBenchReport
that I'm associating with a built-inNode
object. However, when I run$ kubectl tree node <node name>
I cannot see such relationship displayed.My objects, stripped out of nonessential properties, look as follows:
Is there anything that I'm missing in my onwerReferences config or is that kubectl-tree that cannot handle such config?