CLI for displaying info about k8s resources in given yaml files. Work in progress.
manifests-tree --include-kinds=depl https://github.com/cert-manager/cert-manager/releases/download/v1.13.3/cert-manager.yaml
.
└── apps/v1
└── deployment [3]
├── cert-manager
│ └── https://github.com/cert-manager/cert-manager/releases/download/v1.13.3/cert-manager.yaml:5384
├── cert-manager-cainjector
│ └── https://github.com/cert-manager/cert-manager/releases/download/v1.13.3/cert-manager.yaml:5330
└── cert-manager-webhook
└── https://github.com/cert-manager/cert-manager/releases/download/v1.13.3/cert-manager.yaml:5452
For available outputs, check out help for the -o, --output
flag.
There can be one or more inputs which can be:
-
a path to a yaml file, e.g.:
manifests-tree my-manifests.yaml
-
path to a directory containing yaml files, e.g.:
manifests-tree manifests_dir/
In such case, directory will be searched for
.yaml
and.yml
files. Ifrecursive
option is set totrue
, walk will enter all directories recursively. -
http(s) urls, e.g.:
manifests-tree https://github.com/cert-manager/cert-manager/releases/download/v1.13.3/cert-manager.yaml
-
stdin, e.g.:
kustomize build . | manifests-tree -
helm template \ cert-manager cert-manager \ --repo https://charts.jetstack.io \ --namespace cert-manager \ --create-namespace \ --version v1.13.3 \ | manifests-tree -
Filtering can be done on resource names, api versions, and kinds. For now only strict matching, and substring matching are supoported. Cf. manifests-tree --help
.