Convert Gateway entity configuration from 2.8 to 3.4

Uses: Kong Gateway
TL;DR

Run deck file convert and review the results.

Prerequisites

You have Kong Gateway running on version 2.8.

decK is a CLI tool for managing Kong Gateway declaratively with state files. To complete this tutorial, install decK version 1.47 or later.

This guide uses deck gateway apply, which directly applies entity configuration to your Gateway instance. We recommend upgrading your decK installation to take advantage of this tool.

You can check your current decK version with deck version.

You can use deck file convert to automatically perform many of the changes that occurred between Kong Gateway 2.8 LTS and 3.4 LTS versions.

See the deck file convert reference for a list of all the conversions that decK will perform.

Note: Update your decK version to 1.47 or later before converting files.

Export configuration

Use an existing backup file, or export the entity configuration an existing installation, for example 3.4:

deck gateway dump -o kong-2.8.yaml \
    --konnect-token "$YOUR_KONNECT_PAT" \
    --konnect-control-plane-name $YOUR_CP_NAME
deck gateway dump -o kong-2.8.yaml --all-workspaces

Convert configuration

Use deck file convert with version flags to convert the entity configuration:

deck file convert \
    --from 2.8 \
    --to 3.4 \
    --input-file kong-2.8.yaml \
    --output-file kong-3.4.yaml

Review and validate

  1. Review the output of the command.

    deck file convert creates a new file and prints warnings and errors for any changes that can’t be made automatically. These changes require some manual work, so adjust your configuration accordingly.

  2. Validate the converted file in a test environment.

    Make sure to manually audit the generated file before applying the configuration in production. These changes may not be fully correct or exhaustive, so manual validation is strongly recommended.

Apply configuration

Upload your new configuration to a Konnect control plane:

deck gateway sync kong-3.4.yaml \
    --konnect-token "$YOUR_KONNECT_PAT" \
    --konnect-control-plane-name $YOUR_CP_NAME

Upload your new configuration to the new environment:

deck gateway sync kong-3.4.yaml \
    --workspace default

FAQs

Manually validate the file, then make any necessary updates to your state file.

If you have validated the configuration and found no issues but are still getting a warning, the warning may be a false positive. You can still apply the configuration, but do so at your own risk.

If you run into false positives, file an issue to let us know.

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!