🚀 DevOps & SRE Certification Program 📅 Starting: 1st of Every Month 🤝 +91 8409492687 🔍 Contact@DevOpsSchool.com

Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

Kapitan Tutorials: Basic Workflow

$ 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
}
}
Subscribe
Notify of
guest


0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments

Certification Courses

DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:

DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.

0
Would love your thoughts, please comment.x
()
x