Skip to content
Kong Docs are moving soon! Our docs are migrating to a new home. You'll be automatically redirected to the new site in the future. In the meantime, view this page on the new site!
Kong Logo | Kong Docs Logo
  • Docs
    • Explore the API Specs
      View all API Specs View all API Specs View all API Specs arrow image
    • Documentation
      API Specs
      Kong Gateway
      Lightweight, fast, and flexible cloud-native API gateway
      Kong Konnect
      Single platform for SaaS end-to-end connectivity
      Kong AI Gateway
      Multi-LLM AI Gateway for GenAI infrastructure
      Kong Mesh
      Enterprise service mesh based on Kuma and Envoy
      decK
      Helps manage Kong’s configuration in a declarative fashion
      Kong Ingress Controller
      Works inside a Kubernetes cluster and configures Kong to proxy traffic
      Kong Gateway Operator
      Manage your Kong deployments on Kubernetes using YAML Manifests
      Insomnia
      Collaborative API development platform
  • Plugin Hub
    • Explore the Plugin Hub
      View all plugins View all plugins View all plugins arrow image
    • Functionality View all View all arrow image
      View all plugins
      AI's icon
      AI
      Govern, secure, and control AI traffic with multi-LLM AI Gateway plugins
      Authentication's icon
      Authentication
      Protect your services with an authentication layer
      Security's icon
      Security
      Protect your services with additional security layer
      Traffic Control's icon
      Traffic Control
      Manage, throttle and restrict inbound and outbound API traffic
      Serverless's icon
      Serverless
      Invoke serverless functions in combination with other plugins
      Analytics & Monitoring's icon
      Analytics & Monitoring
      Visualize, inspect and monitor APIs and microservices traffic
      Transformations's icon
      Transformations
      Transform request and responses on the fly on Kong
      Logging's icon
      Logging
      Log request and response data using the best transport for your infrastructure
  • Support
  • Community
  • Kong Academy
Get a Demo Start Free Trial
Kong Konnect
  • Home icon
  • Kong Konnect
  • Gateway Manager
  • Manage Control Plane Configuration with decK
