pip install k8s_backup
Before using k8s_backup
, you also have to install its dependency
k8s_backup
takes can tak YAML input, converts it to JSON, and filters out the portions which are specific to the running instance:
cat input.yml | k8s_backup
By default it will output YAML, --yaml-output
/-y
argument is to explicitly declar this.
cat input.yml | k8s_backup
Use the --width
/-w
argument to pass the line wrap width for string literals.
To output the config as JSON use, --json-output
/-j
YAML tags <http://www.yaml.org/spec/1.2/spec.html#id2764295>
_ in the input are ignored (any nested data is treated as
untagged). Key order is preserved.
Because YAML treats JSON as a dialect of YAML, you can use k8s_backup to convert JSON to YAML: k8s_backup -y . < in.json > out.yml
.
- Alex Moore
Please report bugs, issues, feature requests, etc. on GitHub.
Licensed under the terms of the Apache License, Version 2.0.