# Install kubectl-tree with Homebrew, Nix, zypper

Kubectl plugin to browse Kubernetes object hierarchies as a tree. Version 0.6.0 via Homebrew; verified 2026-07-27. Also installable with nix: nix profile install nixpkgs#kubectl-tree.

## Install

```sh
sudo av install brew:kubectl-tree
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install kubectl-tree
```

  Evidence: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#kubectl-tree
```

  Evidence: nixpkgs package indexes: pkgs/by-name/ku/kubectl-tree/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- zypper (92%):

```sh
sudo zypper install kubectl-tree
```

  Evidence: openSUSE Tumbleweed package metadata: kubectl-tree from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

## Package facts

- **Package key:** brew:kubectl-tree
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/kubectl-tree>
- **Version:** 0.6.0
- **Source summary:** Kubectl plugin to browse Kubernetes object hierarchies as a tree
- **Homepage:** <https://github.com/ahmetb/kubectl-tree>
- **Repository:** <https://github.com/ahmetb/kubectl-tree>
- **License:** Apache-2.0
- **Source archive:** <https://github.com/ahmetb/kubectl-tree/archive/refs/tags/v0.6.0.tar.gz>
- **Last updated:** 2026-07-27T21:58:45+02:00
- **Generated:** 2026-08-04T22:13:35+00:00

## Executables

- kubectl-tree (cli)
- kubectl-tree (alias)

## Dependencies

- kubernetes-cli

## Build dependencies

- go

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-08-04
- Package-manager version: 0.6.0
- Package-manager updated: 2026-07-27
- Local data: ok
- Upstream repository: https://github.com/ahmetb/kubectl-tree
- Upstream latest detected: v0.6.0 (current)
## Project history and usage

kubectl-tree is a kubectl plugin for browsing Kubernetes object ownership as a tree. It follows `ownerReferences` between objects, letting users see how resources such as Deployments, ReplicaSets, Pods, Knative Services, or other controllers relate at runtime.

### Project history

The GitHub repository was created on 2019-12-23 by Ahmet Alp Balkan. Its README says the tool explores ownership relationships through Kubernetes `ownerReferences` and acknowledges inspiration from knative-inspect, generalized beyond a single ecosystem.

Later releases added filters for namespaces, selectors, condition types, API groups, and resources, reflecting its evolution from a tree visualizer into a practical inspection tool for larger clusters.

### Adoption history

kubectl-tree became one of the more recognizable third-party kubectl plugins because object ownership is a common Kubernetes troubleshooting question and the tree view is easy to understand in terminal output.

The repository metadata observed on 2026-07-01 showed more than 3000 GitHub stars. Its package-manager presence in Homebrew, Nix, and zypper complements Krew installation and makes it available in repeatable workstation environments.

### How it is used

Users install it as a kubectl plugin and run commands such as `kubectl tree` with namespace, selector, API group, and resource filters. The README warns that filtering out intermediate owner resources can stop traversal and hide descendants, which is a useful operational detail for large clusters.

The package is commonly useful when answering why an object exists, what controller owns it, or how custom resources fan out into lower-level Kubernetes objects.

### Why package nerds care

kubectl-tree is package-nerd notable because it turns a native Kubernetes metadata field into a Unix-friendly visualization. It is small, script-adjacent, installable as a kubectl plugin, and expressive enough to become part of many operators' ad hoc debugging toolbox.

### Timeline

- 2019-12-23: GitHub repository created.
- 2025-11-15: Release v0.4.6 published.
- 2026-03-20: Release v0.5.0 published.
- 2026-03-24: Release v0.6.0 published.

### Related projects

- Related projects include kubectl, Krew, Kubernetes ownerReferences, knative-inspect, and kube-lineage. The README contrasts kube-lineage as a similar plugin that can understand some logical relationships even without ownerReferences.

### Sources

- <https://api.github.com/repos/ahmetb/kubectl-tree>
- <https://github.com/ahmetb/kubectl-tree>
- <https://github.com/ahmetb/kubectl-tree#readme>
- <https://github.com/tohjustin/kube-lineage>
- <https://kubernetes.io/docs/concepts/overview/working-with-objects/owners-dependents/>
- <https://kubernetes.io/docs/tasks/extend-kubectl/kubectl-plugins/>


## Security Notes

infrastructure mutation or orchestration signal.

- **Geiger risk:** orange / medium
- infrastructure mutation or orchestration signal


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: ~/.kube/config
## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** kubectl-tree
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## Other Package-Manager Records

- Nix - kubectl-tree: normalized package name match | nixpkgs package indexes: pkgs/by-name/ku/kubectl-tree/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- zypper - kubectl-tree - 0.6.0-1.5: normalized package name match | openSUSE Tumbleweed package metadata: kubectl-tree from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Kubectl plugin to browse Kubernetes object hierarchies as a tree | https://github.com/ahmetb/kubectl-tree


## Related links

- [Cloud CLI packages](https://pkg.so/cloud-clis/) - Belongs to a cloud or infrastructure command family.
- [Source-control packages](https://pkg.so/source-control-tools/) - Belongs to a source-control command family.
- [Secret-risk packages](https://pkg.so/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://pkg.so/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [kubernetes-cli](https://pkg.so/brew/kubernetes-cli/) - Runtime dependency declared by Homebrew.
- [go](https://pkg.so/brew/go/) - Build dependency declared by Homebrew.
- [kubecolor](https://pkg.so/brew/kubecolor/) - Shares pkgdb curated category or tags: cli, developer-tools, kubectl, kubectl-plugin, kubernetes.
- [kubectl-cnpg](https://pkg.so/brew/kubectl-cnpg/) - Shares pkgdb curated category or tags: cli, developer-tools, kubectl-plugin, kubernetes.
- [kubectl-rook-ceph](https://pkg.so/brew/kubectl-rook-ceph/) - Shares pkgdb curated category or tags: cli, developer-tools, kubectl-plugin, kubernetes.
- [kubectx](https://pkg.so/brew/kubectx/) - Shares pkgdb curated category or tags: cli, developer-tools, kubectl, kubernetes.
- [kubelogin](https://pkg.so/brew/kubelogin/) - Shares pkgdb curated category or tags: cli, developer-tools, kubectl, kubernetes.
- [krew](https://pkg.so/brew/krew/) - Shares pkgdb curated category or tags: cli, developer-tools, kubectl, kubernetes.
- [kubecm](https://pkg.so/brew/kubecm/) - Shares pkgdb curated category or tags: cli, developer-tools, kubectl, kubernetes.
- [kubergrunt](https://pkg.so/brew/kubergrunt/) - Shares pkgdb curated category or tags: cli, developer-tools, kubectl, kubernetes.
- [kubectl-explore](https://pkg.so/brew/kubectl-explore/) - Package names and metadata indicate a similar tool family. Shared terms: cli, developer, developer-tools, kubectl, kubectl-plugin.

## Combined YAML source

View the package source record on GitHub. [combined/kubectl-tree.yml](https://github.com/mxcl/pkgdb/blob/main/combined/kubectl-tree.yml)


## Sources

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
