Debian Codegraph @

cmd/config/docs/commands/tree.md

raw symbols SCIP
1 ## tree
2
3 [Alpha] Display Resource structure from a directory or stdin.
4
5 ### Synopsis
6
7 [Alpha] Display Resource structure from a directory or stdin.
8
9 kustomize cfg tree may be used to print Resources in a directory or cluster, preserving structure
10
11 Args:
12
13 DIR:
14 Path to local directory directory.
15
16 Resource fields may be printed as part of the Resources by specifying the fields as flags.
17
18 kustomize cfg tree has build-in support for printing common fields, such as replicas, container images,
19 container names, etc.
20
21 kustomize cfg tree supports printing arbitrary fields using the '--field' flag.
22
23 By default, kustomize cfg tree uses Resource graph structure if any relationships between resources (ownerReferences)
24 are detected, as is typically the case when printing from a cluster. Otherwise, directory graph structure is used. The
25 graph structure can also be selected explicitly using the '--graph-structure' flag.
26
27 ### Examples
28
29 # print Resources using directory structure
30 kustomize cfg tree my-dir/
31
32 # print replicas, container name, and container image and fields for Resources
33 kustomize cfg tree my-dir --replicas --image --name
34
35 # print all common Resource fields
36 kustomize cfg tree my-dir/ --all
37
38 # print the "foo"" annotation
39 kustomize cfg tree my-dir/ --field "metadata.annotations.foo"
40
41 # print the "foo"" annotation
42 kubectl get all -o yaml | kustomize cfg tree \
43 --field="status.conditions[type=Completed].status"
44
45 # print live Resources from a cluster using owners for graph structure
46 kubectl get all -o yaml | kustomize cfg tree --replicas --name --image
47
48 # print live Resources with status condition fields
49 kubectl get all -o yaml | kustomize cfg tree \
50 --name --image --replicas \
51 --field="status.conditions[type=Completed].status" \
52 --field="status.conditions[type=Complete].status" \
53 --field="status.conditions[type=Ready].status" \
54 --field="status.conditions[type=ContainersReady].status"