Skip to main content

Generic templated configuration management for Kubernetes, Terraform and other things

Project description

Kapitan: Configuration Management for Kubernetes, Terraform, and Infrastructure

Test, Build and Publish docker image Python Version Downloads Docker Pulls Releases Docker Image Size License

Kapitan logo

Kapitan is an open source configuration management tool for Kubernetes, Terraform, and complex infrastructure systems. It helps teams generate, organize, reuse, and validate configuration across environments using an inventory-driven model, templates (Jsonnet, Jinja2, Kadet), and integrations with Helm, Kustomize, CUE, and external references.

Kapitan provides native secrets management (GPG, AWS KMS, GCP KMS, Azure Key Vault, HashiCorp Vault) and is designed for Platform Engineering and GitOps workflows.


Quick start

The fastest way to try Kapitan is with the Kapitan Reference repository:

git clone https://github.com/kapicorp/kapitan-reference.git kapitan-templates
cd kapitan-templates
./kapitan compile

For a minimal project from a cookiecutter template:

pip3 install cruft
cruft create https://github.com/kapicorp/kapitan-reference --checkout cookiecutter --no-input

What is Kapitan?

Kapitan lets you model infrastructure configuration with reusable inventory classes and targets, then compile that data into manifests, scripts, documentation, and Terraform resources. Instead of copying values across Helm values files, Kustomize overlays, and Terraform variables, you define everything once in the Kapitan inventory and let each input type generate the files it needs.

Install Kapitan

Docker (recommended)

docker run -t --rm -v $(pwd):/src:delegated kapicorp/kapitan -h

On Linux, add -u $(id -u) to preserve file permissions.

Pip

Kapitan requires Python 3.10 or newer.

pip3 install --user --upgrade kapitan

See the full installation guide for platform-specific steps.

What Kapitan does

Kapitan turns a hierarchical inventory and a set of input templates into compiled configuration files ready for deployment.

  1. Define reusable classes and per-environment targets in YAML.
  2. Write templates with your preferred tools.
  3. Run kapitan compile.
  4. Deploy the generated output from the compiled/ directory.

Supported input types

Native integrations

  • Secret management: GPG, HashiCorp Vault, AWS KMS, GCP KMS, Azure Key Vault
  • Remote dependencies: Git, HTTP, ORAS (OCI registry)
  • Validation: JSON Schema, TOML, YAML linting
  • GitOps-friendly: compiles to fully rendered, plain-text output

When to use Kapitan

  • You manage the same application across many environments (dev, staging, prod, regions) and want a single source of truth.
  • You need to reuse configuration fragments across targets without copy-paste.
  • You want to combine multiple templating tools in one pipeline.
  • You need native secret management embedded in the same configuration workflow.
  • You prefer a compile step that generates fully rendered output before deployment.

When another tool may be enough

  • Helm alone is sufficient if you only need to template a single chart with values files and do not share complex configuration across many services.
  • Kustomize alone is sufficient if your environment differences are mostly patches and overlays on a small set of bases.
  • Plain YAML with a CD tool is sufficient if you have very few environments and simple configuration with little reuse.
  • Terraform alone is sufficient if you only manage infrastructure resources and do not need a broader multi-language configuration layer.

Project status

Kapitan is actively maintained by KapiCorp and the open source community. Releases are published regularly with release notes. The project uses an MIT license.

Contributing

We welcome contributions. Please open an issue or pull request to get started.

Security

If you discover a security issue, please open a private security advisory or contact the maintainers directly.

Support

Related projects

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kapitan-0.35.2.dev23.tar.gz (4.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kapitan-0.35.2.dev23-py3-none-any.whl (154.0 kB view details)

Uploaded Python 3

File details

Details for the file kapitan-0.35.2.dev23.tar.gz.

File metadata

  • Download URL: kapitan-0.35.2.dev23.tar.gz
  • Upload date:
  • Size: 4.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for kapitan-0.35.2.dev23.tar.gz
Algorithm Hash digest
SHA256 43c24108fdbd374f128715a10eb1ddf7b411e0d4eceff1a103452c73e83dd94e
MD5 3eeb1de7235ec807e7bedef5161eeffc
BLAKE2b-256 e26ac7138fa16e304101ffe9e1466d070ca7fb213d92a02dcd5b328b9b12e9ab

See more details on using hashes here.

File details

Details for the file kapitan-0.35.2.dev23-py3-none-any.whl.

File metadata

  • Download URL: kapitan-0.35.2.dev23-py3-none-any.whl
  • Upload date:
  • Size: 154.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for kapitan-0.35.2.dev23-py3-none-any.whl
Algorithm Hash digest
SHA256 2848b778f9fe023d7a847bfad834cfa79a373ce1008122e5da0eee31d9f8ee42
MD5 1a79db6500e28dcb0aacafcceddfb7ad
BLAKE2b-256 35d4762a12dcd9d7602a27c4426c268b9cbfba64c36762c77eb85564fb944e46

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page