kubectl/cmd/kinflate
Jingfang Liu b3a480b203 Update directories in test script 2018-03-16 15:07:36 -07:00
..
longerDemo testmdlinking 2018-02-13 10:46:42 -08:00
test Update directories in test script 2018-03-16 15:07:36 -07:00
README.md removed '-u' option from install command 2018-02-21 11:37:10 -08:00
README_ORDER.txt add short and longer demo 2018-02-06 15:32:58 -08:00
getting_started.md kinflate: improved README and added getting-started 2018-02-16 13:54:42 -08:00
kinflate.go kinflate: implemented 'add' subcommand 2018-02-07 10:13:23 -08:00
shortDemo.md testmdlinking 2018-02-13 10:46:42 -08:00

README.md

Overview

kinflate is a command line interface to manage Kubernetes Application configuration.

Installation

kinflate is written in Go and can be installed using go get:

go get k8s.io/kubectl/cmd/kinflate

After running the above command, kinflate should get installed in your GOPATH/bin directory.

Usage

This section explains sub-commands of kinflate using examples.

init

kinflate init initializes a directory by creating an application manifest file named Kube-manifest.yaml. This command should be run in the same directory where application config resides.

kinflate init

set nameprefix

kinflate set nameprefix updates the nameprefix field in the [manifest]. kinflate inflate uses the prefix to generate prefixed names for Kubernetes resources.

Examples

# set nameprefix to 'staging'
kinflate set nameprefix staging

# set nameprefix to 'john`
kinflate set nameprefix john

add

kinflate add adds a resource, configmap or secret to the [manifest].

examples

# adds a resource to the manifest
kinflate add resource <path/to/resource-file-or-dir>

# adds a configmap from a literal or file-source to the manifest
kinflate add configmap my-configmap --from-file=my-key=file/path --from-literal=my-literal=12345

# Adds a generic secret to the Manifest (with a specified key)
kinflate add secret generic my-secret --from-file=my-key=file/path --from-literal=my-literal=12345

# Adds a TLS secret to the Manifest (with a specified key)
kinflate add secret tls my-tls-secret --cert=cert/path.cert --key=key/path.key        

inflate

kinflate inflate generates application configuration by applying transformations (e.g. name-prefix, label, annotations) specified in the [manifest].

examples

# generate application configuration and output to stdout
kinflate inflate -f <path/to/application/dir>

# generate application configuration and apply it to a Kubernetes cluster
kinflate inflate -f <path/to/application/dir> | kubectl apply -f -

Demos and tutorial