deck file convert

Uses: deck

The convert command changes configuration files from one format into another compatible format. For example, a configuration for kong-gateway-2.x can be converted into a kong-gateway-3.x configuration file.

deck file convert --input-file kong2x.yaml --from kong-gateway-2.x --to kong-gateway-3.x

Applied transformations

The following table lists the transformations that deck file convert performs:

Conversion path

Applied transformations

kong-gateway-2.x to kong-gateway-3.x
  • Prefix any paths that look like a regular expression with a ~
  • Generate default values for missing namespace fields in any Rate Limiting Advanced plugins
  • Convert decK file _format_version from 1.1 to 3.0
2.8 to 3.4 v1.47.0+
  • Prefix any paths that look like a regular expression with a ~
  • Generate default values for missing namespace fields in any Rate Limiting Advanced plugins
  • Convert decK file _format_version from 1.1 to 3.0
  • ACL, Bot Detection, IP Restriction, and Canary plugins:
    • Convert config.blacklist to config.deny
    • Convert config.whitelist to config.allow
  • AWS Lambda plugin:
    • Remove the deprecated config.proxy_scheme parameter
  • Pre-Function and Post-Function plugins:
    • Convert config.functions to config.access
3.4 to 3.10 v1.51.0+
  • Any plugins that use Redis configurations:
    • Transform redis.cluster_addresses into redis.cluster_nodes
    • Transform redis.sentinel_addresses into redis.sentinel_nodes
  • AI plugins:
    • Transform model.options.upstream_path into model.options.upstream_url
  • AI Rate Limiting Advanced plugin:
    • Transform llm_providers.window_size from a single value to a list

Command usage

Usage:
  deck file convert [flags]

Flags:
      --format string   output file format: json or yaml. (default "yaml")
      --from string     format of the source file, allowed formats: [kong-gateway kong-gateway-2.x 2.8 3.4]
  -h, --help            help for convert
      --input-file -    configuration file to be converted. Use - to read from stdin. (default "-")
  -o, --output-file -   file to write configuration to after conversion. Use - to write to stdout. (default "-")
      --to string       desired format of the output, allowed formats: [konnect kong-gateway-3.x 3.4 3.10]
      --yes yes         assume yes to prompts and run non-interactively.

Something wrong?

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!