ks_show.md 2.18 KB
Newer Older
Jessica Yao's avatar
Jessica Yao committed
1 2
## ks show

3
Show expanded manifests for a specific environment.
Jessica Yao's avatar
Jessica Yao committed
4 5 6 7

### Synopsis


Jessica Yao's avatar
Jessica Yao committed
8 9 10 11 12 13 14 15
Show expanded manifests (resource definitions) for a specific environment.
Jsonnet manifests, each defining a ksonnet component, are expanded into their
JSON or YAML equivalents (YAML is the default). Any parameters in these Jsonnet
manifests are resolved based on environment-specific values.

When NO component is specified (no `-c` flag), this command expands all of
the files in the `components/` directory into a list of resource definitions.
This is the YAML version of what gets deployed to your cluster with
16
`ks apply <env-name>`.
Jessica Yao's avatar
Jessica Yao committed
17 18 19 20 21 22

When a component IS specified via the `-c` flag, this command only expands the
manifest for that particular component.

### Related Commands

23
* `ks validate` — Check generated component manifests against the server's API
Jessica Yao's avatar
Jessica Yao committed
24 25 26
* `ks apply` — Apply local Kubernetes manifests (components) to remote clusters

### Syntax
27 28 29


```
bryanl's avatar
bryanl committed
30
ks show <env> [-c <component-filename>] [flags]
Jessica Yao's avatar
Jessica Yao committed
31
```
32 33 34 35

### Examples

```
Jessica Yao's avatar
Jessica Yao committed
36

37 38 39 40 41 42 43 44 45 46
# Show all of the components for the 'dev' environment, in YAML
# (In other words, expands all manifests in the components/ directory)
ks show dev

# Show a single component from the 'prod' environment, in JSON
ks show prod -c redis -o json

# Show multiple components from the 'dev' environment, in YAML
ks show dev -c redis -c nginx-server

Jessica Yao's avatar
Jessica Yao committed
47 48 49 50 51
```

### Options

```
bryanl's avatar
bryanl committed
52 53 54 55 56 57 58 59
  -c, --component stringSlice      Name of a specific component (multiple -c flags accepted, allows YAML, JSON, and Jsonnet)
  -V, --ext-str stringSlice        Values of external variables
      --ext-str-file stringSlice   Read external variable from a file
  -o, --format string              Output format.  Supported values are: json, yaml (default "yaml")
  -h, --help                       help for show
  -J, --jpath stringSlice          Additional jsonnet library search path
  -A, --tla-str stringSlice        Values of top level arguments
      --tla-str-file stringSlice   Read top level argument from a file
Jessica Yao's avatar
Jessica Yao committed
60 61 62 63 64 65 66 67 68
```

### Options inherited from parent commands

```
  -v, --verbose count[=-1]   Increase verbosity. May be given multiple times.
```

### SEE ALSO
bryanl's avatar
bryanl committed
69

Jessica Yao's avatar
Jessica Yao committed
70
* [ks](ks.md)	 - Configure your application to deploy to a Kubernetes cluster
Jessica Yao's avatar
Jessica Yao committed
71