github-edit-pageEdit this page
report-issueReport an issue
  • Kong Gateway
  • Kong Konnect
  • Kong Mesh
  • Kong AI Gateway
  • Plugin Hub
  • decK
  • Kong Ingress Controller
  • Kong Gateway Operator
  • Insomnia
  • Kuma

  • Docs contribution guidelines
  • Introduction
    • Overview of Konnect
    • Architecture
    • Network Resiliency and Availability
    • Port and Network Requirements
    • Private Connections to Other Cloud Providers
      • Create a private connection with AWS PrivateLink
    • Geographic Regions
    • Centralized consumer management
    • Compatibility
    • Stages of Software Availability
    • Release Notes
    • Support
      • Control Plane Upgrades FAQ
      • Supported Installation Options
  • Get Started
    • Overview
    • Add your API
    • Migrating a Self-Managed Kong Gateway into Konnect
  • Gateway Manager
    • Overview
    • Dedicated Cloud Gateways
      • Overview
      • Provision a Dedicated Cloud Gateway
      • Securing Backend Traffic
      • Transit Gateways
      • Azure VNET Peering
      • Custom Domains
      • Custom Plugins
      • Data plane logs
    • Serverless Gateways
      • Overview
      • Provision a serverless Gateway
      • Securing Backend Traffic
      • Custom Domains
    • Data Plane Nodes
      • Installation Options
      • Upgrade a Data Plane Node
      • Verify a Data Plane Node
      • Secure Control Plane/Data Plane Communications
      • Renew Data Plane Certificates
      • Parameter Reference
      • Using Custom DP Labels
    • Control Plane Groups
      • Overview
      • Working with Control Plane Groups
      • Migrate Configuration into Control Plane Groups
      • Conflicts in Control Planes
    • Kong Gateway Configuration in Konnect
      • Overview
      • Manage Plugins
        • Overview
        • Adding Custom Plugins
        • Updating Custom Plugins
        • How to Create Custom Plugins
      • Create Consumer Groups
      • Secrets Management
        • Overview
        • Konnect Config Store
        • Set Up and Use a Vault in Konnect
      • Manage Control Plane Configuration with decK
    • Active Tracing
      • Overview
    • KIC Association
    • Backup and Restore
    • Version Compatibility
    • Troubleshooting
  • Mesh Manager
    • Overview
    • Create a mesh with the Kubernetes demo app
    • Federate a zone control plane to Konnect
    • Migrate a self-managed zone control plane to Konnect
  • Service Catalog
    • Overview
    • Integrations
      • Overview
      • Datadog
      • GitHub
      • GitLab
      • PagerDuty
      • SwaggerHub
      • Traceable
      • Slack
    • Scorecards
  • API Products
    • Overview
    • Product Documentation
    • Productize a Service
  • Dev Portal
    • Overview
    • Dev Portal Configuration Preparation
    • Create a Dev Portal
    • Sign Up for a Dev Portal Account
    • Publish an API to Dev Portal
    • Access and Approval
      • Manage Developer Access
      • Manage Developer Team Access
      • Add Developer Teams from IdPs
      • Manage Application Registrations
      • Configure generic SSO for Dev Portal
      • Configure Okta SSO for Dev Portal
    • Application Lifecycle
    • Register and create an application as a developer
    • Enable and Disable App Registration for API Product Versions
    • Dynamic Client Registration
      • Overview
      • Okta
      • Curity
      • Auth0
      • Azure
      • Custom IdP
    • Portal Management API Automation Guide
    • Audit Logging
      • Overview
      • Set up an Audit Log Webhook
      • Set up an Audit Log Replay Job
    • Portal Customization
      • Overview
      • About Self-Hosted Dev Portal
      • Host your Dev Portal with Netlify
      • Custom Domains
    • Dev Portal SDK
    • Troubleshoot
  • Advanced Analytics
    • Overview
    • Dashboard
    • Explorer
    • Analyze API Usage and Performance with Reports
    • Requests
  • Org Management
    • Plans and Billing
    • Authentication and Authorization
      • Overview
      • Teams
        • Overview
        • Manage Teams
        • Teams Reference
        • Roles Reference
      • Manage Users
      • Manage System Accounts
      • Personal Access Tokens
      • Social Identity Login
      • Org Switcher
      • Configure Generic SSO
      • Configure Okta SSO
      • Login Sessions Reference
      • Troubleshoot
    • Audit Logging
      • Overview
      • Set up an Audit Log Webhook
      • Set up an Audit Log Replay Job
    • Account and Org Deactivation
  • API
    • Overview
    • API Request API (Beta)
      • API Spec
    • API Products API
      • API Spec
    • Audit Logs API
      • API Spec
      • Audit Log Webhooks
    • Control Plane API
      • API Spec
    • Control Plane Configuration API
      • API Spec
    • Cloud Gateways API
      • API Spec
    • Identity API
      • API Spec
      • Identity Integration Guide
      • SSO Customization
    • Konnect Search API (Beta)
      • API Spec
    • Mesh Manager API
      • API Spec
      • Kong Mesh API Reference
    • Portal Client API
      • API Spec
    • Portal Management API
      • API Spec
    • Reference
      • Filtering
      • API Errors
  • Reference
    • Labels
    • Plugin Ordering Reference
    • Konnect Search
    • Terraform Provider
    • Audit Logs
    • Verify audit log signatures
    • IdP SAML attribute mapping
enterprise-switcher-icon Switch to OSS
On this pageOn this page
  • Prerequisites
  • Test your connection
  • Create a configuration file
  • Make changes to configuration
  • Manage consumers and global plugins
  • Test the service
  • Migrate configuration between control planes
  • More information

Manage Control Plane Configuration with decK

