-
-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Add Import Resources from YAML guide
Signed-off-by: Stefan Prodan <[email protected]>
- Loading branch information
1 parent
d02ae5f
commit 499d0d0
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Import Kubernetes Resources from YAML | ||
|
||
!!! info "Work in progress" | ||
|
||
This guide is under construction and will be updated soon. | ||
|
||
The `cue` CLI can import Kubernetes objects from YAML files and convert them to CUE. | ||
|
||
Assuming you have a YAML file named `manifests.yaml` with one or more Kubernetes objects, | ||
run the following command in the module's root directory: | ||
|
||
```shell | ||
cue import /path/to/manifests.yaml \ | ||
-o -f templates/manifests.cue -p templates \ | ||
-l 'strings.ToLower(kind)' -l 'metadata.name' | ||
``` | ||
|
||
The generated CUE definitions will be written to `templates/manifests.cue`, from where you can | ||
modify them to fit with the Timoni's template model. | ||
|