decK integration is configured on control planes using the _deck pseudo-resource. kongctl runs decK once per control plane that declares _deck, then resolves external Gateway entities by selector name.
Basic example:
control_planes:
- ref: prod-cp
name: "prod-cp"
_deck:
files:
- "kong.yaml"
flags:
- "--select-tag=kongctl"
gateway_services:
- ref: billing-gw
_external:
selector:
matchFields:
name: "billing-service"
In this example:
- The
prod-cp control plane has decK configuration defined.
- decK applies the
kong.yaml state file with the --select-tag=kongctl flag.
- The
billing-gw Gateway Service is resolved externally by finding a Service with name: "billing-service".
The _deck field configures the decK integration for a control plane:
- Placement: Only allowed on control planes
- Cardinality: Only one
_deck configuration per control plane
- Required child values:
files: List of decK state file paths (at least one required)
flags: Optional list of additional decK CLI flags
Specifies the decK state files to apply:
_deck:
files:
- "kong.yaml"
- "plugins.yaml"
- Must include at least one state file
- Paths are relative to the declarative config file
- When inherited from a template, paths are relative to the file containing
the consuming control plane. A
!file tag instead uses the template
definition file’s context.
- Must remain within the
--base-dir boundary (default: config file directory)
Additional decK command-line flags to pass:
_deck:
flags:
- "--select-tag=kongctl"
- "--parallelism=10"
Important: Do not include Konnect authentication flags (--konnect-token, --konnect-control-plane-name, --konnect-addr) or output flags (--json-output, --no-color). kongctl injects these automatically.
When Gateway Services are managed by decK, reference them as external resources in your kongctl configuration:
gateway_services:
- ref: billing-gw
_external:
selector:
matchFields:
name: "billing-service"
Keep the following in mind:
_external.selector.matchFields.name is required for external Gateway services.
- The
name field must be the only selector field.
- kongctl resolves the Gateway Service after decK applies the configuration.
- External Gateway Services can’t use
_external.requires.deck, resolution happens automatically