docs README: Update usage examples for kingpin CLI

This commit is contained in:
Vincent Ambo 2017-05-04 18:43:11 +02:00
parent c8a63861ae
commit 211289765a

View file

@ -1,4 +1,4 @@
KonTemplate - A simple Kubernetes templater Kontemplate - A simple Kubernetes templater
=========================================== ===========================================
[![Build Status](https://travis-ci.org/tazjin/kontemplate.svg?branch=master)](https://travis-ci.org/tazjin/kontemplate) [![Build Status](https://travis-ci.org/tazjin/kontemplate.svg?branch=master)](https://travis-ci.org/tazjin/kontemplate)
@ -9,7 +9,7 @@ which context (i.e. k8s cluster) is specified.
## Overview ## Overview
KonTemplate lets you describe resources as you normally would in a simple folder structure: Kontemplate lets you describe resources as you normally would in a simple folder structure:
``` ```
. .
@ -45,48 +45,48 @@ Assuming you have Go configured correctly, you can simply `go get github.com/taz
## Usage ## Usage
You must have `kubectl` installed to use KonTemplate effectively. You must have `kubectl` installed to use Kontemplate effectively.
``` ```
NAME: usage: kontemplate [<flags>] <command> [<args> ...]
kontemplate - simple Kubernetes resource templating
USAGE: simple Kubernetes resource templating
kontemplate [global options] command [command options] [arguments...]
VERSION: Flags:
0.0.1 -h, --help Show context-sensitive help (also try --help-long and --help-man).
-i, --include=INCLUDE ... Resource sets to include explicitly
-e, --exclude=EXCLUDE ... Resource sets to exclude explicitly
COMMANDS: Commands:
template Interpolate and print templates help [<command>...]
apply Interpolate templates and run 'kubectl apply' Show help.
replace Interpolate templates and run 'kubectl replace'
delete Interpolate templates and run 'kubectl delete'
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS: template <file>
--help, -h show help Template resource sets and print them
--version, -v print the version
```
All options support the same set of extra flags: apply [<flags>] <file>
Template resources and pass to 'kubectl apply'
replace <file>
Template resources and pass to 'kubectl replace'
delete <file>
Template resources and pass to 'kubectl delete'
create <file>
Template resources and pass to 'kubectl create'
```
OPTIONS:
--file value, -f value Cluster configuration file to use
--include value, -i value Limit templating to explicitly included resource sets
--exclude value, -e value Exclude certain resource sets from templating
``` ```
Examples: Examples:
``` ```
# Look at output for a specific resource set and check to see if it's correct ... # Look at output for a specific resource set and check to see if it's correct ...
kontemplate template -f example/prod-cluster.yaml -i some-api kontemplate template example/prod-cluster.yaml -i some-api
# ... maybe do a dry-run to see what kubectl would do: # ... maybe do a dry-run to see what kubectl would do:
kontemplate apply -f example/prod-cluster.yaml --dry-run kontemplate apply example/prod-cluster.yaml --dry-run
# And actually apply it if you like what you see: # And actually apply it if you like what you see:
kontemplate apply -f example/prod-cluster.yaml kontemplate apply example/prod-cluster.yaml
``` ```