ks prototype preview

Preview a prototype’s output without creating a component (stdout)

Synopsis

This preview command expands a prototype with CLI flag parameters, and
emits the resulting manifest to stdout. This allows you to see the potential
output of a ks generate command without actually creating a new component file.

The output is formatted in Jsonnet. To see YAML or JSON equivalents, first create
a component with ks generate and then use ks show.

  • ks generate — Use the specified prototype to generate a component manifest

Syntax

  1. ks prototype preview <prototype-name> [parameter-flags] [flags]

Examples

  1. # Preview prototype 'io.ksonnet.pkg.single-port-deployment', using the
  2. # 'nginx' image, and port 80 exposed.
  3. ks prototype preview single-port-deployment \
  4. --name=nginx \
  5. --image=nginx \
  6. --port=80
  7. # Preview prototype 'io.ksonnet.pkg.single-port-deployment', using the
  8. # 'nginx' image, and port 80 exposed with a values file.
  9. ks prototype preview simple-port-deployment \
  10. --name=nginx \
  11. --values-file=ks-values
  12. Where 'ks-values' is a jsonnet file with the contents:
  13. {
  14. image: "nginx",
  15. port: 80,
  16. }

Options

  1. -h, --help help for preview

Options inherited from parent commands

  1. --dir string Ksonnet application root to use; Defaults to CWD
  2. --tls-skip-verify Skip verification of TLS server certificates
  3. -v, --verbose count Increase verbosity. May be given multiple times.

SEE ALSO

  • ks prototype - Instantiate, inspect, and get examples for ksonnet prototypes