Skip to content
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
decK
1.10.x
  • Home icon
  • decK
  • Guides
  • Ci Driven Configuration
  • CI-driven Configuration
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
  • unreleased
  • 1.42.x (latest)
  • 1.41.x
  • 1.40.x
  • 1.39.x
  • 1.38.x
  • 1.37.x
  • 1.36.x
  • 1.35.x
  • 1.34.x
  • 1.30.x
  • 1.29.x
  • 1.28.x
  • 1.27.x
  • 1.26.x
  • 1.25.x
  • 1.24.x
  • 1.23.x
  • 1.22.x
  • 1.21.x
  • 1.20.x
  • 1.19.x
  • 1.18.x
  • 1.17.x
  • 1.16.x
  • 1.15.x
  • 1.14.x
  • 1.13.x
  • 1.12.x
  • 1.11.x
  • 1.10.x
  • 1.9.x
  • 1.8.x
  • 1.7.x
  • pre-1.7
  • Introduction
    • Terminology
    • Architecture
    • Compatibility Promise
  • Changelog
  • Installation
  • Guides
    • Getting Started with decK
    • Backup and Restore
    • Configuration as Code and GitOps
    • Distributed Configuration
    • Best Practices
    • Using decK with Kong Gateway (Enterprise)
    • Run decK with Docker
    • Using Multiple Files to Store Configuration
    • De-duplicate Plugin Configuration
    • Set Up Object Defaults
    • Using environment variables with decK
  • Reference
    • Entities Managed by decK
    • decK CLI reference
      • deck completion
      • deck convert
      • deck diff
      • deck dump
      • deck ping
      • deck reset
      • deck sync
      • deck validate
      • deck version
      • deck konnect
      • deck konnect diff
      • deck konnect dump
      • deck konnect ping
      • deck konnect sync
  • FAQ
enterprise-switcher-icon Switch to OSS
On this pageOn this page
  • Configuration as code
You are browsing documentation for an older version. See the latest documentation here.

CI-driven Configuration

Configuration as code

decK can be, or rather should be, used in a CI pipeline to push out configuration Kong.

It is advisable to store configuration of Kong in a Git repository (or any other Version Control System, or VCS) and then perform GitOps on Kong’s configuration:

  • Any time a change needs to be performed, ask the developer to open a Pull or Merge Request, which can be reviewed by other humans. You should use decK’s validate and diff commands in the CI to validate and see if the target changes will be performed or not. Although unlikely, it is possible that a sync command might fail even if the above two pass. If this happens, a human has to intervene and resolve the conflict or error manually.
  • Once the configuration change is merged in, the CI should execute diff again (to have a log of what is changing), followed by sync.

You should also have a cronjob in your CI or any other system, which verifies if the source of truth, meaning Kong’s database is in the exact same state as you want it to be (the state file in VCS repository). Unless you do this step, you do not have a truly declarative configuration as your are configure Kong but are never verifying. The system could be out of sync and can go undetected until another change is performed.

Any time you use decK within an automated environment, including a ping command in the beginning of your script can ease debugging in the future, as it usually rules out connectivity issues between decK and Kong.

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 Gateway Enterprise 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