What is decK?
decK is a command line tool that facilitates API Lifecycle Automation (APIOps) by offering a comprehensive toolkit of commands designed to orchestrate and automate the entire process of API delivery. APIOps involves leveraging automation frameworks to streamline and enforce best practices throughout the API lifecycle. This enables developers and operations teams to manage APIs from development through deployment, ensuring consistency, reliability, and speed in API integrations.
decK is one of the many tools you can use to manage Kong Gateway and Konnect. To learn about other tools, review our tools page.
How does decK work?
decK is a tool that works with state files, which describe the configuration of Kong Gateway. These state files store Kong Gateway’s configuration in a clear, declarative format, allowing you to manage Services, Routes, Consumers, plugins, and other entities that define how requests are processed and routed through the Gateway. decK communicates with Kong Gateway via the Admin API.
decK is one of several tools available for managing Kong Gateway.
Other tools
- Terraform: Manage infrastructure as code and automated deployments to streamline setup and configuration of Konnect and Kong Gateway
- KIC: Manage ingress traffic and routing rules for your services
- Kong Gateway Admin API: Manage on-prem Kong Gateway entities via an API
- Control Plane Config API: Manage Kong Gateway entities within Konnect Control Planes via an API
What can decK do?
Commonly used decK Gateway commands
Export your current settings from Kong Gateway
deck gateway dump -o kong.yaml
Diff a state file with the configuration in Kong Gateway
deck gateway diff kong.yaml
Sync a state file with the configuration in Kong Gateway
deck gateway sync kong.yaml
Check the connection to Kong Gateway
deck gateway ping
Self-validate its own configuration
deck gateway validate
Sync Gateway configs to Konnect
Tip: You can add Konnect flags to any decK command to target a Konnect Control Plane instead of a self-managed Kong Gateway.
deck gateway sync kong.yaml --konnect-control-plane-name staging
Commonly used decK file commands for APIOps
Generate a Kong Gateway configuration file from an API spec
deck file openapi2kong -s oas.yaml -o httpbin.yaml
Merge two configuration files into one
deck file merge httpbin.yaml another-httpbin.yaml -o merged-kong.yaml
Frequently asked questions
Can I run multiple decK processes at the same time?
The two processes will step on each other and might corrupt Kong Gateway’s configuration. You should ensure that there is only one instance of decK running at any point in time.