$ kapitan | |
usage: kapitan [-h] [--version] {eval,e,compile,c,inventory,i,searchvar,sv,secrets,s,refs,r,lint,l,init,validate,v} ... | |
Generic templated configuration management for Kubernetes, Terraform and other things | |
positional arguments: | |
{eval,e,compile,c,inventory,i,searchvar,sv,secrets,s,refs,r,lint,l,init,validate,v} | |
commands | |
eval (e) evaluate jsonnet file | |
compile (c) compile targets | |
inventory (i) show inventory | |
searchvar (sv) show all inventory files where var is declared | |
secrets (s) (DEPRECATED) please use refs | |
refs (r) manage refs | |
lint (l) linter for inventory and refs | |
init initialize a directory with the recommended kapitan project skeleton. | |
validate (v) validates the compile output against schemas as specified in inventory | |
optional arguments: | |
-h, --help show this help message and exit | |
--version show program's version number and exit | |
$ sudo kapitan init | |
Populated . with: | |
components | |
my_component | |
my_component.jsonnet | |
other_component | |
__init__.py | |
__pycache__ | |
__init__.cpython-38.pyc | |
inventory | |
classes | |
common.yml | |
my_component.yml | |
targets | |
my_target.yml | |
templates | |
docs | |
my_readme.md | |
scripts | |
my_script.sh | |
$ more inventory/targets/my_target.yml | |
classes: | |
- common | |
- my_component | |
parameters: | |
target_name: my_target | |
$ more inventory/ | |
classes/ targets/ | |
$ more inventory/classes/ | |
common.yml my_component.yml | |
$ more inventory/classes/my_component.yml | |
parameters: | |
your_component: | |
some_parameter: true | |
kapitan: | |
compile: | |
- output_path: jsonnet_output | |
input_type: jsonnet | |
output_type: yaml | |
input_paths: | |
- components/my_component/my_component.jsonnet | |
- output_path: scripts | |
input_type: jinja2 | |
input_paths: | |
- templates/scripts | |
- output_path: . | |
output_type: yaml | |
input_type: jinja2 | |
input_paths: | |
- templates/docs | |
- output_path: kadet_output | |
input_type: kadet | |
output_type: yaml | |
input_paths: | |
$ more components/my_component/my_component.jsonnet | |
local kap = import "lib/kapitan.libjsonnet"; | |
local inventory = kap.inventory(); | |
{ | |
example: { | |
test: inventory.parameters.your_component.some_parameter | |
} | |
} |






I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I am working at Cotocus. I blog tech insights at DevOps School, travel stories at Holiday Landmark, stock market tips at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at I reviewed , and SEO strategies at Wizbrand.
Please find my social handles as below;
Rajesh Kumar Personal Website
Rajesh Kumar at YOUTUBE
Rajesh Kumar at INSTAGRAM
Rajesh Kumar at X
Rajesh Kumar at FACEBOOK
Rajesh Kumar at LINKEDIN
Rajesh Kumar at PINTEREST
Rajesh Kumar at QUORA
Rajesh Kumar at WIZBRAND