tree displays resources, files and packages in a tree structure.
Each package (directory containing a Kptfile) is annotated with its type:
- (independent): The package has an
upstreamsection in itsKptfile,
meaning it tracks its own upstream source and can be updated independently. - (dependent): A subpackage that does not have an
upstreamsection in its
Kptfile. Its upstream is implicitly inherited from its parent package.
A root package created locally (e.g. via kpt pkg init) has no annotation since
it is neither independent nor dependent β it simply has no upstream source.
Synopsis#
kpt pkg tree [DIR]
Args#
DIR:
Path to a local package directory. Defaults to the current directory.
Displays KRM resources with their Kind and Name, and non-KRM text files
as plain filenames. Dotfiles and symlinks are excluded.
Examples#
# Show resources in the current directory.
$ kpt pkg tree
# Example output showing independent and dependent packages:
$ kpt pkg tree wordpress/
Package "wordpress" (independent)
βββ [Kptfile] Kptfile wordpress
βββ [service.yaml] Service wordpress
βββ deployment
β βββ [deployment.yaml] Deployment wordpress
β βββ [volume.yaml] PersistentVolumeClaim wp-pv-claim
βββ Package "mysql" (dependent)
βββ [Kptfile] Kptfile mysql
βββ [deployment.yaml] Deployment wordpress-mysql
βββ [service.yaml] Service wordpress-mysql