KMT - Kubernetes Manifest Transform
KMT (Kubernetes Manifest Transform) is a tool for manipulation of kubernetes manifests based on a transform specification prior to deployment on a kubernetes environment.
The aim for KMT is to provide a flexible method of transforming manifests using a combination of templating to produce valid yaml and inplace modifications of resources.
KMT should provide the user with flexibility in the approach for transforming their manifests to support a wide spectrum of use cases
Transforms of manifests are performed by discrete steps, which form a pipeline. Pipelines may also call other pipelines to generate new resources and/or transform existing resources.
KMT supports Jinja2 for templating and jsonpatch for modifications to resources, along with builtin tasks to import files, delete resources, update metadata, etc.
Installation
Pip
kmt can be installed from pypi using pip:
$ pip install kmt
...
$ kmt --help
usage: kmt [-h] [-d] path
Kubernetes Manifest Transform
positional arguments:
path Pipeline directory path
options:
-h, --help show this help message and exit
-d Enable debug output
or in a virtual environment:
$ python3 -m venv test
$ . ./test/bin/activate
(test) $ pip install kmt
(test) $ kmt --help
usage: kmt [-h] [-d] path
Kubernetes Manifest Transform
positional arguments:
path Pipeline directory path
options:
-h, --help show this help message and exit
-d Enable debug output
Docker
A docker image is also available from hub.docker.com and can be run as follows:
$ docker run --rm -it archmachina/kmt:0.3.3 --help
usage: kmt [-h] [-d] path
Kubernetes Manifest Transform
positional arguments:
path Pipeline directory path
options:
-h, --help show this help message and exit
-d Enable debug output
Note: The latest tag for the docker image represents the latest build from the main branch and may have non-backwards compatible changes.
Usage
Step types
pipeline
import
vars
stdin
jsonpatch
metadata
delete
Common step parameters
when
filter
match_any_tags
match_all_tags
exclude_tags
apply_tags
match_group
match_version
match_kind
exclude_kind
match_namespace
match_name
Features
Ordering
Hash rename
Hash lookup
Templating
Metadata
Release files for kmt 0.3.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| kmt-0.3.6.tar.gz | 21.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kmt-0.3.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 45.0 kB
Release files / kmt-0.3.6.tar.gz
| Download URL | kmt-0.3.6.tar.gz |
|---|---|
| Size | 21.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d5c9177b3c266f04b068a81a04fd0b5fad4c70613eb9216dfc7a1d7c106ba03c
|
|
BLAKE2b-256 checksum How to use checksums |
0af1b2eee4b611c7571494c91489d3a1afe3853a7ca2a981725fa38e6104146b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.4
|
Release files / kmt-0.3.6-py3-none-any.whl
| Download URL | kmt-0.3.6-py3-none-any.whl |
|---|---|
| Size | 23.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
926591e8cbcf330bad099d59074c97ec8635dc066c743be7262ff15e477d73c8
|
|
BLAKE2b-256 checksum How to use checksums |
f93fbffcb54e5c8c50a1a3fcbddebc2d1727cf110a4a046bb251d6781292961a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.4
|