You can manage control planes in your Kong Konnect org using configuration files instead of the GUI or admin API commands. With decK, Kong’s declarative configuration management tool, you can create, update, compare, and synchronize configuration as part of an automation pipeline.

In Kong Konnect, decK can manage control planes and all of their configurations:

  • Create state files for different control planes and manage each one separately.
  • Manage Gateway entities for each control plane.
  • Migrate configuration from one control plane to another.

One way to learn decK or write a decK file is to view the YAML generated files in Konnect. Konnect autogenerates a YAML configuration file that reflects the current Gateway Manager configuration. You can view and copy the current configuration on the Configuration tab of each entity in Gateway Manager.

Use a --konnect-prefixed CLI flag or pass Konnect parameters using a decK configuration file (~/.deck.yaml by default) to target https://cloud.konghq.com. If you don’t pass any Konnect parameters to decK, decK looks for a local Kong Gateway instance instead.

Run deck help to see all available flags, or see the decK CLI reference.

You cannot use decK to publish content to the Dev Portal, manage application registration, or configure custom plugins.

Prerequisites

  • decK v1.40.0 or later installed.
  • Optional: To test your configuration, set up a simple data plane node.
  • A personal access token (PAT).

Test your connection

Check that you can log in to Konnect and that decK recognizes your account credentials:

deck gateway ping \
  --konnect-control-plane-name default \
  --konnect-token {YOUR_PERSONAL_ACCESS_TOKEN}

If the connection is successful, the terminal displays the full name of the user associated with the account:

Successfully Konnected to the Example-Name organization!

You can also use decK with Konnect more securely by storing your personal access token in a file, then either calling it with --konnect-token-file /path/{FILENAME}.txt, or adding it to your decK configuration file under the konnect-token option:

konnect-token: {YOUR_PERSONAL_ACCESS_TOKEN}

The default location for this file is $HOME/.deck.yaml. You can target a different configuration file with the --config /path/{FILENAME}.yaml flag, if needed.

The following steps all use a .deck.yaml file to store the Konnect credentials instead of flags.

Create a configuration file

Capture a snapshot of the current configuration in a file:

deck gateway dump --konnect-control-plane-name default -o konnect.yaml

If you don’t specify the --konnect-control-plane-name flag, decK will target the default 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 group.

The command creates a file named konnect.yaml. If you have nothing configured, decK creates the file with only the format version and control plane name:

_format_version: "3.0"
_konnect:
  control_plane_name: default

You can specify a different filename or location, or export the configuration in JSON format:

deck gateway dump --konnect-control-plane-name default \
  --format json \
  --output-file examples/konnect.json

Make changes to configuration

Make any changes you like using YAML or JSON format. For this example, let’s add a new service.

  1. Add the following snippet to your konnect.yaml file:

     _format_version: "3.0"
     _konnect:
       control_plane_name: default
     services:
     - name: MyService
       host: httpbin.konghq.com
       port: 80
       protocol: http
       routes:
       - methods:
         - GET
         - POST
         name: mockpath
         paths:
         - /mock
         plugins:
         - name: key-auth
           config:
             key_names:
             - apikey
    

    This snippet defines a service named MyService pointing to httpbin.konghq.com. The service has one version, and the version gets implemented with the route /mock, which means that you can access the service by appending this route to your proxy URL.

    Because you’re also enabling the key-auth plugin on the route, you need a consumer key to access it, so you can’t test the route yet.

  2. Compare your local file with the configuration currently in Kong Konnect:

     deck gateway diff konnect.yaml --konnect-control-plane-name default
    

    If the format and schema is correct, decK gives you a preview of what would be added to the Kong Konnect configuration:

     creating service MyService
     creating route mockpath
     creating plugin key-auth for route mockpath
     Summary:
       Created: 3
       Updated: 0
       Deleted: 0
    
  3. If you’re satisfied with the preview, sync the changes to Kong Konnect:

     deck gateway sync konnect.yaml --konnect-control-plane-name default
    

    You should see the same output again:

     creating service MyService
     creating route mockpath
     creating plugin key-auth for route mockpath
     Summary:
       Created: 3
       Updated: 0
       Deleted: 0
    
  4. Check Kong Konnect to make sure the sync worked. Open Gateway Manager, select your control plane, and select Gateway Services.

    You should see a new service named MyService in the control plane.

