ks_param_set.md 1.6 KB
Newer Older
Jessica Yao's avatar
Jessica Yao committed
1 2
## ks param set

Jessica Yao's avatar
Jessica Yao committed
3
Change component or environment parameters (e.g. replica count, name)
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 16 17 18 19 20 21 22 23 24
The `set` command sets component or environment parameters such as replica count
or name. Parameters are set individually, one at a time. All of these changes are
reflected in the `params.libsonnet` files.

For more details on how parameters are organized, see `ks param --help`.

*(If you need to customize multiple parameters at once, we suggest that you modify
your ksonnet application's  `components/params.libsonnet` file directly. Likewise,
for greater customization of environment parameters, we suggest modifying the
 `environments/:name/params.libsonnet` file.)*

### Related Commands

* `ks param diff` — Display differences between the component parameters of two environments
* `ks apply` — Apply local Kubernetes manifests (components) to remote clusters

### Syntax
Jessica Yao's avatar
Jessica Yao committed
25 26 27


```
bryanl's avatar
bryanl committed
28
ks param set <component-name> <param-key> <param-value> [flags]
Jessica Yao's avatar
Jessica Yao committed
29 30 31 32 33
```

### Examples

```
Jessica Yao's avatar
Jessica Yao committed
34 35

# Update the replica count of the 'guestbook' component to 4.
36
ks param set guestbook replicas 4
Jessica Yao's avatar
Jessica Yao committed
37

Jessica Yao's avatar
Jessica Yao committed
38 39
# Update the replica count of the 'guestbook' component to 2, but only for the
# 'dev' environment
40
ks param set guestbook replicas 2 --env=dev
Jessica Yao's avatar
Jessica Yao committed
41 42 43 44 45
```

### Options

```
46
      --as-string    Force value to be interpreted as string
Jessica Yao's avatar
Jessica Yao committed
47
      --env string   Specify environment to set parameters for
bryanl's avatar
bryanl committed
48
  -h, --help         help for set
Jessica Yao's avatar
Jessica Yao committed
49 50 51 52 53 54 55 56 57
```

### Options inherited from parent commands

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

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

Jessica Yao's avatar
Jessica Yao committed
59
* [ks param](ks_param.md)	 - Manage ksonnet parameters for components and environments
Jessica Yao's avatar
Jessica Yao committed
60