A kubectl plugin to visualize Kubernetes resource relationships in a tree-like format.
kubectl-tree helps you understand the relationships between Kubernetes resources in your cluster. It shows a hierarchical view of:
- Workloads (Deployments, StatefulSets, DaemonSets)
- Their child resources (ReplicaSets, Pods)
- Related resources (Services, ConfigMaps, Secrets, PVCs)
- Containers within Pods (Containers, InitContainers)
kubectl tree -n istio-system
- Access to a Kubernetes cluster
- kubectl installed
- Download latest release from releases
- Move the binary to your PATH, e.g.
/usr/local/bin/kubectl-tree - Run
kubectl tree
Requires go 1.21 or higher
go mod init kubectl-tree
go mod tidy
go build -o kubectl-tree main.go
