finds.dev← search

// the find

ahmetb/kubectl-tree

★ 3,399 · Go · Apache-2.0 · updated Jun 2026

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

A kubectl plugin that visualizes Kubernetes object ownership hierarchies by following ownerReferences. If you've ever traced why a pod won't die or what a CRD controller actually created, this is the tool. It's narrow in scope and does that one thing well.

Installable via krew, so there's no manual binary management. The --api-groups and --resources glob filters are genuinely useful in large clusters where traversing every resource type is slow. Supports CRDs out of the box since it follows ownerReferences generically rather than hard-coding known types. Active enough — last push June 2026, dependabot wired up.

It only understands ownerReferences, so logical relationships (a Service selecting Pods, a NetworkPolicy targeting Pods by label) are invisible — kubectl lineage handles those cases and is worth knowing about. The codebase is tiny (8 Go files) which is appropriate for the scope, but it means there's no configuration, no output formats beyond the terminal tree, and no way to export the hierarchy for diffing or scripting. If an intermediate resource type is filtered out, the tree silently truncates without warning you that children are missing — the README mentions this in a footnote but the UX doesn't surface it.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →