# Install kubectl-tree with Homebrew, Nix, zypper

Kubectl plugin to browse Kubernetes object hierarchies as a tree. Version 0.6.0 via Homebrew; verified from local package data.

## 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/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-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>
- **Upstream docs:** <https://github.com/ahmetb/kubectl-tree#readme>
- **License:** Apache-2.0
- **Source archive:** <https://github.com/ahmetb/kubectl-tree/archive/refs/tags/v0.6.0.tar.gz>
- **Generated:** 2026-07-08T07:18:31+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-07-08
- Package-manager version: 0.6.0
- Local data: ok
- Upstream repository: https://github.com/ahmetb/kubectl-tree
- Upstream latest detected: v0.6.0 (current)
- info: No package-manager update timestamp was available.
## 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.2: normalized package name match | openSUSE Tumbleweed package metadata: kubectl-tree from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-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://www.automicvault.com/pkg/cloud-clis/) - Belongs to a cloud or infrastructure command family.
- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Secret-risk packages](https://www.automicvault.com/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [kubernetes-cli](https://www.automicvault.com/pkg/brew/kubernetes-cli/) - Runtime dependency declared by Homebrew.
- [go](https://www.automicvault.com/pkg/brew/go/) - Build dependency declared by Homebrew.
- [kubecolor](https://www.automicvault.com/pkg/brew/kubecolor/) - Shares av.db curated category or tags: cli, developer-tools, kubectl, kubectl-plugin, kubernetes.
- [kubectl-cnpg](https://www.automicvault.com/pkg/brew/kubectl-cnpg/) - Shares av.db curated category or tags: cli, developer-tools, kubectl-plugin, kubernetes.
- [kubectl-rook-ceph](https://www.automicvault.com/pkg/brew/kubectl-rook-ceph/) - Shares av.db curated category or tags: cli, developer-tools, kubectl-plugin, kubernetes.
- [krew](https://www.automicvault.com/pkg/brew/krew/) - Shares av.db curated category or tags: cli, developer-tools, kubectl, kubernetes.
- [kubecm](https://www.automicvault.com/pkg/brew/kubecm/) - Shares av.db curated category or tags: cli, developer-tools, kubectl, kubernetes.
- [kubectl-ai](https://www.automicvault.com/pkg/brew/kubectl-ai/) - Shares av.db curated category or tags: cli, developer-tools, kubectl, kubernetes.
- [kubectx](https://www.automicvault.com/pkg/brew/kubectx/) - Shares av.db curated category or tags: cli, developer-tools, kubectl, kubernetes.
- [kubelogin](https://www.automicvault.com/pkg/brew/kubelogin/) - Shares av.db curated category or tags: cli, developer-tools, kubectl, kubernetes.

## Combined YAML source

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


## Sources

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