decK

Kong's command line tool for API Lifecycle Automation

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.

Install decK

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
Copied to clipboard!

Diff a state file with the configuration in Kong Gateway

deck gateway diff kong.yaml
Copied to clipboard!

Sync a state file with the configuration in Kong Gateway

deck gateway sync kong.yaml
Copied to clipboard!

Check the connection to Kong Gateway

deck gateway ping
Copied to clipboard!

Self-validate its own configuration

deck gateway validate
Copied to clipboard!

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
Copied to clipboard!

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
Copied to clipboard!

Merge two configuration files into one

deck file merge httpbin.yaml another-httpbin.yaml -o merged-kong.yaml
Copied to clipboard!

Frequently asked questions

Did this doc help?

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!