Skip to main content

set config

The kots set config allows setting values for application config items in the latest release version.

Introduced in KOTS v1.31.0

Usage

kubectl kots set config [appSlug] [KEY_1=VAL_1 ... KEY_N=VAL_N] [flags]
  • Provide [flags] according to the table below
FlagTypeDescription
--config-filestringpath to a manifest containing config values (must be apiVersion: kots.io/v1beta1, kind: ConfigValues)
--mergeboolwhen set to true, only keys specified in config file will be updated. This flag can only be used when --config-file flag is used.
--keystringname of a single key to set. This flag requires --value or --value-from-file flags
--valuestringthe value to set for the key specified in the --key flag. This flag cannot be used with --value-from-file flag.
--value-from-filestringpath to the file containing the value to set for the key specified in the --key flag. This flag cannot be used with --value flag.
--deployboolwhen set, automatically deploy the latest version with the new configuration
--skip-preflightsboolset to true to skip preflight checks when deploying new version
--currentboolset to true to use the currently deployed version of the app as the base for the new version
--sequenceintsequence of the app version to use as the base for the new version (defaults to the latest version unless --current flag is set)
-n, --namespacestringthe namespace where the Admin Console is running (required)

About Strict Preflight Checks

If any strict preflight checks are configured, the --skip-preflights flag are not honored because the preflight checks must run and contain no failures before the application is deployed.

When the --deploy option is provided and there are strict preflight checks, the preflight checks always run. The deployment waits for up to 15 minutes for the preflight checks to complete. If the checks complete without strict preflight failures, the release deploys. If the checks do not complete within 15 minutes, the release does not deploy. If there are one or more strict preflight failures, the release does not deploy.

For more information about strict preflight checks, see Defining Preflight Checks.

Examples

kubectl kots set config myapp -n default --config-file /path/to/local/config.yaml
kubectl kots set config myapp -n default --key config-item-name --value-from-file /path/to/config/file/value.txt
kubectl kots set config myapp -n default config-item-name="config item value"
kubectl kots set config myapp -n default --key config-item-name --value "config item value"