Get Compositions
krateoctl get compositions lists or fetches composition resources with automatic version discovery across the CRDs in the composition.krateo.io group.
Table Of Contents​
Usage​
krateoctl get compositions [NAME | TYPE/NAME] [FLAGS]
What It Supports​
- list all discovered compositions
- fetch a single composition by name
- fetch a composition explicitly by CRD plural and name with
TYPE/NAME - filter results by namespace, label selector, or field selector
- render output as table, YAML, JSON, or name-only
Flags​
-n,--namespacenamespace to query-Alist across all namespaces-ooutput format:table,yaml,json, orname-llabel selector--field-selectorfield selector for filtering
How Lookup Works​
krateoctl discovers every CRD in the composition.krateo.io group that is marked with the compositions category, then uses the best served version for each resource automatically.
When you request a single resource:
NAMElooks up a composition by name across all discovered composition kindsTYPE/NAMElets you choose the CRD plural explicitly, for examplegithubscaffoldinglifecycles/my-composition
If the same name exists in more than one composition kind, krateoctl returns an ambiguity error and asks you to use TYPE/NAME.
Defaults​
- If you do not pass
--namespace,krateoctluses your current kubeconfig namespace. - If you do not pass
-o, the command prints a table. - If you use
-A, you cannot also request a single named resource.
Examples​
# List compositions in the current namespace
krateoctl get compositions
# List compositions in a specific namespace
krateoctl get compositions -n krateo-system
# List compositions across every namespace
krateoctl get compositions -A
# Fetch a composition by name
krateoctl get compositions my-composition
# Fetch a composition by explicit CRD plural and name
krateoctl get compositions githubscaffoldinglifecycles/my-composition
# Render the result as YAML
krateoctl get compositions my-composition -o yaml
Output Notes​
tableoutput shows namespace, name, version, and kind.nameoutput printskind/name.yamlandjsonoutput omit Kubernetes managed fields for readability.