Manage consumers and global plugins

You can also use decK to manage objects not tied to a specific service or route. For this example, create a consumer and a global proxy caching plugin:

  • Consumers represent users of a service, and are most often used for authentication. They provide a way to divide access to your services, and make it easy to revoke that access without disturbing a service’s function.

  • Global plugins are plugins that apply to all services, routes, and consumers in the control plane, as applicable. For example, you can configure proxy caching on all your services at once with one proxy-cache plugin entry.

  1. In the previous section, you created a route with key authentication. To access this route, add a consumer to the konnect.yaml file and configure a key:

     consumers:
      - custom_id: consumer
        username: consumer
        keyauth_credentials:
        - key: apikey
    
  2. Enable proxy caching so that your upstream service is not bogged down with repeated requests. Add a global proxy cache plugin:

     plugins:
     - name: proxy-cache
       config:
         content_type:
         - "application/json; charset=utf-8"
         cache_ttl: 30
         strategy: memory
    
  3. Run a diff to test your changes:

     deck gateway diff konnect.yaml --konnect-control-plane-name default
    
  4. If everything looks good, run another sync, then check Kong Konnect to see your changes:

     deck gateway sync konnect.yaml --konnect-control-plane-name default
    

Test the service

If you have already have a data plane node deployed, you can test this configuration now. Or, you can start a new data plane node using the Docker quick setup script.

The default proxy URL is localhost:8000.

Make a call to the proxy URL and append the route path /mock with an apikey header:

 curl -i -X GET http://localhost:8000/mock \
  -H 'apikey: {API_KEY}'

If successful, you should see the homepage for httpbin.konghq.com. On the Service Version overview page, you’ll see a record for status code 200.

If you try to access the route without a key, you’ll get an authorization error:

Kong Error
No API key found in request.

Migrate configuration between control planes

You can also use decK to migrate or duplicate configuration between control planes.

  1. Export configuration from the original control plane with deck gateway dump into a state file:

     deck gateway dump \
       --konnect-control-plane-name default \
       --output-file default.yaml
    
  2. In the file, change the control plane name to the new group:

     _format_version: 3.0"
     _konnect:
       control_plane_name: staging
    
  3. Using the state file you just edited, preview the import with the deck gateway diff command, pointing to the control plane that you want to target:

     deck gateway diff default.yaml \
       --konnect-control-plane-name staging
    
  4. If everything looks good, deck gateway sync the configuration to the new control plane:

     deck gateway sync default.yaml \
       --konnect-control-plane-name staging
    

You should now have two control planes in Konnect with the same configuration.

More information

  • decK CLI reference
  • Import Kong Gateway configuration into Konnect
Thank you for your feedback.
Was this page useful?
Too much on your plate? close cta icon
More features, less infrastructure with Kong Konnect. 1M requests per month for free.
Try it for Free
  • Kong
    Powering the API world

    Increase developer productivity, security, and performance at scale with the unified platform for API management, service mesh, and ingress controller.

    • Products
      • Kong Konnect
      • Kong Gateway Enterprise
      • Kong Gateway
      • Kong Mesh
      • Kong Ingress Controller
      • Kong Insomnia
      • Product Updates
      • Get Started
    • Documentation
      • Kong Konnect Docs
      • Kong Gateway Docs
      • Kong Mesh Docs
      • Kong Insomnia Docs
      • Kong Konnect Plugin Hub
    • Open Source
      • Kong Gateway
      • Kuma
      • Insomnia
      • Kong Community
    • Company
      • About Kong
      • Customers
      • Careers
      • Press
      • Events
      • Contact
  • Terms• Privacy• Trust and Compliance
© Kong Inc. 2025