nais config set

nais config set NAME [flags]

Set a key-value pair in a config. If the key already exists, its value is updated. If the key does not exist, it is added. Updating a value will cause a restart of workloads referencing the config.

Options

--key
Name of the key to set.
--value
Value to set.
--value-from-file
Read value from file (e.g. keystore.p12, cert.pem). Binary files are automatically Base64-encoded.
--value-from-stdin
Read value from stdin.

Inherited options

--config
Specify the PATH to the configuration file.
-e, --environment
Specify the ENVIRONMENT to use for this command. Overrides the default environment from configuration.
--no-colors
Disable colors in the output.
-t, --team
Specify the TEAM to use for this command. Overrides the default team from configuration.
-v, --verbose
Set verbosity level. Use -v for verbose, -vv for debug, -vvv for trace.

Examples

# Set a key-value pair in a config.
$ nais config set my-config --environment dev --key DATABASE_HOST --value db.example.com

# Read value from stdin (useful for multi-line values).
$ nais config set my-config --environment dev --key CONFIG_FILE --value-from-stdin < config.yaml

# Upload a file as a config value. Binary files are automatically Base64-encoded.
$ nais config set my-config --environment prod --key keystore.p12 --value-from-file ./keystore.p12