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
3.10 to 3.14 v1.57.3+
  • Routes without an explicit protocols field: Set protocols to ["http", "https"] to preserve the 3.10 default (3.14 changes the default to ["https"] only)
  • Services using secure protocols (https, tls, grpcs, wss) without an explicit tls_verify field: Set tls_verify to false to preserve the 3.10 default (3.14 enables TLS certificate verification by default)
  • Key Auth, Key Auth Encrypted, Basic Auth, HMAC Auth, LDAP Auth, OAuth2, OAuth2 Introspection, Vault Auth, and LDAP Auth Advanced plugins without an explicit hide_credentials field: Set hide_credentials to false to preserve the 3.10 default (3.14 changes the default to true)
  • Plugins that connect to external services over TLS (such as OpenID Connect, AI plugins, Kafka, and others) without an explicit TLS verification field (for example ssl_verify, tls_verify, or https_verify): Set that field to false to preserve the 3.10 default (3.14 enables TLS certificate verification by default). See Gateway breaking changes in 3.14 for the full list of plugins and changed fields.

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 3.10]
  -h, --help                 help for convert
      --input-file -         configuration file to be converted. Use - to read from stdin. (default "-")
      --no-expand-env-vars   do not expand ${{ env "DECK_VAR_NAME" }} placeholders in the output.
  -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 3.14]
      --yes yes              assume yes to prompts and run non-interactively.

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!