Update cmd/config docs from using yaml to using kustomize config

This commit is contained in:
Phillip Wittrock
2019-11-27 11:59:45 -08:00
parent 1a9d62617e
commit 7ce1f7e95a
12 changed files with 78 additions and 72 deletions

View File

@@ -6,7 +6,7 @@
[Alpha] Display Resource structure from a directory or stdin.
kyaml tree may be used to print Resources in a directory or cluster, preserving structure
kustomize config tree may be used to print Resources in a directory or cluster, preserving structure
Args:
@@ -15,38 +15,38 @@ Args:
Resource fields may be printed as part of the Resources by specifying the fields as flags.
kyaml tree has build-in support for printing common fields, such as replicas, container images,
kustomize config tree has build-in support for printing common fields, such as replicas, container images,
container names, etc.
kyaml tree supports printing arbitrary fields using the '--field' flag.
kustomize config tree supports printing arbitrary fields using the '--field' flag.
By default, kyaml tree uses the directory structure for the tree structure, however when printing
By default, kustomize config tree uses the directory structure for the tree structure, however when printing
from the cluster, the Resource graph structure may be used instead.
### Examples
# print Resources using directory structure
kyaml tree my-dir/
kustomize config tree my-dir/
# print replicas, container name, and container image and fields for Resources
kyaml tree my-dir --replicas --image --name
kustomize config tree my-dir --replicas --image --name
# print all common Resource fields
kyaml tree my-dir/ --all
kustomize config tree my-dir/ --all
# print the "foo"" annotation
kyaml tree my-dir/ --field "metadata.annotations.foo"
kustomize config tree my-dir/ --field "metadata.annotations.foo"
# print the "foo"" annotation
kubectl get all -o yaml | kyaml tree my-dir/ --structure=graph \
kubectl get all -o yaml | kustomize config tree my-dir/ --structure=graph \
--field="status.conditions[type=Completed].status"
# print live Resources from a cluster using graph for structure
kubectl get all -o yaml | kyaml tree --replicas --name --image --structure=graph
kubectl get all -o yaml | kustomize config tree --replicas --name --image --structure=graph
# print live Resources using graph for structure
kubectl get all,applications,releasetracks -o yaml | kyaml tree --structure=graph \
kubectl get all,applications,releasetracks -o yaml | kustomize config tree --structure=graph \
--name --image --replicas \
--field="status.conditions[type=Completed].status" \
--field="status.conditions[type=Complete].status" \