Import Kong Gateway Entities into Konnect
If you are an existing Kong Gateway user looking to use Konnect as your cloud-hosted control plane, you can use decK to import your Kong Gateway entity configuration into a control plane in your Konnect organization.
You can also use this method to migrate between Konnect organizations.
Afterward, you must manually move over:
- Dev Portal files, developer accounts, and applications
- Application registrations
- Convert roles and permissions into Konnect teams
- Certificates
- Custom plugins
You cannot import unsupported plugins.
Prerequisites
- A Konnect account
- decK 1.28 or later
- Make sure that if you’re using a
.deck.yaml
config file that it doesn’t contain a Konnect personal access token (PAT)
Import entity configuration
Use decK to import entity configurations into a control plane.
When you provide any Konnect flags, decK targets the cloud.konghq.com
environment by default.
-
Generate a Konnect personal access token (PAT) for a user account.
In Konnect in your Personal Access Token account settings, click Generate Token.
-
Set your PAT as an environment variable and authenticate:
export DECK_KONNECT_TOKEN=PAT_02uI9CEOkYo36NlJnFVyZf8xDxfgirtgq0NvNWASfweoGMqA && deck gateway ping
Note: Alternatively, you can pass your PAT directly into the CLI using
--konnect-token <pat>
or read it to a file using--konnect-token-file /PATH/TO/FILE
. -
Run
deck gateway dump
to export the configuration into a file:deck gateway dump -o kong.yaml
This command outputs Kong Gateway’s object configuration into to ` by default. You can also set
--output-file /path/{FILENAME}.yaml
to set a custom filename or location. -
Preview the import with the
deck gateway diff
command.deck gateway diff kong.yaml
If you’re not using the default
kong.yaml
file, specify the filename and path with--state /path/{FILENAME}.yaml
. -
If you’re satisfied with the preview, run
deck gateway sync
:deck gateway sync kong.yaml
If you don’t specify the
--konnect-control-plane-name
flag, decK targets thedefault
control plane. If you have more than one control plane in your organization, we recommend always setting this flag to avoid accidentally pushing configuration to the wrong control plane. -
Log in to your Kong Konnect account and open the control plane you just migrated in Gateway Manager. Look through the configuration details of any imported entities to make sure they were migrated successfully.
Next steps
Now that you’ve imported your Kong Gateway entities to Konnect, you can migrate additional settings from Kong Gateway or continue to test Konnect’s capabilities.