File manipulation using decK file

Uses: decK

decK’s declarative configuration format is the canonical representation of a Kong Gateway configuration in text form.

decK provides multiple tools for interacting with this declarative configuration:

Command

Description

openapi2kong Convert an OpenAPI specification to Kong Gateway Services and Routes.
kong2kic Convert a Kong Gateway declarative configuration file to Kong Ingress Controller compatible CRDs. Supports both Gateway API and Ingress resources.
kong2tf Convert a Kong Gateway declarative configuration file to Terraform manifests (Konnect only).

decK also provides commands to manipulate declarative configuration files:

Command

Description

patch Update values in a Kong Gateway declarative configuration file.
add-plugins Add new plugin configurations to a Kong Gateway declarative configuration file.
add-tags Add new tags to a Kong Gateway declarative configuration file.
list-tags List all tags in a Kong Gateway declarative configuration file.
remove-tags Remove tags to a Kong Gateway declarative configuration file.
merge Merge multiple files in to a single file, leaving env variables in place.
render Render the final configuration sent to the Admin API in a single file.
namespace Apply a namespace to Routes in a decK file by path or hostname.
convert Convert decK files from one format to another, for example Kong Gateway 2.x to 3.x.

decK provides a deck file lint command which can be used to ensure that declarative configuration files meet defined standards before being used to configure Kong Gateway.

Finally, the deck file validate command validates the state file locally against static schemas. This won’t detect any conflicts on the server, but is much faster than deck gateway validate.

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!