ktmpl is a tool for processing Kubernetes manifest templates. It is a very simple client-side implementation of the Templates + Parameterization proposal.
``` ktmpl 0.1.0 Produces a Kubernetes manifest from a parameterized template
USAGE: ktmpl [FLAGS] [OPTIONS] [--]
FLAGS: -h, --help Prints help information -V, --version Prints version information
OPTIONS:
-p, --parameter
ARGS: Path to the template file to be processed ```
Run ktmpl TEMPLATE
where TEMPLATE is a path to a Kubernetes manifest template in YAML format.
The included example.yml is a working example template.
To provide values for template parameters, use the --parameter
option to supply key-value pairs.
Using the provided example.yml, this would mean:
bash
ktmpl example.yml --parameter MONGODB_PASSWORD=password
Template parameters that have default values can be overridden with the same mechanism.
The processed template will be output to stdout, suitable for piping into a kubectl
command:
bash
ktmpl example.yml --parameter MONGODB_PASSWORD=password | kubectl create -f -
cargo install ktmpl
docker pull inquicker/ktmpl
git clone git@github.com:InQuicker/ktmpl.git
.cargo install --path .
.Make sure Cargo's bin directory is added to your PATH environment variable.
To package the current release for distribution, update TAG
in the Makefile and then run make
.
Release artifacts will be written to the dist
directory.
Docker images for inquicker/ktmpl
and inquicker/ktmpl:$TAG
will be created, but you must push
them manually.
Your GPG secret key will be required to sign sha256sums.txt
.
ktmpl is released under the MIT license. See LICENSE
for details.